Create a deliberately bad normal distribution for sample data - varying the badness, mean, standard deviation and range of results shown.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | from numpy.random import normal
from scipy.stats import norm as normStat
CRAZINESS = 0.1
MIN = 50
MAX = 300
STEP = 5
AVG = 180
DEV = 40
p = normStat(AVG, DEV).pdf
def noise():
return 1 + CRAZINESS * normal(1)
for x in range(MIN, MAX, STEP):
print str(x), "\t", p(x) * noise()
|
Data can be pasted directly into spreadsheets.
On linux machines this can be done using
python program.py | xclip
or using excellerator to save output into .xls format