In [ ]:
    
from sympy import *
init_printing(use_latex='mathjax')
x, y, z = symbols('x,y,z')
    
In [ ]:
    
from sympy.stats import *
    
In [ ]:
    
X = Normal('X', 0, 1)
X
    
In [ ]:
    
# Density
    
In [ ]:
    
# Density of expressions
    
In [ ]:
    
# Probability
    
In [ ]:
    
# Sampling
    
In [ ]:
    
    
In [ ]:
    
A = Die('A', 6)
B = Die('B', 6)
density(A+B)
    
In [ ]:
    
    
In [ ]:
    
    
In [ ]:
    
    
In [ ]:
    
    
In [ ]:
    
from sympy.stats import Gamma
Gamma?
    
In [ ]:
    
k = Symbol('k', positive=True)
theta = Symbol('theta', positive=True)
A = Gamma('A', k, theta)
A
    
In [ ]:
    
density(A**2)(x)