Skip to content

Instantly share code, notes, and snippets.

from sympy import *
from sympy.stats import *
X = Die('X', 6) # RV
x = sample(X) # realization of RV
x # do not conflate x and X
Omega = list(range(11)) # 0, 1, ..., 10 but EXCLUDES 11
def PMF(x, n = 10):
assert isinstance(x, int)