Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

plot normal distribution python

import matplotlib.pyplot as plt
import numpy as np
import scipy.stats as stats
import math

mu = 0
variance = 1
sigma = math.sqrt(variance)
x = np.linspace(mu - 3 * sigma, mu + 3 * sigma, 100)
plt.plot(x, stats.norm.pdf(x, mu, sigma))
plt.show()
Comment

python plot normal distribution

import numpy as np
import matplotlib.pyplot as plt

def get_normal(n):
  mu,sigma = 10,1
  s = np.random.normal(mu, sigma, n)
  plt.hist(s, density=True)
  plt.show()

get_normal(100)
Comment

normalize a distribution plot

sns.histplot(x, stat='density')
Comment

PREVIOUS NEXT
Code Example
Python :: Count the number of Missing Values in the DataFrame 
Python :: json file download 
Python :: Classe wrapper en python 
Python :: excel win32com select multiple cells in a row or column 
Python :: method 01 of making GUI with tkinter in python 
Python :: cara ambil 2 kata menggunakan phyton 
Python :: if elif else ladder in python 
Python :: symmetric_difference_update() Function of sets in python 
Python :: Adding new nested object using Shallow copy 
Python :: Calculate summary statistics across columns 
Python :: python if modulo 
Python :: relative ranks in python 
Python :: is c++ easier than python 
Python :: how to clear formatting in python 
Python :: how to open cmd as administrator with python 
Python :: flask docker redirect container name 
Python :: python code to executable online converter 
Python :: using ipfn in python 
Python :: tweepy to dataframe 
Python :: python list chunks using yield 
Python :: tkinter window not responding during progress bar 
Python :: frequency domain parameter of speech 
Python :: difference between = and is not python 
Python :: setheading in python 
Python :: why mentioning user agent in request library 
Python :: wxPython wx.Window Connect example 
Python :: flip a coin with array in python 
Python :: dashes in python packages 
Python :: python local variable 
Python :: Python Raw string using r prefix 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =