9.2 Normal Probability Distribution
The normal probability distribution with mean and standard deviation is given by:
It is bell shaped and is symmetric about the mean .

The syntax for the normal cumulative probability with =mean and =std is:
from scipy import stats
stats.norm.cdf(x,mean,std)
The syntax for inverse normal or p percentile (with area to the left of p) and =mean and =std is:
from scipy import stats
stats.norm.ppf(p,mean,std)
Note: The standard normal distribution has a mean of zero and standard deviation of one.
Example: In a standard normal distribution what is the probability that the z value is less than 2?
from scipy import stats
stats.norm.cdf(2,0,1) #for standard normal mean is zero and std is one
Show expected output
0.9772498680518208Interpretation:
Example: In a standard normal distribution what is the probability that the z value is between -2 and 2.
=stats.norm.cdf(2,0,1)-stats.norm.cdf(-2,0,1)
from scipy import stats
stats.norm.cdf(2,0,1)-stats.norm.cdf(-2,0,1)
Show expected output
0.9544997361036416Interpretation:
Example: The midterm exam scores in a math class is normally distributed with a mean of 73 and a standard deviation of 5.
- Find the probability that a randomly selected student scored more than 65 on the exam.
=1-stats.norm.cdf(65,73,5)
from scipy import stats
1-stats.norm.cdf(65,73,5)
Show expected output
0.945200708300442Interpretation:
Example: The midterm exam scores in a math class is normally distributed with a mean of 73 and a standard deviation of 5.
- Find the probability that a randomly selected student scored less than 85.
=stats.norm.cdf(85,73,5)
from scipy import stats
stats.norm.cdf(85,73,5)
Show expected output
0.9918024640754038Interpretation:
Example: The midterm exam scores in a math class is normally distributed with a mean of 73 and a standard deviation of 5.
- Find the 90th percentile (that is, find the score k that has 90% of the scores below k and 10% of the scores above k).
= stats.norm.ppf(.9,73,5)
from scipy import stats
stats.norm.ppf(.90,73,5)
Show expected output
79.407757827723Interpretation: Ninety percent of scores are less than or equal to 79.407757827723
Example: The midterm exam scores in a math class is normally distributed with a mean of 73 and a standard deviation of 5.
- Find the probability that a randomly selected student has a score between 70 and 90.
stats.norm.cdf(90,73,5) - stats.norm.cdf(70,73,5)
Show expected output
0.7254099529842495Interpretation:
SciPy.Stats Summary of Probability Distributions
from scipy import stats
| procedure | scipy.stats |
|---|---|
| Binomial pdf |
stats.binom.pmf(k,n,p)
|
| Binomial cdf |
stats.binom.cdf(k,n,p)
|
| Normal cdf |
stats.norm.cdf(x,mean,std)
|
| Inverse Normal or p-th Percentile |
stats.norm.ppf(p,mean,std)
|
| t distribution cdf |
stats.t.cdf(t,df,0,1)
|
| Inverse t or p-th Percentile |
stats.t.ppf(p,df,0,1)
|
| chi-square cdf |
stats.chi2.cdf(ch2,k-1)
|
| Inverse chi-square or p-th Percentile |
stats.chi2.ppf(p,k-1)
|
Adapted from Python for Introductory Statistics, by Simon Aman (Truman College, City Colleges of Chicago), licensed under CC BY 4.0. Changes were made: reformatted as an accessible XYZ web edition with live in-browser code cells. License: CC-BY-4.0.