normal distribution curve in python

Solutions on MaxInterview for normal distribution curve in python by the best coders in the world

showing results for - "normal distribution curve in python"
Simón
06 Mar 2016
1import matplotlib.pyplot as plt
2import numpy as np
3
4mu, sigma = 0.5, 0.1
5s = np.random.normal(mu, sigma, 1000)
6
7# Create the bins and histogram
8count, bins, ignored = plt.hist(s, 20, density=True) # density is used in matplotlib 3.1 v and ahead
9# if using matplotlib v2.1 use normed instead of density
10
11# Plot the distribution curve
12plt.plot(bins, 1/(sigma * np.sqrt(2 * np.pi)) *
13    np.exp( - (bins - mu)**2 / (2 * sigma**2) ),       linewidth=3, color='y')
14plt.show()
queries leading to this page
normal distribution curve pythondraw normal distribution curve pythonplt normal disttribution one standard diviationplot normal curve given few points pythoncurve normals pythondistribution curve pythonplot guassian curve of numpyhow to plot a normal distribution curve in pythonnormal curve distributionglossian curve pythonnormal distribution program in pythonhow to plot standard normal curve in pythonplot normal distribution curve in pythondistribution curve dataframe pythonplot the bell curve numpynormal distribution curvedraw normal distribution curve in pythonnormal distribution curve in pythonthe shape of the normal curve in pythonnormal distribution curve plot pythonnormal distribution pythonnormal distribution 2a python putputnormal distribution graph on python with labelsplot standard normal distribution in python matplotlibnormal distribution in pythonnormalized curve pythonplot standard deviation curve on phythonthe normal distribution curve is curve of a normal distribution ishow to use normal distribution in pytyonhow to draw normal distribution curve in pythonhow to plot normal distribution curvehow to make normal distribution curve in pythonnormal distribution plot pythonnormal distribution graph generate pythonhow to plot standard deviation curve in pythonhow to plot normal distribution curve in pythongenerating a normal distribution in pythona normal distribution curve isgenerate normal curve numpyplotting a normal distribution in pythonnormal distribution curve in python