Confidence Intervals and Sampling Distributions, ASTATS Midterm 2 – Study Notes
offline

Difficulty: Intermediate | Prerequisites: Basic probability, properties of the normal distribution, concept of a random variable.

Big Picture

Confidence intervals and sampling distributions sit at the heart of statistical inference. Once you know that a sample mean has its own distribution (the sampling distribution), you can quantify how far a single estimate might land from the true population parameter. This material builds directly on your understanding of the normal distribution and introduces the t-distribution, which accounts for the extra uncertainty that comes from estimating the population variance with the sample variance. Nearly every hypothesis test and interval estimate you will meet later in the course rests on these ideas.


TL;DR

When you draw a sample and compute a mean, that mean is itself a random variable with its own spread. A confidence interval uses that spread (estimated via the sample variance and the t-distribution) to build a range around the sample mean that, across many repetitions, captures the true population mean a stated percentage of the time.


Key Terms

Sampling distribution

The probability distribution of a statistic (such as the sample mean) computed from repeated random samples of the same size from the same population. Think of it as: if you could redo the experiment thousands of times, the histogram of all those sample means is the sampling distribution.

Standard error (SE)

The standard deviation of a statistic's sampling distribution. For the sample mean with known variance: SE = sigma / sqrt(n). In simple terms, this measures how much your sample mean wobbles from sample to sample.

Student's t-distribution

A bell-shaped distribution, symmetric around zero, that arises when you standardise the sample mean using the sample standard deviation rather than the population standard deviation. It has heavier tails than the normal, and those tails shrink toward the normal as degrees of freedom increase. Think of it as: the normal distribution's cautious cousin that accounts for extra uncertainty in small samples.

Degrees of freedom (df)

The number of independent pieces of information left after estimating a parameter. For a single sample of size n whose mean has been computed, df = n - 1.

Confidence interval (CI)

A range of values, constructed from sample data, designed so that in repeated sampling a stated proportion of such intervals will contain the true parameter. Think of it as: a net you cast around your estimate, wide enough to catch the true value most of the time.

Confidence level

The long-run proportion of confidence intervals that would contain the true parameter if you repeated the sampling procedure indefinitely. A 95% confidence level means 95 out of every 100 intervals constructed this way are expected to contain the true value.

Coverage probability

Synonymous with confidence level when applied to a particular interval procedure. It is the probability, before data are collected, that the interval will contain the true parameter value.


Core Content

How the Sample Mean Distributes

  • If X1, X2, ..., Xn are iid from a distribution with mean mu and variance sigma-squared, the sample mean X-bar = (X1 + ... + Xn) / n has:

    • E[X-bar] = mu (unbiased)

    • Var(X-bar) = sigma-squared / n

  • When the parent population is normal, X-bar is exactly normal regardless of n.

  • The quantity (X-bar - mu) / (sigma / sqrt(n)) follows a standard normal N(0,1).

Introducing the t-Statistic

  • In practice, sigma is unknown. Replace it with the sample standard deviation s, where s-squared = sum of (Xi - X-bar) squared, divided by (n - 1).

  • The quantity T = (X-bar - mu) / (s / sqrt(n)) follows a t-distribution with n - 1 degrees of freedom.

  • Key property: as df grows, t converges to the standard normal. For small n (say n = 4, df = 3), the tails are noticeably heavier.

Building a Confidence Interval

  • A two-sided CI at confidence level (1 - alpha) is: X-bar plus or minus t*(alpha/2, df) times s / sqrt(n).

  • The critical value t* comes from the t-table at the desired tail probability and degrees of freedom.

  • Example from the practice exam: with n = 4, df = 3, the value 0.978 is the t-critical for a specific confidence level with 3 degrees of freedom.

Interpreting Coverage Probability

  • Before data are observed, the CI is a random interval (both endpoints depend on the sample).

  • The probability statement applies to the procedure: across many samples, the stated proportion of intervals will contain mu.

  • Once you have computed a specific interval from observed data, saying it "contains mu with 82% probability" is technically about the method, not that particular interval. The parameter is fixed; the interval was random.

Mixture Distributions and the Law of Total Probability

  • When the data-generating distribution itself is random (e.g., sigma = 1 with probability 0.75, sigma = 2 with probability 0.25), use the law of total probability:

    • P(X-bar > 1) = P(X-bar > 1 | sigma = 1) * P(sigma = 1) + P(X-bar > 1 | sigma = 2) * P(sigma = 2).

  • Given X-bar > 1, you can use Bayes' theorem to compute the posterior probability that sigma took a particular value.


Formulas

Sample mean: X-bar = (X1 + X2 + ... + Xn) / n

Sample variance (unbiased): s-squared = [sum from i=1 to n of (Xi - X-bar) squared] / (n - 1)

Standard error of the mean: SE = s / sqrt(n) (or sigma / sqrt(n) when sigma is known)

t-statistic: T = (X-bar - mu) / (s / sqrt(n)), distributed as t with n - 1 degrees of freedom

Confidence interval (two-sided): X-bar plus or minus t*(alpha/2, n-1) times (s / sqrt(n))

Law of total probability (mixture case): P(A) = P(A | B1) * P(B1) + P(A | B2) * P(B2)

Bayes' theorem: P(B1 | A) = P(A | B1) * P(B1) / P(A)


Common Misconceptions

  • Students often think a 95% CI means there is a 95% probability that the true parameter lies inside their computed interval. It does not. The parameter is fixed; the interval is the random object. The 95% refers to the long-run success rate of the procedure.

  • Students sometimes confuse the standard deviation of the data (s) with the standard error of the mean (s / sqrt(n)). The standard error is always smaller because averaging reduces variability.

  • Students assume the t-distribution and the normal distribution are interchangeable for small samples. They are not. With n = 4 (df = 3), the t-distribution has substantially heavier tails, so the critical value is larger than the corresponding z-value.

  • Students forget that the formula for s-squared divides by (n - 1), not n. Dividing by (n - 1) corrects for the downward bias that comes from using the sample mean in place of the population mean.


Why It Matters / Exam Flags

⚠️ You will be asked to interpret what a confidence interval means and what probability statement it supports. Be precise: the probability applies before the data are collected, not after.

⚠️ Expect a question that mixes the law of total probability with sampling distributions, such as: "given a mixture of two possible sigmas, what is P(X-bar > c)?" and a follow-up Bayesian question reversing the conditioning.

⚠️ Know how to identify the correct t-critical value from degrees of freedom and a given confidence level. With n = 4, df = 3; with n = 10, df = 9.

⚠️ The practice exam uses 0.978 as the t-critical value. Recognising where that number comes from (t-table, df = 3, specific tail area) is likely testable.


Quick Self-Test

  1. True or false: The standard error of the sample mean increases as the sample size increases.

  1. Fill in the blank: The sample variance divides by ______ instead of n to produce an unbiased estimate of sigma-squared.

  1. True or false: A 90% confidence interval is wider than a 95% confidence interval, all else being equal.

  1. Fill in the blank: The t-distribution with df = infinity is identical to the ______ distribution.

  1. True or false: If mu = 0, the probability that X-bar is negative equals 0.5 (assuming a symmetric distribution centred at zero).

Answers: 1. False (it decreases). 2. n - 1. 3. False (a 90% CI is narrower). 4. Standard normal (N(0,1)). 5. True.


Practice Q&A

Q: Sarah draws n = 4 observations from a normal distribution with mu = 0 and computes X-bar. Her lower CI bound is X-bar - t times s / sqrt(4). What is the probability that this lower bound is negative?*

A: Because mu = 0 and the distribution of X-bar is symmetric around mu, there is a greater-than-50% chance the lower bound is negative. Specifically, the lower bound equals X-bar minus a positive quantity, so it is negative whenever X-bar itself is negative (probability 0.5) and also whenever X-bar is positive but smaller than the margin of error. The probability is 1 - alpha/2 for the corresponding confidence level (here, roughly 0.82 or 82% for t* = 0.978 with df = 3).

Q: What is the probability that the interval [lower value, upper value] contains 0?

A: By construction, the interval is a confidence interval for mu. Since mu = 0 here, the coverage probability equals the confidence level associated with the critical value 0.978 and df = 3. Looking up t = 0.978 with 3 degrees of freedom in a two-tailed table gives approximately 60% (the exact confidence level that corresponds to t* = 0.978).

Q: If sigma = 1 with probability 0.75 and sigma = 2 with probability 0.25 (with mu = 0 throughout), what is P(X-bar > 1)?

A: Apply the law of total probability. When sigma = 1: X-bar is N(0, 1/4), so P(X-bar > 1) = P(Z > 2) = 0.0228. When sigma = 2: X-bar is N(0, 1), so P(X-bar > 1) = P(Z > 1) = 0.1587. Combined: 0.75 * 0.0228 + 0.25 * 0.1587 = 0.0171 + 0.0397 = 0.0568.

Q: Given that X-bar > 1, what is the probability that sigma = 2?

A: Use Bayes' theorem. P(sigma = 2 | X-bar > 1) = P(X-bar > 1 | sigma = 2) * P(sigma = 2) / P(X-bar > 1) = (0.1587 * 0.25) / 0.0568 = 0.0397 / 0.0568 ≈ 0.699. So roughly 70%.


Connections to Other Topics

This connects to hypothesis testing because a CI and a two-sided test are two sides of the same coin: if the hypothesised value falls outside the CI, you reject at the corresponding alpha level. The Bayes' theorem component in the mixture problem previews the Bayesian updating logic you will see again in questions about prior and posterior probabilities (see the Hypothesis Testing study notes). The concept of standard error carries directly into two-sample inference and regression.


Related Terms / Search Tags

sampling distribution, standard error, t-distribution, Student's t, confidence interval, confidence level, coverage probability, degrees of freedom, t-critical value, margin of error, interval estimation, point estimate, law of total probability, Bayes' theorem, posterior probability, mixture distribution, normal distribution, sample mean, sample variance, unbiased estimator