Given mean and variance of a Gaussian (normal) random variable, how to compute its probability density function (PDF).

import numpy as np
import scipy.stats as stats
x = np.linspace(0.3, 1.75, 1000)y = stats.norm.pdf(x, 1.075, 0.2) #the equation above☝☝☝
plt.plot(x, y)
plt.show()

Comments
Post a Comment