Comment dois-je calculer PDF (fonction de densité de probabilité) en Python?

J'ai le code suivant ci-dessous qui imprime le PDF graphique pour un particulier de la moyenne et de l'écart-type.

http://imgur.com/a/oVgML

Maintenant, j'ai besoin de trouver la probabilité réelle, d'une valeur particulière. Donc par exemple si ma moyenne est de 0, et ma valeur est 0, mon probabilité est de 1. Ceci est habituellement fait par le calcul de l'aire sous la courbe. Similaire à ceci:

http://homepage.divms.uiowa.edu/~mbognar/applets/normal.html

Je ne suis pas sûr de la façon d'aborder ce problème

import numpy as np
import matplotlib    
import matplotlib.pyplot as plt

def normal(power, mean, std, val):
    a = 1/(np.sqrt(2*np.pi)*std)
    diff = np.abs(np.power(val-mean, power))
    b = np.exp(-(diff)/(2*std*std))
    return a*b

pdf_array = []
array = np.arange(-2,2,0.1)
print array
for i in array:
    print i
    pdf = normal(2, 0, 0.1, i)
    print pdf
    pdf_array.append(pdf)

plt.plot(array, pdf_array)
plt.ylabel('some numbers')
plt.axis([-2, 2, 0, 5])
plt.show()

print 
InformationsquelleAutor Raaj | 2017-02-01