Skip to content

Instantly share code, notes, and snippets.

@prafuld3
Created January 4, 2020 07:35
Show Gist options
  • Save prafuld3/e11f43428ed1661cfb5cffe9c392cbda to your computer and use it in GitHub Desktop.
Save prafuld3/e11f43428ed1661cfb5cffe9c392cbda to your computer and use it in GitHub Desktop.
#https://stackoverflow.com/questions/10138085/python-pylab-plot-normal-distribution
import numpy as np
import matplotlib.pyplot as plt
mean = 0; variance = 1
x = np.arange(-5,5,.01)
y = np.exp(-np.square(x-mean)/2*variance)/(np.sqrt(2*np.pi*variance))
plt.plot(x,y)
plt.ylabel('gaussian distribution')
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment