Skip to main content

Posts

Showing posts with the label Gaussian distribution using Python

Standard Normal Distribution with examples using Python

Understanding Normal Distribution and its Properties using Python

Understanding Normal Distribution and its Properties using Python A Normal or Gaussian distribution is used to represent continuous random variables. BMI of people, height of people amongst other phenomena tend to follow a Normal distribution. It is generally used to describe a lot of natural phenomena around us. A normal distribution generally follows a bell curve. Let's see this in action. A normal distribution is defined by 2 parameters viz. Mean and Standard Deviation . This is how you can define this distribution using the Stats functionality from Scipy . import numpy as np from matplotlib import pyplot as plt from scipy.stats import norm import scipy x= np.linspace(0,700,1000000)##Create evenly spaced numbers from 0 to 400 r1 = norm.rvs(loc=350,scale=50,size=1000000) ###Create samples with mean=350 and stdev=50 Notice the rvs attribute of norm . We will talk about it in a while. Let's see how the plot for this distribution look...