In [1]:
from scipy.stats import norm
import matplotlib.mlab as mlab
import matplotlib.pyplot as plt
import numpy as np
import scipy as sp
import random

In [2]:
# read data from a text file. One number per line
random_y1= random.sample(xrange(1), n)
random_y2= random.sample(xrange(1), n)
random_x1= random.sample(xrange(1), n)
random_x2= random.sample(xrange(1), n)
datos=[sp. ]

  File "<ipython-input-2-d81fbe49a902>", line 7
    datos=[sp. ]
SyntaxError: invalid syntax

In [ ]:
# best fit of data
(mu, sigma) =

# the histogram of the data
n, bins, patches = plt.hist(datos, 60, normed=1, facecolor='green', alpha=0.75)

# add a 'best fit' line
y = mlab.normpdf( bins, mu, sigma)
l = plt.plot(bins, y, 'r--', linewidth=2)

plt.title(r'$\mathrm{Histogram\ of\ IQ:}\ \mu=%.3f,\ \sigma=%.3f$' %(mu, sigma))