very basic statistics functions
In [1]:
from Goulib.notebook import *
from Goulib.stats import *
In [2]:
dice=Discrete(range(1,6+1))
dice
Out[2]:
In [3]:
Y=Discrete({1:0.2, -1:0.8})
Y
Out[3]:
In [9]:
X=Discrete({-2:0.15,-1:.2,0:.3,1:.2,2:.15})
X**2+Y
Out[9]:
In [5]:
n1=Normal()
print(n1)
n1
Out[5]:
In [6]:
n2=Normal([],4,4)
n2
Out[6]:
In [7]:
n1+n2
Out[7]:
In [8]:
plot.plot([n1,n2,n1+n2])
Out[8]: