<a href="https://colab.research.google.com/github/bkgsur/StatisticsWithPython/blob/main/IntroSympy.ipynb" target="_parent"></a>


```python
from sympy import stats
```


```python
X = stats.Normal('x',0,10)
from sympy.abc import x
#probability density function
stats.density(X)(x)
```




$\displaystyle \frac{\sqrt{2} e^{- \frac{x^{2}}{200}}}{20 \sqrt{\pi}}$




```python
# evaluate cdf
stats.cdf(X)(0)
```




$\displaystyle \frac{1}{2}$




```python
# evaluate probability
stats.P(X>0).evalf()
```




$\displaystyle 0.5$




```python
stats.E(X)

```




$\displaystyle 0$



3fbc3bfdd861b4e9cd3aca2130a12b9b141b1978
ipynb
Jupyter Notebook
Statistics/IntroSympy.ipynb
bkgsur/FinanceModelingComputationWithPython
e526d53fc06776b91202c87005ace3e4f946e80c
MIT
Statistics/IntroSympy.ipynb
bkgsur/FinanceModelingComputationWithPython
e526d53fc06776b91202c87005ace3e4f946e80c
MIT
Statistics/IntroSympy.ipynb
bkgsur/FinanceModelingComputationWithPython
e526d53fc06776b91202c87005ace3e4f946e80c
MIT
Qwen/Qwen-72B
1. YES
2. YES