Book contents

STATHARBOR ANALYTICS · INTRODUCTION TO STATISTICS · CHAPTER 6

The Normal Distribution

The normal distribution is the most important continuous distribution in statistics. Many natural phenomena are approximately normally distributed, and the central limit theorem shows that sample means tend towards a normal distribution even when the underlying data are not normally distributed.

Definition and Properties

A random variable XX has a Normal(μ,σ2\mu,\sigma^2) distribution if its density is $$f(x) = \frac{1}{\sigma \sqrt{2\pi}} \exp\Bigl(-\frac{(x-\mu)^2}{2\sigma^2}\Bigr), \quad -\infty < x < \infty.$$

Key properties:

Standardisation

Any Normal(μ,σ2\mu,\sigma^2) variable can be converted to a Standard Normal (mean 0, variance 1) via the transformation Z=(X−μ)/σZ = (X-\mu)/\sigma. If Z∼N(0,1)Z \sim N(0,1) then P(Z≤z)=Φ(z),P(Z \le z) = \Phi(z), where Φ\Phi is the cumulative distribution function of the standard normal. Tables of Φ\Phi values or software functions (e.g. ‘pnorm‘ in R, ‘scipy.stats.norm.cdf‘ in Python) provide probabilities.

Using the Normal Distribution

Probability Calculations

Consider IQ scores, which are often modelled as Normal(100, 152^2). What proportion of individuals have IQ above 130? Standardising: Z=(130−100)/15≈2Z = (130 - 100)/15 \approx 2. From a table, Φ(2)≈0.9772\Phi(2) \approx 0.9772. Thus P(X>130)=1−Φ(2)≈0.0228P(X > 130) = 1 - \Phi(2) \approx 0.0228.

R code for the probability:

pnorm(130, mean=100, sd=15, lower.tail=FALSE)

Python code using SciPy:

from scipy.stats import norm
prob_above_130 = norm.sf(130, loc=100, scale=15)  # sf = 1 - cdf

Quantiles

The 95th percentile of a Normal(μ,σ2\mu,\sigma^2) distribution is μ+z0.95σ\mu + z_{0.95} \sigma, where z0.95z_{0.95} is the 95th percentile of the standard normal (≈1.645\approx 1.645). In R, ‘qnorm(0.95, mean=, sd=)‘ returns this value.

Normal Approximation to the Binomial

When nn is large and pp is not too close to 0 or 1, the Binomial(n,pn,p) distribution can be approximated by a Normal distribution with mean npnp and variance np(1−p)np(1-p). A continuity correction (±0.5\pm 0.5) improves accuracy for discrete counts.

Worked example

Approximating a Binomial Distribution.

Suppose X∼Binomial(n=50,p=0.6)X \sim \text{Binomial}(n=50,p=0.6). We want P(X≤30)P(X \le 30). The exact probability can be computed, but the normal approximation gives insight.

from scipy.stats import binom, norm

n, p = 50, 0.6
k = 30

exact_prob = binom.cdf(k, n, p)

# Normal approximation with continuity correction
mu = n * p
sigma = (n * p * (1 - p))**0.5
z = (k + 0.5 - mu) / sigma
approx_prob = norm.cdf(z)

print(exact_prob, approx_prob)

The two probabilities are close: the approximation is often adequate for quick calculations when np(1−p)np(1-p) is large (>5).

Exercises

Practice

  1. If X∼N(5,22)X \sim N(5, 2^2), compute P(3≤X≤7)P(3 \le X \le 7) exactly using software. Standardise the problem and compute the probability manually using Φ\Phi values.

  2. The height of 10-year-old boys is approximately Normal with mean 140 cm and standard deviation 8 cm. What fraction of boys are taller than 155 cm? Use R, Python or Julia to compute the answer.

  3. Show that if X∼N(μ,σ2)X \sim N(\mu,\sigma^2) then aX+b∼N(aμ+b,a2σ2)aX + b \sim N(a\mu + b, a^2\sigma^2) for constants aa and bb. Verify this by simulation.

  4. The sample proportion p̂\hat{p} from a binomial sample of size nn and probability pp has mean pp and variance p(1−p)/np(1-p)/n. Use the normal approximation to construct a 95% confidence interval for pp when n=200n=200 and p̂=0.4\hat{p}=0.4. Compare to an exact binomial confidence interval.

References