Se utilizaron estos Datos a=7 , c=1 , m=16547


In [5]:
from aleatorio import *
import matplotlib.pylab as plt
%matplotlib inline

N = 1000

semilla = 7
a = 7
c = 1
m = 16547

z = Conmix(semilla,a,c,m,N)

rangoos= np.zeros(10)


for iterator in range(N):
    for i in range(1,11):
        
        div = float(i)/float(10)       
        
        if(z[iterator]< div and  z[iterator]>= (div-0.1)):
            rangoos[i-1] = rangoos[i-1]+1

rango =np.arange(0,1,0.1)


med = sum(rangoos)/len(rangoos)
plt.axes((0.1, 0.2, 0.8, 0.6))  
plt.bar(np.arange(10), rangoos)  
plt.ylim(0,max(rangoos)+50)  
plt.title('Histograma3')
plt.xticks(np.arange(10),rango) 

N = 10
y = np.ones(N)*med
x = np.linspace(0, N, N, endpoint=True)
plt.plot(x, y,  linewidth=2, color='green')
plt.show()



In [ ]: