The normal curve, z-scores and the central limit theorem

Parts 2 to 6 of Lecture 5 (slides 41–130), rebuilt as one storyline: where the bell curve comes from, how one table answers every normal-probability question, why averages of anything become normal, and what changes when the variables are dependent.

How to read this page. It needs the binomial and the expected value from Discrete random variables. The midterm covered the normal density but not the z-table or the CLT; the final will.

Teal = explanation added by Claude, not on the slides. Amber = watch out. Dropdowns hide worked examples, practice questions, and their answers.

The road through the lecture

Side stops: critical values, anecdotes vs distributions, Poisson planning, and two continuous models (uniform, exponential) that appear only on the practice sheets.

Lecture map: which slides each card covers

Part 1

Where the bell curve comes from

Repeated coin flips to the normal density, one piece of the formula at a time.

From the binomial to a bell

Flip a fair coin forty times and the most likely count is twenty heads, with the probabilities falling away symmetrically on both sides in a bell shape. Average many such experiments and the averages form the same bell.

A fair coin flipped \(N = 40\) times: the number of heads \(k\) that maximises the binomial probability is 20. The value decreases as it deviates from 20, and the curve looks like a bell, so we call it a bell curve.

Flip a coin 1,000 times: the mean of heads divided by 1,000 is approximately the probability of a head, 0.5. Do the whole experiment 1,000 times and plot the means: the value with the most experiments is around 0.5, and the plot forms a bell curve.

A single coin flip is a single probability; a few flips, the binomial distribution (a probability mass function); many flips, the normal distribution (a probability density function).

The slides show two things. First, the binomial itself looks bell-shaped once \(n\) is large. Second, the average of many repetitions is bell-shaped. The second is the central limit theorem in Part 4, and it holds for averages of almost anything, not only coins.

The normal density, built step by step

The bell curve is an exponential of a downward parabola. The parabola is centred at the mean, its width is set by the variance, the minus sign makes the curve fall away on both sides, and a constant in front makes the total area one.

A normal distribution has two parameters: mean \(\mu\) and variance \(\sigma^2\). For any outcome \(x\), the quadratic difference from \(\mu\) is \((x - \mu)^2\), a U-shaped parabola with its minimum at \(\mu\).

Divide by the variance: \((x - \mu)^2/\sigma^2\). With \(\sigma^2 = 4\) the curve is wider than with \(\sigma^2 = 1\); \(\sigma^2 = 1/4\) gives a narrower curve; \(\sigma^2 = 0\) would be a spike.

Put a minus sign and a half in front, \(-\tfrac12 (x-\mu)^2/\sigma^2\): the parabola now opens downward with its maximum 0 at \(x = \mu\). Take the exponential:

\[ f(x) = e^{-\frac{1}{2}\frac{(x-\mu)^2}{\sigma^2}} \]

The exponent is always \(\le 0\), so \(f(x) \le 1\) with the maximum \(f(\mu) = 1\): the value of \(x\) that maximises \(f\) is \(\mu\). As \(x \to \pm\infty\) the exponent goes to \(-\infty\) and \(f \to 0\).

The area under this curve is \(\sqrt{2\pi\sigma^2}\). Probability must add up to 1, so the true normal distribution is normalised by that constant:

\[ N(x;\ \mu, \sigma^2) = \frac{1}{\sqrt{2\pi\sigma^2}}\,e^{-\frac{1}{2}\frac{(x-\mu)^2}{\sigma^2}} \]

This is the probability density function (pdf). \(E(X) = \mu\) and \(V(X) = \sigma^2\). The cumulative probability \(F(x)\) is the area under the pdf to the left of \(x\): an S-shaped curve from 0 to 1 with \(F(\mu) = 0.5\).

This distribution describes the limit of computing a mean over any set of experiments: as long as you repeat an experiment many times, the mean of the results has a distribution like this.

Left: two normal densities with the same mean, the one with larger sigma lower and wider. Right: the corresponding S-shaped cdf reaching 0.5 at the mean
L5 s58: the pdf (left) and its cdf (right). The curve with \(\sigma_1 \lt \sigma_2\) is taller and narrower.
\(\mu\)
centre: the peak, which is also the median and the mode
\(\sigma\)
width: larger \(\sigma\) gives a lower, wider curve
\(1/\sqrt{2\pi\sigma^2}\)
the peak height; it makes the total area 1
\(X \sim N(\mu, \sigma^2)\)
"\(X\) is normal with mean \(\mu\) and variance \(\sigma^2\)"

The second parameter in \(N(\mu, \sigma^2)\) is the variance. \(N(500, 40^2)\) has standard deviation 40, not 1600. Before standardising, check whether the question hands you \(\sigma\) or \(\sigma^2\).

Where is the density largest; what happens when σ doubles; could a plus sign in the exponent give a density?
  1. At \(x = \mu\): the squared deviation is zero there, so the exponent reaches its maximum of zero and the exponential equals 1. Everywhere else the exponent is negative.
  2. Doubling \(\sigma\) doubles the horizontal scale (wider curve) and halves the peak height \(1/(\sigma\sqrt{2\pi})\). The area stays 1.
  3. No. A positive exponent grows as \(|x - \mu|\) grows, so the integral over the real line is infinite and no constant can normalise it to 1.

Part 2

The standard normal and z-scores

Convert any normal value to a z-score, read the table, translate the words into an area.

Why the normal matters, and the 68–95–99.7 rule

About two thirds of a normal variable's values lie within one standard deviation of the mean, 95 percent within two, and almost all within three. That rule works for any mean and any standard deviation.

Quantitative data vary a lot, so we need a model to understand the pattern of variation, compare individuals to the group, and predict. The normal distribution is bell-shaped and symmetric, defined by the mean \(\mu\) (centre) and the standard deviation \(\sigma\) (spread). Many real-world variables (heights, test scores, measurement errors) approximate it; the central limit theorem says averages of large samples tend to be normal even if the data are not; and it lets us compute chances of events.

Practical benefits: standardisation (z-scores) to compare different datasets; confidence intervals; hypothesis testing; decisions such as "how many meals for 95% of expected participants?"

The empirical rule: no matter what \(\mu\) and \(\sigma\) are, the area between \(\mu - \sigma\) and \(\mu + \sigma\) is about 68%; between \(\mu \pm 2\sigma\) about 95%; between \(\mu \pm 3\sigma\) about 99.7%. Almost all values fall within 3 standard deviations.

Properties: mean, mode and median are all equal; the curve is symmetric about \(\mu\); exactly half the values are left of centre and half right; the total area is 1 (100%).

Normal curve with bands labelled 34.1 percent on each side of the mean, 13.6 percent for the second standard deviation, 2.1 percent for the third and 0.1 percent beyond
L5 s56: the empirical rule, band by band. Each half of the curve is 50%.

From the figure, \(P(Z \gt 2) = 2.1\% + 0.1\% = 2.2\%\), close to the table's 2.28%. The bands are a fast sanity check for any z-table answer.

The z-score: distance from the mean in standard deviations

A z-score says how many standard deviations a value sits above or below its mean. It lets you compare scores from different scales, and it is the key that opens the standard normal table.

A standard normal model is a normal distribution with mean 0 and standard deviation 1.

\[ z = \frac{x - \mu}{\sigma} \]

\(z \gt 0\): above the mean. \(z \lt 0\): below the mean. \(|z|\): distance from the mean in standard-deviation units.

Comparing relative performance: maths 83% with class mean 81% and SD 7.3%; English 75% with class mean 55% and SD 8.5%.

\[ z_{\text{maths}} = \frac{83 - 81}{7.3} = 0.27,\qquad z_{\text{English}} = \frac{75 - 55}{8.5} = 2.35 \]

In maths you were only slightly above average; in English far above. You performed much better in English relative to the class.

Daily solar yield \(X \sim N(500, 40^2)\) kWh: \(x = 580\) gives \(z = (580 - 500)/40 = 2\), two standard deviations above the mean; \(P(X \gt 580) = 0.0228\), only about 2.28% of days.

Normalisation rescales into a fixed range; standardisation centres and rescales using mean and SD (s70).

Mean 100, SD 20: the z-score of 140?

\(z = (140 - 100)/20 = 2\).

Reading the standard normal table: below, above, between

The table gives the area to the left of a z-score, which is the probability of being below it. "Above" is one minus that, "between" is the difference of two lookups, and you should always draw and shade the curve before looking anything up.

The cdf of the standard normal, \(\Phi(z)\), is an integral that is not easy to evaluate, so it has been tabulated for \(\mu = 0\) and \(\sigma = 1\). That table serves every other \(\mu\) and \(\sigma\) through the z-score. By symmetry:

\[ \Phi(-a) = 1 - \Phi(a) \]

Reading the table: the row gives the first two digits of the z-score, the column the hundredths. Area to the left of \(z = 1.51\): 0.9345 (93.45%). For \(z = -0.33\): \(P(Z \lt -0.33) = 0.3707\), so \(P(Z \gt -0.33) = 0.6293\).

Steps (s72): draw a bell curve and shade the area asked for; find the picture that matches; the row/column intersection is the probability.

QuestionStandard-normal formCalculation
Below \(a\)\(P(X \le a)\)\(\Phi(z_a)\)
Above \(a\)\(P(X \gt a)\)\(1 - \Phi(z_a)\)
Between \(a\) and \(b\)\(P(a \lt X \lt b)\)\(\Phi(z_b) - \Phi(z_a)\)

Always standardise each boundary separately. Word problems involve the normal when they say "assume the variable is normally distributed" or "approximately normal"; then decide which type you have: between, more than / above, less than, or a lower cut-off.

Standard normal table for negative z from -3.4 to 0.0, rows by tenths and columns by hundredths, with the row for -0.3 and column .03 highlighted
L5 s68: the negative half of the table. Row −0.3, column .03 gives \(\Phi(-0.33) = 0.3707\).

Some tables list the area to the left, some the area between 0 and \(z\), some the upper tail. Check the picture at the top of the table before reading a number. For a continuous variable \(P(X \le a) = P(X \lt a)\): the boundary carries no probability.

Recipe

  1. Sketch and shade.
  2. \[ z = \frac{x - \mu}{\sigma} \] for each boundary.
  3. Look up \(\Phi(z)\) for each.
  4. Below: \(\Phi\). Above: \(1 - \Phi\). Between: difference.
  5. Sanity check against the empirical rule.
Bulb lifetimes N(1200, 100²): P(more than 1350 hours)
  1. \[ z = \frac{1350 - 1200}{100} = 1.5 \]
  2. \[ P = 1 - \Phi(1.5) = 1 - 0.9332 = 0.0668 \] About one bulb in fifteen.
Birth weights N(3300, 500²): P(2800 < X < 4000); the weight exceeded by only 5%
  1. \[ z_{2800} = -1.0,\qquad z_{4000} = 1.4 \]
  2. \[ P = \Phi(1.4) - \Phi(-1.0) = 0.9192 - 0.1587 = 0.760 \]
  3. Top 5%: the z with 95% below it is 1.645 (see critical values).
  4. \[ x = 3300 + 1.645 \times 500 = 4123 \text{ g} \]
Scores N(500, 100²): P(above 636), P(above 233), P(above 815)
  1. \[ z = 1.36:\quad 1 - \Phi(1.36) = 1 - 0.9131 = 0.0869 \]
  2. \[ z = -2.67:\quad 1 - \Phi(-2.67) = 1 - 0.0038 = 0.9962 \]
  3. \[ z = 3.15:\quad 1 - \Phi(3.15) = 1 - 0.9992 = 0.0008 \]

Critical values of the standard normal

A critical value is the table read backwards: given a tail area, which z cuts it off? Three of them come up constantly and are worth memorising.

Critical values correspond to specific probabilities under the standard normal curve. \(z_\alpha\) denotes the value on the \(z\) axis for which \(\alpha\) of the area lies to its right.

Two-tailed critical values, used when both extremes matter, split \(\alpha\) between the tails:

\[ \alpha = 0.10:\ \ z_{\alpha/2} = \pm 1.645 \quad (90\% \text{ confidence}) \] \[ \alpha = 0.05:\ \ z_{\alpha/2} = \pm 1.96 \quad (95\%) \] \[ \alpha = 0.01:\ \ z_{\alpha/2} = \pm 2.576 \quad (99\%) \]

For \(\alpha = 0.10\), \(\alpha/2 = 0.05\) and \(1 - \alpha/2 = 0.95\): 1.645 has 95% of the area to its left.

"Exceeded by only 5%" is one tail: \(z = 1.645\). "The middle 95%" is two tails of 2.5% each: \(z = \pm 1.96\). Say which one the question is before picking the number.

Part 3

Distributions in practice

Anecdote versus aggregate evidence, and a Poisson stock-level decision.

The counterexample method and why distributions matter

One ninety-year-old smoker does not disprove that smoking shortens life, because the claim is about averages, not about every person. A single case can show something is possible, never that it is typical.

In mathematics one counterexample disproves a universal claim ("all swans are white"). In statistics we almost never claim universals; we talk about tendencies: averages, probabilities, risk reductions. So one case, even a real one, cannot overturn a statement about the average effect in a population.

Claim in statistical form: "lower smoking prevalence increases average male lifespan". Aggregate evidence: 1950s–60s average male lifespan about 55–60 years (heavy-smoking era); today about 75. The mean moved up by 15–20 years. A 90-year-old heavy smoker is possible but rare, an outlier; outliers exist in almost every distribution and do not determine the mean. Letting one outlier overturn the mean would mean systematically bad decisions.

A distribution shows how values are spread across a population; a single point does not. Saying "smoking reduces average lifespan" does not mean every smoker dies early; it means the probability of dying earlier is much higher. In the 1950s distribution \(P(\text{live} \ge 90)\) was under 1%; today it is higher, but still not common.

Anecdote ≠ evidence. Look at the mean and the distribution, not the most memorable case.

"My relative smoked 40 years and lived to 95, so smoking is not harmful." What is wrong?

One person is a single draw from a distribution with wide spread. Surviving to 95 has non-zero probability for smokers, so the case is consistent with smoking being harmful. The claim can only be tested on the whole distribution, where smokers have a lower mean lifetime and a much higher risk of early death.

From probability to planning: catering with a Poisson model

To decide how many meals to prepare, you need the chance that attendance is at most your capacity, which is the cumulative probability, not the chance of hitting the capacity exactly. A buffer of ten percent over the mean turns out to be far more than enough when the mean is in the thousands.

Davos participation 2015–2024 suggests \(N \sim \text{Poisson}(\lambda)\) with \(\lambda \approx 3{,}150\). Expected participants \(E(N) = \lambda\); natural variability \(SD(N) = \sqrt\lambda \approx 56\). Capacity with a 10% buffer: \(C = 1.1\lambda = 3{,}465\).

The direct probability \(P(N = C)\) is the chance that exactly 3,465 show up, just one outcome. The cumulative probability \(P(N \le C)\) is the chance the meals are enough whether 3,465 or 3,400 or 3,000 show up. That is the correct service level, because as the manager you care whether stock suffices for all counts up to capacity.

\[ P(N \le C) = e^{-\lambda}\sum_{k=0}^{C}\frac{\lambda^k}{k!} \]

Term by term: \(P(N \le 0) = e^{-\lambda}\); \(P(N \le 1) = e^{-\lambda}(1 + \lambda)\); \(P(N \le 2) = e^{-\lambda}(1 + \lambda + \lambda^2/2!)\), and so on. In software: scipy.stats.poisson.cdf(C, λ), R ppois, Excel POISSON.DIST(C, λ, TRUE).

With \(\lambda = 3{,}150\) and \(C = 3{,}465\) the stock-out risk \(P(N \gt C)\) is below \(1.42 \times 10^{-8}\), far safer than needed.

Left: Poisson pmf with capacity 14 marked, bars up to 14 as sufficient and beyond as stock-out. Right: a Poisson with mean 3150 drawn as a bell with the capacity 3465 far in the right tail
L5 s88: with \(\lambda = 12\) and capacity 14 the service level is 0.772; with \(\lambda = 3{,}150\) a 10% buffer sits more than five standard deviations above the mean.

A 10% buffer is \(315\) meals, and the SD is only 56, so the capacity is \(z = 315/56 = 5.6\) standard deviations above the mean. For a Poisson with a large \(\lambda\) the normal approximation is excellent, and \(1 - \Phi(5.6)\) is about \(10^{-8}\). The size of the buffer should be set in standard deviations, not percent.

Weekly demand Poisson(4): how many units so that demand is met in at least 95% of weeks?
  1. \[ P(X \le 7) = 0.949,\qquad P(X \le 8) = 0.979 \]
  2. Stock 8 units. Stocking 7 leaves a 5.1% stock-out risk, just above the 5% limit.

Part 4

Sampling distributions and the central limit theorem

A statistic varies from sample to sample. The CLT says how.

Sampling distributions

Take a sample, compute a statistic, repeat: the statistic comes out different each time. The pattern of those values is the sampling distribution, and it tells you how far your one estimate is likely to be from the truth.

Inferential statistics makes predictions or inferences about a population from a sample. What proportion of all HBKU students drink coffee? You could email everyone, or sample.

Population of 21 cups, 15 green (drinks coffee) and 6 red: the parameter is \(15/21 = 71\%\). A sample of 5 might give 1 green, statistic 20%; another sample of 5 might give 3 green, statistic 60%. The sampling distribution is the distribution of a statistic, any statistic: proportions, standard deviations, variances, differences in means.

N.B. the parameter is the numeric summary of a population and is a fixed value. Statistics change based on the sample you are looking at.

Two useful theorems: the law of large numbers and the central limit theorem (s94).

As the sample size grows, the sample mean (or proportion) gets closer and closer to the population mean (or proportion). The CLT adds how it is spread around that target on the way there.

The central limit theorem: statement, conditions, mean and variance of the sample mean

Average enough independent draws from any distribution and the average is approximately normal, centred on the population mean, with a spread that shrinks like one over the square root of the sample size. The original data need not be normal at all.

The CLT states that the distribution of the mean of a large number of independent, identically distributed (i.i.d.) random variables approaches a normal distribution, regardless of the shape of the original distribution, as the sample size becomes large. It applies to discrete and continuous distributions.

Conditions: independence; identically distributed; sample size sufficiently large, typically \(n \ge 30\), although this depends on the original distribution. If the population is already normal, the sample size does not need to be large.

\[ \bar X_n \sim N\!\left(\mu,\ \frac{\sigma^2}{n}\right) \]
QuantityIndividual observation \(X\)Sample mean \(\bar X\)
Centre\(\mu\)\(\mu\)
Spread\(\sigma\)\(\sigma/\sqrt n\)
Shapemay be non-normalapproximately normal for sufficiently large \(n\)

\(n = 4\) gives SE \(= \sigma/2\); \(n = 64\) gives SE \(= \sigma/8\). Larger samples reduce the variability of the sample mean.

Proof of the mean (s99): by linearity of expectation,

\[ E[\bar X_n] = E\!\left[\frac{1}{n}\sum_{i=1}^{n} X_i\right] = \frac{1}{n}\sum_{i=1}^{n} E[X_i] = \frac{1}{n}\cdot n\mu = \mu \]

Proof of the variance (s100): the \(X_i\) are independent, so the variance of the sum is the sum of the variances, and \(\text{Var}(cX) = c^2\text{Var}(X)\):

\[ \text{Var}(\bar X_n) = \frac{1}{n^2}\sum_{i=1}^{n}\text{Var}(X_i) = \frac{1}{n^2}\cdot n\sigma^2 = \frac{\sigma^2}{n} \]

Importance (s101): lets us use the normal as an approximation for sums or averages even when the underlying distribution is unknown or non-normal; underpins hypothesis testing, confidence intervals, quality control and risk management; applications in polls, finance, machine learning.

Limitations (s102): needs a large sample (\(n \ge 30\)), especially for skewed or heavy-tailed data; needs independence (correlated time series may break it); needs identical distribution; does not apply to distributions with infinite variance (Cauchy); convergence can be slow for highly skewed data.

\(\bar X_n\)
the mean of a sample of size \(n\), a random variable
\(\sigma/\sqrt n\)
standard error (SE): the SD of the sample mean
i.i.d.
independent and identically distributed

The theorem is about the sample mean, not the individual observations. Dividing \(\sigma\) by \(\sqrt n\) is the step students skip most often; and it is the square root of \(n\), not \(n\).

Give an example where a normal approximation to the binomial is appropriate

Any binomial with large \(n\) and \(p\) not too close to 0 or 1, so that \(np\) and \(n(1-p)\) are both at least about 10: for example the number of heads in 100 fair flips, \(X \sim \text{Binomial}(100, 0.5)\), approximately \(N(50, 25)\). The ten-flip picture on the previous page already looks bell-shaped; a hundred flips is close to a perfect bell.

Probabilities for a sample mean

To get the chance that an average exceeds some value, standardise with the standard error instead of the standard deviation, then use the z-table exactly as before.

Energy-meter readings have \(\mu = 100\) and \(\sigma = 12\); a sample has \(n = 36\) readings.

\[ \sigma_{\bar X} = \frac{12}{\sqrt{36}} = 2 \] \[ z = \frac{104 - 100}{2} = 2 \] \[ P(\bar X \gt 104) = 1 - \Phi(2) = 1 - 0.9772 = 0.0228 \]

Only about 2.28% of samples of 36 readings have a mean above 104. Common error: use \(\sigma/\sqrt n\) for a sample mean, not \(\sigma\).

Dog show (s106): 250 dogs, mean weight 12 pounds, SD 8. Four dogs chosen at random; probability their average exceeds 25 pounds: SE \(= 8/\sqrt 4 = 4\), \(z = (25 - 12)/4 = 3.25\). Between 8 and 25 pounds (s108): \(z = -1\) and \(3.25\), so \(0.9994 - 0.1587 = 0.8407\).

L5 s106 reads the table as 0.994 and reports \(1 - 0.994 = 0.006\). The table value for \(z = 3.25\) is 0.9994, so the tail is 0.0006, ten times smaller. (The slide's "between" calculation on s108 uses the correct 0.9994.) Also, with \(n = 4\) and no statement that weights are normal, the CLT is being stretched; the slide assumes it anyway.

Recipe

  1. Identify \(\mu\), \(\sigma\), \(n\), and the value of the mean asked about.
  2. \[ \text{SE} = \frac{\sigma}{\sqrt n} \]
  3. \[ z = \frac{\bar x - \mu}{\text{SE}} \]
  4. Below, above or between with the table.
μ = 50, σ = 10, n = 25, P(mean > 52); and bulbs μ = 1000, σ = 200, n = 64
  1. \[ \text{SE} = \frac{10}{5} = 2,\qquad z = \frac{52 - 50}{2} = 1 \]
  2. \[ P(\bar X \gt 52) = 1 - 0.8413 = 0.1587 \]
  3. Bulbs: \[ \text{SE} = \frac{200}{8} = 25 \]
  4. \[ P(\bar X \lt 950):\quad z = -2,\quad \Phi(-2) = 0.0228 \]
  5. \[ P(980 \lt \bar X \lt 1020):\quad z = \pm 0.8,\quad 0.7881 - 0.2119 = 0.576 \]
μ = 70, σ = 12, n = 36: P(sample mean > 73)
  1. \[ \text{SE} = \frac{12}{6} = 2,\qquad z = \frac{73 - 70}{2} = 1.5 \]
  2. \[ P = 1 - 0.9332 = 0.0668 \]
Dog weights μ = 25 kg, σ = 6; n = 100: P(24 < sample mean < 26)
  1. \[ \text{SE} = \frac{6}{10} = 0.6,\qquad z = \pm\frac{1}{0.6} = \pm 1.67 \]
  2. \[ P = \Phi(1.67) - \Phi(-1.67) = 0.9525 - 0.0475 = 0.905 \]
20% of components fail; in a sample of 400, P(more than 24% fail)
  1. A proportion is a mean of 0/1 values, so the same theorem applies with \(\sigma^2 = p(1-p)\):
  2. \[ \text{SE} = \sqrt{\frac{0.2 \times 0.8}{400}} = 0.02 \]
  3. \[ z = \frac{0.24 - 0.20}{0.02} = 2.0,\qquad P = 1 - 0.9772 = 0.0228 \]

The proportion formula is not on the slides; it follows from the Bernoulli variance on the previous page.

Part 5

Dependent variables and covariance

When the variables move together, variances no longer simply add.

Variance and SD of a sum of dependent variables

The variance of a sum is the sum of the variances plus twice the covariance. If the variables rise and fall together the covariance is positive and the sum is more variable than independence would suggest.

When dealing with dependent random variables, we must account for their relationship through covariance when calculating variance and standard deviation.

\[ \text{Var}(X + Y) = \text{Var}(X) + \text{Var}(Y) + 2\,\text{Cov}(X, Y) \] \[ \text{Var}\!\left(\sum_{i=1}^{n} X_i\right) = \sum_{i=1}^{n}\text{Var}(X_i) + 2\sum_{i \lt j}\text{Cov}(X_i, X_j) \] \[ \text{SD}(X + Y) = \sqrt{\text{Var}(X) + \text{Var}(Y) + 2\,\text{Cov}(X, Y)} \]

Example: \(\text{Var}(X) = 4\), \(\text{Var}(Y) = 9\), \(\text{Cov}(X, Y) = 2\):

\[ \text{Var}(X + Y) = 4 + 9 + 2(2) = 17,\qquad \text{SD}(X + Y) = \sqrt{17} = 4.12 \]

Key points: the variance for dependent variables includes the individual variances and the covariance between them. If \(\text{Cov}(X, Y) \gt 0\) they tend to move together; if \(\lt 0\), oppositely. These formulas adjust for dependencies when calculating the spread of a combination of variables.

With \(\text{Cov} = 0\) the formula collapses to \(\text{Var}(X) + \text{Var}(Y)\), which is what the CLT proof on the previous card used. A negative covariance (a hedge) makes the sum less variable than either part.

Sampling distribution of the mean when observations are dependent

If the observations in a sample are correlated, the sample mean is more variable than the formula sigma over root n says. Positive covariance between observations inflates the standard error.

For dependent \(X_1, \dots, X_n\), the variance of the sample mean reflects not only the variability of individual variables but also how they covary:

\[ \text{Var}(\bar X) = \frac{1}{n^2}\left(\sum_{i=1}^{n}\text{Var}(X_i) + 2\sum_{i \lt j}\text{Cov}(X_i, X_j)\right) \] \[ \text{SE}(\bar X) = \frac{1}{n}\sqrt{\sum_{i=1}^{n}\text{Var}(X_i) + 2\sum_{i \lt j}\text{Cov}(X_i, X_j)} \]

When variables are positively correlated, the standard error increases, making estimates less precise.

Example: three dependent variables with variances 4, 6, 5 and covariances \(\text{Cov}(X_1, X_2) = 1\), \(\text{Cov}(X_1, X_3) = 2\), \(\text{Cov}(X_2, X_3) = 1.5\):

\[ \text{Var}(\bar X) = \frac{1}{9}\big(4 + 6 + 5 + 2(1 + 2 + 1.5)\big) = \frac{24}{9} = 2.67 \] \[ \text{SE}(\bar X) = \sqrt{2.67} = 1.63 \]

Conclusion: with dependent variables the sampling distribution has higher variance and standard error than with independent ones, because the dependence (captured by covariance) increases variability in sample estimates.

Ignoring the covariances, \(\text{Var}(\bar X)\) would be \(15/9 = 1.67\) and SE 1.29. The three positive covariances add \(9/9 = 1\) to the variance. This is the "independence" limitation of the CLT in numbers.

Estimating covariance from paired data

Covariance measures whether two variables tend to be above their means at the same time. Multiply the two deviations for each pair, add up, and divide by n minus one.

The covariance between \(X\) and \(Y\) measures how much they vary together: positive when one increases as the other increases, negative when one increases as the other decreases. From a sample:

\[ \text{Cov}(X, Y) = \frac{1}{n-1}\sum_{i=1}^{n}(X_i - \bar X)(Y_i - \bar Y) \]

Five students' scores on two tests: \(X = 85, 78, 92, 70, 88\); \(Y = 90, 85, 95, 80, 89\).

\[ \bar X = \frac{413}{5} = 82.6,\qquad \bar Y = \frac{439}{5} = 87.8 \]

Products of deviations: \(2.4 \times 2.2 = 5.28\); \((-4.6)(-2.8) = 12.88\); \(9.4 \times 7.2 = 67.68\); \((-12.6)(-7.8) = 98.28\); \(5.4 \times 1.2 = 6.48\). Sum 190.6.

\[ \text{Cov}(X, Y) = \frac{190.6}{4} = 47.65 \]

Divide the covariance by the two standard deviations and you get Pearson's \(r\) from page 2: \(r = \text{Cov}(X, Y)/(s_X s_Y)\). Covariance has units (score × score) and no fixed scale; \(r\) is unit-free and lives in \([-1, 1]\).

Recipe

  1. Means of \(X\) and \(Y\).
  2. Deviation of each \(x\), each \(y\); their product per pair.
  3. \[ \text{Cov} = \frac{\sum (x_i - \bar x)(y_i - \bar y)}{n-1} \]
X = 2, 4, 6, 8 and Y = 3, 7, 5, 11: sample covariance, then Var(X + Y)
  1. \[ \bar x = 5,\qquad \bar y = 6.5 \]
  2. Deviations \(x\): −3, −1, 1, 3; \(y\): −3.5, 0.5, −1.5, 4.5. Products 10.5, −0.5, −1.5, 13.5; sum 22.
  3. \[ \text{Cov} = \frac{22}{3} = 7.33 \]
  4. \[ s_x^2 = \frac{20}{3} = 6.67,\qquad s_y^2 = \frac{35}{3} = 11.67 \]
  5. \[ \text{Var}(X + Y) = 6.67 + 11.67 + 2(7.33) = 33.0 \]
  6. Check directly: \(X + Y = 5, 11, 11, 19\), mean 11.5, sample variance \((42.25 + 0.25 + 0.25 + 56.25)/3 = 33.0\) ✓

Part 6

Side topics from the practice sheets

Two continuous models the slides do not cover but the instructor's practice sheets ask about.

Uniform and exponential distributions

A uniform variable is equally likely anywhere in an interval, so probabilities are just lengths. An exponential variable is a waiting time with a constant rate, the continuous cousin of the geometric.

\[ f(x) = \frac{1}{b - a}\ \text{ for } a \le x \le b,\quad 0 \text{ otherwise} \] \[ \mu = \frac{a + b}{2},\qquad \sigma^2 = \frac{(b-a)^2}{12} \] \[ P(c \lt X \lt d) = \frac{d - c}{b - a} \]
\[ f(x) = \lambda e^{-\lambda x},\quad x \ge 0 \] \[ P(X \gt t) = e^{-\lambda t},\qquad \text{median} = \frac{\ln 2}{\lambda} \]

If events are Poisson with rate \(\lambda\), the gap between events is exponential with mean \(1/\lambda\).

Shuttle wait uniform on [0, 20] minutes: pdf, mean, SD, P(5 < X < 12)
  1. Total area 1, so \(20h = 1\): \[ f(x) = \tfrac{1}{20} = 0.05 \text{ for } 0 \le x \le 20 \]
  2. \[ \mu = 10,\qquad \sigma^2 = \frac{400}{12} = 33.33,\qquad \sigma = 5.77 \]
  3. \[ P(5 \lt X \lt 12) = \frac{7}{20} = 0.35 \]
Sensor lifetime exponential with mean 200 hours: P(lasts at least 250); the median lifetime
  1. \[ \lambda = \tfrac{1}{200} \]
  2. \[ P(X \ge 250) = e^{-250/200} = e^{-1.25} = 0.287 \]
  3. \[ \text{median} = 200\ln 2 = 138.6 \text{ hours} \] (below the mean, because the distribution is right-skewed)

Midterm practice Q21 (a confidence interval for a proportion) belongs to the post-midterm material and is not covered here.

Part 7

Exam toolkit

Which formula, when

The question asks for…UseCard
the peak, width or area of the bell\(\mu\), \(\sigma\), \(1/\sqrt{2\pi\sigma^2}\)Normal density
a rough share within 1, 2, 3 SD68%, 95%, 99.7%Empirical rule
compare values on different scales\(z = (x - \mu)/\sigma\)z-score
P(below / above / between)\(\Phi(z)\), \(1 - \Phi(z)\), \(\Phi(z_b) - \Phi(z_a)\)z-table
the value cut off by a tail area\(x = \mu + z_\alpha\sigma\), with 1.645 / 1.96 / 2.576Critical values
stock level for a service levelsmallest \(C\) with Poisson cdf \(\ge\) targetPoisson planning
probability for a sample meanSE \(= \sigma/\sqrt n\), then \(z = (\bar x - \mu)/\text{SE}\)Sample mean
probability for a sample proportionSE \(= \sqrt{p(1-p)/n}\)Sample mean
variance of a sum\(\text{Var}X + \text{Var}Y + 2\,\text{Cov}\)Dependence
SE of a mean of correlated data\(\frac1n\sqrt{\sum\text{Var} + 2\sum\text{Cov}}\)Sampling with dependence
covariance from pairs\(\sum(x_i-\bar x)(y_i-\bar y)/(n-1)\)Covariance
equally likely over an intervallength / total lengthUniform