```
from sympy import *
init_printing(use_latex='mathjax')
x, y, z = symbols('x,y,z')
```

# Probability Modeling


```
from sympy.stats import *
```


```
X = Normal('X', 0, 1)
X
```


```
# Density
```


```
# Density of expressions
```


```
# Probability
```


```
# Sampling
```


```

```

## Dice


```
A = Die('A', 6)
B = Die('B', 6)

density(A+B)
```


```

```

### Evaluate = False


```

```


```

```


```

```

## More distributions


```
from sympy.stats import Gamma
Gamma?
```


```
k = Symbol('k', positive=True)
theta = Symbol('theta', positive=True)
A = Gamma('A', k, theta)
A
```


```
density(A**2)(x)
```

c1a560b3c13044a29f2270a11b467f8ac17a7020
ipynb
Jupyter Notebook
tutorial_exercises/examples-stats.ipynb
gvvynplaine/scipy-2016-tutorial
aa417427a1de2dcab2a9640b631b809d525d7929
BSD-3-Clause
2016-06-21T21:11:02.000Z
2021-02-04T07:51:03.000Z
tutorial_exercises/examples-stats.ipynb
gvvynplaine/scipy-2016-tutorial
aa417427a1de2dcab2a9640b631b809d525d7929
BSD-3-Clause
2016-07-02T20:24:06.000Z
2016-07-11T11:31:44.000Z
tutorial_exercises/examples-stats.ipynb
gvvynplaine/scipy-2016-tutorial
aa417427a1de2dcab2a9640b631b809d525d7929
BSD-3-Clause
2016-06-25T09:04:24.000Z
2021-08-09T06:46:01.000Z
Qwen/Qwen-72B
1. YES
2. YES