Overview
The normal distribution is the standard probability distribution known as the Gaussian, or the bell curve. It is one or the most common distributions used in statistical modeling, usually because of its use in the central limit theorem. The normal distribution exhibits a characteristic bell shape.Formal Definition
The normal density function is given by
{% f(x) = \sqrt{1/2\pi \sigma^2 } \times e ^{-0.5 [(x-\mu)/\sigma]^2} %}
For multivariable distributions
{% f(\vec{x}| \vec{\mu}, \Sigma) = \frac{1}{(2\pi )^{D/2} | \Sigma | ^{1/2}} exp[-\frac{1}{2} (\vec{x} - \vec{\mu})^T \Sigma ^{-1} (\vec{x} - \vec{\mu}) ] %}
(see Murphy chpt 4)
Topics
- Maximum Entropy - the normal distribution is the distribution that results from maximizing the entropy of a distribution with mean 0 and variance 1.
- Sum of Normals
- Central Limit Theorem
- Linear Algebra Formulations
- Normal Vector Space
Tests of Normality
Most test of normality utilize the fact both the skew and kurtosis are zero for the normal distribution.Implementation
from scipy.stats import norm
# Define parameters for your normal distribution
mean = 0 # loc
std_dev = 1 # scale
x_value = 1.96
# 1. Calculate Cumulative Distribution Function (CDF)
# Probability of a value being less than or equal to x_value
cdf_probability = norm.cdf(x_value, loc=mean, scale=std_dev)
# 2. Calculate Probability Density Function (PDF)
# The height of the probability distribution at x_value
pdf_density = norm.pdf(x_value, loc=mean, scale=std_dev)
print(f"CDF at x={x_value}: {cdf_probability:.4f}")
print(f"PDF at x={x_value}: {pdf_density:.4f}")