CoCalc Public Filestmp / demo.htmlOpen with one click!
Author: Vince Knight
Views : 43
Description: Jupyter html version of tmp/demo.ipynb
Compute Environment: Ubuntu 18.04 (Deprecated)
demo
In [2]:
import random
In [7]:
l = [random.expovariate(2) for k in range(200)]
sum(l) / float(len(l))
Out[7]:
0.4815486982036245
In [8]:
l = [random.expovariate(1) for k in range(200)]
sum(l) / float(len(l))
Out[8]:
1.0519323905684097
In [10]:
l = [random.expovariate(.5) for k in range(200)]
sum(l) / float(len(l))
Out[10]:
1.9581093658459994
In [15]:
import matplotlib.pyplot as plt
%matplotlib inline
In [17]:
plt.scatter([1,2,3,4], [4,5,6,7]);
In [ ]: