Skip to content

Instantly share code, notes, and snippets.

@antiface
Forked from arunnayan/normal_distribution.py
Created April 26, 2020 22:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antiface/f8d6a31762fb2acce91bf1cb5e065cff to your computer and use it in GitHub Desktop.
Save antiface/f8d6a31762fb2acce91bf1cb5e065cff to your computer and use it in GitHub Desktop.
import math
import matplotlib.pyplot as plt
import numpy as np
import scipy.stats
mean = 0
variance = 1
sigma = math.sqrt(variance)
x = np.linspace(mean - 3*sigma, mean + 3*sigma, 100)
plt.plot(x, scipy.stats.norm.pdf(x, mean, sigma))
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment