SN1 2-5,6. The normal distribution-1,7. Central Limit Theorem-1

Table of contents

  1. Discrete Probability Distribution
  2. The Normal Distribution
  3. Central Limit Theorem
  4. Confidence Intervals
  5. Hypothesis Testing
  6. Inferences for Proportions
  7. The Student t-Distribution
  8. Chi-Square Tests

1. Discrete Probability Distribution

1.1 Random variables

A random variable is a variable whose values describe the outcome of an experiment. Random variables can be classified as either discrete or continuous 4 5.

Type of Random VariableDescription
Discrete random variableCan take on a list of values that are countable or finite in size.
Continuous random variableCan take on any value over an interval.

📝 If a coin is tossed three times, the number of heads (X) is a discrete random variable, taking values from {0, 1, 2, 3}. The weight of a randomly selected adult cow is a continuous random variable, as it can be any value within a range 4 5.

1.2 Probability distribution for a discrete RV

A discrete probability distribution is a function or table that assigns a probability, P(x)P(x), to each value of a discrete random variable xx. For a function to be a valid discrete probability distribution, it must satisfy two conditions:

  • Non-negativity: The probability of each value of xx must be greater than or equal to 0, meaning P(x)≥0P(x) \ge 0 for all xx.
  • Summation to one: The sum of all probabilities for all possible values of xx must equal 1, meaning ∑all xP(x)=1\sum_{\text{all } x} P(x) = 1 7.
x (Number of Heads)P(x)
01/8
13/8
23/8
31/8
Total1

📝 For three coin tosses, where xx is the number of heads, the sample space is {TTT, TTH, THT, HTT, THH, HTH, HHT, HHH}. The probability of getting 0 heads, P(x=0)P(x=0), is 1/81/8 (TTT). The sum of all probabilities is 1/8+3/8+3/8+1/8=8/8=11/8 + 3/8 + 3/8 + 1/8 = 8/8 = 1 8.

1.3 Expected value

The expected value of a discrete random variable xx, denoted as E(x)E(x) or μ\mu, represents the mean of its probability distribution. It is calculated as a weighted average where each xx value is multiplied by its corresponding probability, and these products are then summed. μ=E(x)=∑all xx⋅P(x)\mu = E(x) = \sum_{\text{all } x} x \cdot P(x) The expected value is the long-run average outcome of an experiment, even if it is not a possible outcome itself.

📝 For the number of heads in three coin tosses, the expected value is E(x)=0(1/8)+1(3/8)+2(3/8)+3(1/8)=1.5E(x) = 0(1/8) + 1(3/8) + 2(3/8) + 3(1/8) = 1.5. This means that over many sets of three coin tosses, the average number of heads would be 1.5, even though you cannot get exactly 1.5 heads in a single experiment 13.

1.4 Variance and standard deviation

Variance (σ2\sigma^2) and standard deviation (σ\sigma) measure the spread or dispersion of a discrete probability distribution.

  • Variance: It is computed by multiplying each possible value of (x−μ)2(x - \mu)^2 by its probability, and then summing these products. σ2=E(x−μ)2=∑all x(x−μ)2P(x)\sigma^2 = E(x - \mu)^2 = \sum_{\text{all } x} (x - \mu)^2 P(x)
  • Standard deviation: This is the square root of the variance 16. σ=σ2=∑(x−μ)2P(x)\sigma = \sqrt{\sigma^2} = \sqrt{\sum (x - \mu)^2 P(x)} A computational formula for variance can sometimes be easier to use: σ2=∑x2P(x)−μ2\sigma^2 = \sum x^2 P(x) - \mu^2 18.

📝 For the number of heads in three coin tosses, with an expected value μ=1.5\mu = 1.5, the variance is calculated as σ2=(0−1.5)2(1/8)+(1−1.5)2(3/8)+(2−1.5)2(3/8)+(3−1.5)2(1/8)=0.75\sigma^2 = (0-1.5)^2(1/8) + (1-1.5)^2(3/8) + (2-1.5)^2(3/8) + (3-1.5)^2(1/8) = 0.75. The standard deviation is 0.75≈0.866\sqrt{0.75} \approx 0.866 heads 17.

1.5 The binomial distribution

A binomial experiment models repeated trials with only two outcomes and constant odds. It has specific characteristics:

  • Identical and independent trials: The experiment consists of nn trials that are identical and do not influence each other.
  • Two outcomes: Each trial results in one of two possible outcomes, typically labeled "success" or "failure".
  • Constant probability of success: The probability of success, denoted as pp, remains the same for every trial.
  • Constant probability of failure: The probability of failure, denoted as qq, is 1−p1-p, and p+q=1p+q=1 20.

The binomial probability distribution, B(x;n,p)B(x; n, p), describes the probability of getting exactly xx successes in nn independent trials. P(x)=n!x!(n−x)!pxqn−xP(x) = \frac{n!}{x!(n-x)!} p^x q^{n-x} Here, xx can take integer values from 00 to nn.

  • Mean: The expected number of successes is μ=np\mu = np.
  • Variance: The variance of the number of successes is σ2=npq\sigma^2 = npq 21.

📝 If you place a $1 Odd-or-Even bet on 5 different roulette games, where the probability of winning is p=18/38p = 18/38, this is a binomial experiment with n=5n=5 and p=18/38p=18/38. The probability of never winning (x=0x=0) is P(x=0)=5!0!(5−0)!(1838)0(2038)5≈0.0438P(x=0) = \frac{5!}{0!(5-0)!} (\frac{18}{38})^0 (\frac{20}{38})^5 \approx 0.0438 22.

2. The Normal Distribution

2.1 Introduction

A continuous random variable can assume any value within a given interval, such as height or weight. Unlike discrete variables, the probability of a continuous random variable equaling a specific value is always zero, meaning probabilities are only calculated for intervals 32 33.

2.2 The Normal Distribution

The normal distribution, often called the bell curve, models many real-world phenomena like test scores, assembly times, and birth weights. It is characterized by its mean (μ\mu) and standard deviation (σ\sigma) 35.

  • Key properties of N(x; μ\mu, σ\sigma):
  • It is bell-shaped and symmetrical around the mean μ\mu.
  • The mean, median, and mode are all equal.
  • The total area under the curve is 1.
  • Due to symmetry, P(x < μ\mu) = P(x > μ\mu) = 0.5.
  • Its shape is entirely determined by μ\mu and σ\sigma 35.
  • Probability Density Function (PDF): The normal PDF is given by f(x)=1σ2πe−(x−μ)2/2σ2f(x) = \frac{1}{\sigma\sqrt{2\pi}}e^{-(x-\mu)^2/2\sigma^2}, where μ\mu is the population mean and σ\sigma is the population standard deviation.
  • Effect of parameters:
  • Changing μ\mu shifts the curve horizontally without altering its shape.
  • A smaller σ\sigma results in a taller, narrower curve.
  • A larger σ\sigma leads to a shorter, wider curve 36.
RangeApproximate Area
µ−σ<x<µ+σµ - σ < x < µ + σ68%
µ−2σ<x<µ+2σµ - 2σ < x < µ + 2σ95%
µ−3σ<x<µ+3σµ - 3σ < x < µ + 3σ99.7%

The Empirical Rule states that for a normal distribution, approximately 68% of the data falls within one standard deviation of the mean, 95% within two, and 99.7% within three 37.

2.3 The z-Score

The z-score standardizes any normal random variable x into a standard normal variable z, which has a mean of 0 and a standard deviation of 1. The formula for the z-score is z=x−μσz = \frac{x-\mu}{\sigma} 39.

  • Standard normal distribution: This distribution, denoted N(0, 1), has a density function f(z)=12πe−12z2f(z) = \frac{1}{\sqrt{2\pi}}e^{-\frac{1}{2}z^2}.
  • Key equivalence: Probabilities for a normal variable x can be converted to probabilities for the standard normal variable z: P(a<x<b)=P(za<z<zb)P(a < x < b) = P(z_a < z < z_b), where za=a−μσz_a = \frac{a-\mu}{\sigma} and zb=b−μσz_b = \frac{b-\mu}{\sigma} 39.

📝 To convert a height of 5 feet to a z-score, given μ=5′9′′\mu = 5'9'' and σ=3′′\sigma = 3'', the calculation is z=5′−5′9′′3′′=−9′′3′′=−3z = \frac{5' - 5'9''}{3''} = \frac{-9''}{3''} = -3 40.

2.4 Standard Normal Table

The standard normal table provides the area under the standard normal curve from z=0z = 0 to a positive value z∗z^\ast. This area represents P(0<z<z∗)P(0 < z < z^\ast) 42.

  • Symmetry properties:
  • P(−z∗<z<0)=P(0<z<z∗)P(-z^\ast < z < 0) = P(0 < z < z^\ast).
  • P(z<0)=P(z>0)=0.5P(z < 0) = P(z > 0) = 0.5 42.
CaseProbability Calculation
Between 0 and z∗z^\astP(0<z<z∗)P(0 < z < z^\ast)
Right of z∗z^\ast0.5−P(0<z<z∗)0.5 - P(0 < z < z^\ast)
Left of −z∗-z^\ast0.5−P(0<z<z∗)0.5 - P(0 < z < z^\ast)
Straddling 0P(−z1<z<0)+P(0<z<z2)P(-z_1 < z < 0) + P(0 < z < z_2)
Same side of 0P(0<z<z2)−P(0<z<z1)P(0 < z < z_2) - P(0 < z < z_1)
  • Finding z0z_0 from an area: To find a z-score (z0z_0) given a probability, locate the probability value in the body of the standard normal table and then identify the corresponding z-score. For example, if P(0<z<z0)=0.1950P(0 < z < z_0) = 0.1950, then z0=0.51z_0 = 0.51. If P(z<z0)=0.0250P(z < z_0) = 0.0250, this implies a left-tail area, so P(0<z<−z0)=0.5−0.0250=0.4750P(0 < z < -z_0) = 0.5 - 0.0250 = 0.4750, leading to z0=−1.96z_0 = -1.96 44.

2.5 Probability Calculations with N(μ\mu, σ\sigma)

To calculate probabilities for a normal distribution N(μ\mu, σ\sigma), convert the x-values to z-scores using z=x−μσz = \frac{x-\mu}{\sigma} and then use the standard normal table 46.

  • Steps for probability questions:
  1. Standardize each boundary value using the z-score formula.
  2. Sketch the normal curve and shade the region corresponding to the desired probability.
  3. Read the relevant area(s) from the N(0, 1) table.
  4. Combine the areas using addition or subtraction, as needed, considering symmetry 46.

📝 For Montreal July temperatures, x∼N(μ=23.5∘C,σ=3.5∘C)x \sim N(\mu = 23.5^\circ C, \sigma = 3.5^\circ C): (a) To find P(x>25)P(x > 25), calculate z0=25−23.53.5=0.43z_0 = \frac{25-23.5}{3.5} = 0.43. Then P(z>0.43)=0.5−0.1664=0.3336P(z > 0.43) = 0.5 - 0.1664 = 0.3336. (b) To find P(x<18)P(x < 18), calculate z0=18−23.53.5=−1.57z_0 = \frac{18-23.5}{3.5} = -1.57. Then P(z<−1.57)=0.5−0.4418=0.0582P(z < -1.57) = 0.5 - 0.4418 = 0.0582. (c) To find P(25<x<30)P(25 < x < 30), calculate z1=0.43z_1 = 0.43 and z2=30−23.53.5=1.86z_2 = \frac{30-23.5}{3.5} = 1.86. Then P(0.43<z<1.86)=0.4686−0.1664=0.3022P(0.43 < z < 1.86) = 0.4686 - 0.1664 = 0.3022 47.

  • Working backwards for x0x_0, μ\mu, or σ\sigma: The standardization equation z0=x0−μσz_0 = \frac{x_0-\mu}{\sigma} can be rearranged to solve for any unknown variable if the other three are known.
  • Finding μ\mu: If 12.3% of Montrealers are over 60 years old (σ=15\sigma = 15), and the corresponding z-score is 1.16, then 1.16=60−μ151.16 = \frac{60-\mu}{15}, which yields μ=42.6\mu = 42.6 years.
  • Finding σ\sigma: If 83.4% of aptitude test scores exceed 350 (μ=375\mu = 375), and the corresponding z-score is -0.97, then −0.97=350−375σ-0.97 = \frac{350-375}{\sigma}, which yields σ=25.8\sigma = 25.8 49.

2.6 Normal Approximation to the Binomial

The normal distribution can approximate the binomial distribution B(x; n, p) when certain conditions are met. For a binomial distribution, the mean is npnp and the variance is np(1−p)np(1-p) 51.

  • Condition for approximation: The approximation is valid if np≥5np \ge 5 and nq≥5nq \ge 5, where q=1−pq = 1-p.
  • Approximation formula: B(x;n,p)≈N(x;np,np(1−p))B(x; n, p) \approx N(x; np, \sqrt{np(1-p)}).
  • Continuity correction: Since the binomial distribution is discrete and the normal distribution is continuous, a continuity correction is applied. A discrete value x0x_0 is represented by the interval [x0−12,x0+12][x_0 - \frac{1}{2}, x_0 + \frac{1}{2}] 51.
Binomial ProbabilityNormal Approximation with Continuity Correction
P(x=x0)P(x = x_0)P(x0−12<x<x0+12)P(x_0 - \frac{1}{2} < x < x_0 + \frac{1}{2})
P(x≥k)P(x \ge k)P(x>k−12)P(x > k - \frac{1}{2})
P(x≤k)P(x \le k)P(x<k+12)P(x < k + \frac{1}{2})

📝 For a multiple-choice test with 48 questions and 4 choices each, where a student guesses randomly, the binomial distribution is B(x;48,14)B(x; 48, \frac{1}{4}). This can be approximated by N(x;12,3)N(x; 12, 3). To find the probability of exactly 10 correct answers using the normal approximation, calculate z1=9.5−123=−0.83z_1 = \frac{9.5-12}{3} = -0.83 and z2=10.5−123=−0.50z_2 = \frac{10.5-12}{3} = -0.50. Then P(9.5<x<10.5)≈0.2967−0.1915=0.1052P(9.5 < x < 10.5) \approx 0.2967 - 0.1915 = 0.1052 53.

3. Central Limit Theorem

3.1 Sampling distributions and sample means

A sampling distribution is the probability distribution of all possible sample means for samples of the same size nn drawn from a population. When we take multiple random samples from a population, each sample typically yields a different mean 57 60.

  • Population parameter: This describes a characteristic of the entire population, such as the population mean (μ\mu) or standard deviation (σ\sigma).
  • Sample statistic: This is a value calculated from a selected sample, such as the sample mean (xˉ\bar{x}) or sample standard deviation (ss) 58.
  • One observation (X): This refers to the value of a single randomly selected item from the population.
  • Mean of n observations (Xˉ\bar{X}): This is the average of nn random draws, calculated as Xˉ=X1+X2+⋯+Xnn\bar{X} = \frac{X_1 + X_2 + \dots + X_n}{n} 59.

3.2 Variation of sample means

When drawing samples with replacement, each draw is independent, and repeated values are allowed. The distribution of sample means tends to be more concentrated around the population mean compared to the distribution of individual values 62 65.

📝 Consider a population of three tokens with values 1, 3, and 5. The population mean μ=3\mu = 3 and standard deviation σ≈1.633\sigma \approx 1.633. If two tokens are drawn with replacement, the possible sample means range from 1 to 5, but means closer to 3 (e.g., 2, 3, 4) occur more frequently than extreme values (e.g., 1, 5) 61 63 64.

3.3 Mean and standard deviation of the sample mean 70

The mean of the sampling distribution of Xˉ\bar{X}, denoted μXˉ\mu_{\bar{X}}, is equal to the population mean μ\mu. The standard deviation of the sample mean, known as the standard error (SE), measures the sampling variation in the estimate and is calculated as σXˉ=σn\sigma_{\bar{X}} = \frac{\sigma}{\sqrt{n}} 66 69 71 72.

  • Expected value of individual draws: For every position ii, the expected value of an individual draw E(Xi)E(X_i) is equal to the population mean μ\mu 68.
  • Expected value of sample mean: E(Xˉ)=E(X1+⋯+Xnn)=E(X1)+⋯+E(Xn)n=nμn=μE(\bar{X}) = E\left(\frac{X_1 + \dots + X_n}{n}\right) = \frac{E(X_1) + \dots + E(X_n)}{n} = \frac{n\mu}{n} = \mu 69.
  • Variance of sample mean: For independent draws, Var(Xˉ)=Var(X1+⋯+Xnn)=σ2+⋯+σ2n2=nσ2n2=σ2nVar(\bar{X}) = Var\left(\frac{X_1 + \dots + X_n}{n}\right) = \frac{\sigma^2 + \dots + \sigma^2}{n^2} = \frac{n\sigma^2}{n^2} = \frac{\sigma^2}{n} 72.
  • Assumptions: These formulas hold when observations come from the same population distribution, draws are independent, and the population has a finite mean and standard deviation. For sampling without replacement, the standard error is an approximation if the sample is a small fraction (at most 10%) of the population 74.
QuantityWhat varies?Token example (n=2)
σ\sigmaIndividual draws1.633
σXˉ=σ/n\sigma_{\bar{X}} = \sigma/\sqrt{n}Means of samples of size n1.155

📝 If the population standard deviation is σ=12\sigma = 12, increasing the sample size nn reduces the standard error. For n=1n=1, SE is 12; for n=4n=4, SE is 6; for n=16n=16, SE is 3; and for n=64n=64, SE is 1.5. Multiplying nn by 4 divides the standard error by 2 73.

3.4 The Central Limit Theorem (CLT) 80

The Central Limit Theorem states that for independent draws from the same population with a finite mean (μ\mu) and finite standard deviation (σ\sigma), as the sample size (nn) becomes large, the standardized sample mean approaches a standard normal distribution. This means that Xˉ−μσ/n\frac{\bar{X} - \mu}{\sigma/\sqrt{n}} is approximately N(0,1)N(0, 1) 77.

  • Normal population: If individual observations XX are normally distributed N(μ,σ)N(\mu, \sigma), then the sample mean Xˉ\bar{X} is exactly normally distributed N(μ,σn)N\left(\mu, \frac{\sigma}{\sqrt{n}}\right) for any sample size nn 76.
  • Non-normal populations: For other population distributions, the CLT provides a normal approximation for Xˉ\bar{X} when nn is sufficiently large 75 77.
  • "Large enough" sample size: A common guideline is n≥30n \ge 30, but this is not a universal rule. A roughly symmetric population may require fewer observations, while strongly skewed or extreme populations may need much larger samples. A large sample improves the normal approximation but cannot correct for biased sampling 78.
QuantityMeanStandard Deviation
One tree10.5 inches1.45 inches
Mean of 10 trees10.5 inches1.45/10≈0.461.45/\sqrt{10} \approx 0.46 inches
Mean of 30 trees10.5 inches1.45/30≈0.261.45/\sqrt{30} \approx 0.26 inches
Mean of 200 trees10.5 inches1.45/200≈0.101.45/\sqrt{200} \approx 0.10 inches

📝 For a skewed population, as nn increases, the sampling distribution of Xˉ\bar{X} becomes less skewed and has a smaller spread, approaching a normal shape 79.

3.5 Using z-scores for sample means

To calculate probabilities involving sample means, it is crucial to distinguish between an individual observation and a sample mean. The appropriate z-score formula must be used based on what the question asks about 81.

QuantityZ-score formula
Individual observation (X)z=x−μσz = \frac{x - \mu}{\sigma}
Sample mean (Xˉ\bar{X})z=xˉ−μσ/nz = \frac{\bar{x} - \mu}{\sigma/\sqrt{n}}

A routine for probability questions involves identifying whether the question concerns XX or Xˉ\bar{X}, checking if a normal model is justified (exact or approximate), calculating the standard error for Xˉ\bar{X}, converting boundaries to z-scores, and finding the correct normal area. Φ(z)=P(Z≤z)\Phi(z) = P(Z \le z) denotes the standard normal cumulative probability 82.

📝 For CO2 measurements with μ=395\mu = 395 ppm, σ=105\sigma = 105 ppm, and n=16n = 16, the standard error is SE=10516=26.25SE = \frac{105}{\sqrt{16}} = 26.25 ppm. Since the population is normal, Xˉ∼N(395,26.25)\bar{X} \sim N(395, 26.25) exactly. To find P(Xˉ>410)P(\bar{X} > 410), calculate z=410−39526.25≈0.5714z = \frac{410 - 395}{26.25} \approx 0.5714. Then P(Xˉ>410)=1−Φ(0.5714)≈0.2839P(\bar{X} > 410) = 1 - \Phi(0.5714) \approx 0.2839 83 84.

3.6 When σ\sigma is unknown

When the population standard deviation (σ\sigma) is unknown, it is estimated using the sample standard deviation (ss). The estimated standard error is SE^=sn\hat{SE} = \frac{s}{\sqrt{n}} 95.

  • t-distribution: For a normal population with unknown σ\sigma, the statistic Xˉ−μS/n\frac{\bar{X} - \mu}{S/\sqrt{n}} follows a t-distribution with n−1n-1 degrees of freedom.
  • Normal approximation: For large samples, a standard normal approximation can still be useful even when σ\sigma is unknown.
  • Actual vs. estimated SE: The actual standard deviation of Xˉ\bar{X} is σ/n\sigma/\sqrt{n}, while s/ns/\sqrt{n} is an estimate of it 95.

📝 For individual package weights that are normally distributed with μ=500\mu = 500 g and σ=20\sigma = 20 g:

  1. To find P(X>510)P(X > 510) for one package, use σ=20\sigma = 20: z=510−50020=0.5z = \frac{510 - 500}{20} = 0.5, so P(X>510)≈0.3085P(X > 510) \approx 0.3085.
  2. To find P(Xˉ>510)P(\bar{X} > 510) for 16 independent packages, use SE=2016=5SE = \frac{20}{\sqrt{16}} = 5: z=510−5005=2z = \frac{510 - 500}{5} = 2, so P(Xˉ>510)≈0.0228P(\bar{X} > 510) \approx 0.0228. The probabilities differ because averages vary less than individual observations, making an average 10 g above the mean more unusual than a single package 10 g above the mean 96 97.

4. Confidence Intervals

4.1 Estimating a population mean 104

A confidence interval estimates an unknown population mean (μ\mu) using a sample mean (xˉ\bar{x}) and accounts for uncertainty. A single sample mean is the best point estimate for the population mean, but it will vary between samples 100 101 102.

  • Sample mean (xˉ\bar{x}): This is calculated from the collected data and is a known value.
  • Population mean (μ\mu): This is the unknown quantity we aim to estimate for the entire population 101.
  • Confidence interval structure: It is expressed as xˉ±E\bar{x} \pm E, where EE is the margin of error 102.
  • Interval interpretation: The sample mean is the center of the interval, and the margin of error is the distance from the center to either end. The total width of the interval is twice the margin of error 103.
QuantityPopulationSample
Meanμ\mu (unknown target)xˉ\bar{x} (our estimate)
Standard deviationσ\sigmass

4.2 Confidence level and critical values 107 144

The confidence level expresses the reliability of the interval method, typically as (1−α)×100%(1-\alpha) \times 100\%. The value α\alpha represents the total area outside the middle region of the sampling distribution, with α/2\alpha/2 in each tail for a two-sided interval 105.

  • Critical value (zα/2z_{\alpha/2}): This is the positive value on the standard normal distribution that has an area of α/2\alpha/2 to its right. It determines how many standard errors are allowed on each side of the sample mean 106 108.
  • Interpretation of confidence: If the process of taking samples and constructing intervals were repeated many times, approximately (1−α)×100%(1-\alpha) \times 100\% of these intervals would contain the true population mean. The population mean remains fixed, while the sample and interval change with each repetition 114.
  • Misinterpretations: A confidence interval does not mean that (1−α)×100%(1-\alpha) \times 100\% of individual data points fall within the range, nor that (1−α)×100%(1-\alpha) \times 100\% of sample means lie within this specific interval 116.
Confidence1−α1-\alphaα\alphaα/2\alpha/2zα/2z_{\alpha/2}
90%0.900.100.051.645
95%0.950.050.0251.960
99%0.990.010.0052.576

📝 For a 95% confidence interval, 1−α=0.951-\alpha = 0.95, so α=0.05\alpha = 0.05. This means α/2=0.025\alpha/2 = 0.025, and the critical value z0.025z_{0.025} is 1.96 105 106.

4.3 Margin of error and standard error

The margin of error (EE) quantifies the uncertainty in the estimate and is calculated as the critical value multiplied by the standard error 108.

  • Standard error: This measures how much sample means are expected to vary from one sample to another 108.
  • Estimated standard error: When the population standard deviation (σ\sigma) is unknown, the sample standard deviation (ss) is used to estimate the standard error as s/ns/\sqrt{n}.
  • Difference between standard deviation and standard error: Standard deviation (ss) describes the variation among individual observations, while standard error (s/ns/\sqrt{n}) describes the variation among sample means. Averaging multiple observations makes the sample mean a more stable result than a single observation 109.

📝 For a sample of 50 eggs with a sample standard deviation (ss) of 14.9 mg, the estimated standard error is 14.9/50≈2.1114.9 / \sqrt{50} \approx 2.11 mg 109.

4.4 Large-sample confidence interval for μ\mu (unknown σ\sigma)

For large random samples (typically n>30n > 30), when the population standard deviation (σ\sigma) is unknown, the sample standard deviation (ss) is used with the zz-critical value. This is considered a large-sample approximation 110 147.

  • Formula: The confidence interval for μ\mu is given by xˉ±zα/2sn\bar{x} \pm z_{\alpha/2} \frac{s}{\sqrt{n}} 110.
  • Conditions: This method assumes random, independent observations and no extreme skewness or outliers in the population. If sampling without replacement, the sample size should not exceed 10% of the population 112 123.

📝 A sample of 50 eggs has xˉ=188.6\bar{x} = 188.6 mg and s=14.9s = 14.9 mg. To construct a 90% confidence interval, zα/2=1.645z_{\alpha/2} = 1.645. The margin of error E=1.645×(14.9/50)≈3.47E = 1.645 \times (14.9 / \sqrt{50}) \approx 3.47 mg. The interval is 188.6±3.47188.6 \pm 3.47, which is (185.1,192.1)(185.1, 192.1) mg. We are 90% confident that the population mean cholesterol content is between 185.1 mg and 192.1 mg 111 112 113.

4.5 Theoretical basis for confidence intervals

The method works by reversing the viewpoint of the sampling distribution of sample means. If a sample mean (xˉ\bar{x}) falls within EE of the population mean (μ\mu), then the interval constructed around xˉ\bar{x} will capture μ\mu 117 118.

  • Sampling distribution: If σ\sigma is known and the sampling distribution of Xˉ\bar{X} is normal, then (1−α)×100%(1-\alpha) \times 100\% of sample means fall within E=zα/2σnE = z_{\alpha/2} \frac{\sigma}{\sqrt{n}} of μ\mu 117.
  • Capture rate: The critical value is chosen so that the middle area of the sampling distribution is 1−α1-\alpha. Any sample mean falling within this middle region will produce a confidence interval that contains μ\mu 120.

4.6 Choosing the correct formula

The choice of formula for a confidence interval depends on whether the population standard deviation (σ\sigma) is known and the sample size (nn) 122 154.

  • Conditions for all intervals:
  • Use a random sample with independent observations.
  • If sampling without replacement, the sample size should be no more than 10% of the population.
  • Population shape considerations:
  • Small sample (n≤30n \le 30): Assume an approximately normal population with no serious outliers.
  • Large sample (n>30n > 30): Normality is less restrictive due to the Central Limit Theorem, but extreme skewness or outliers can still pose problems 123.
ConditionFormulaCritical Value
σ\sigma is knownxˉ±zα/2σn\bar{x} \pm z_{\alpha/2} \frac{\sigma}{\sqrt{n}}zα/2z_{\alpha/2}
σ\sigma is unknown, n>30n > 30xˉ±zα/2sn\bar{x} \pm z_{\alpha/2} \frac{s}{\sqrt{n}}zα/2z_{\alpha/2}
σ\sigma is unknown, n≤30n \le 30xˉ±tα/2sn\bar{x} \pm t_{\alpha/2} \frac{s}{\sqrt{n}}tα/2t_{\alpha/2} with df=n−1df = n-1

4.7 Confidence interval with known σ\sigma

When the population standard deviation (σ\sigma) is known, the zz-distribution is used to find the critical value, regardless of sample size 124 156.

  • Formula: The confidence interval is xˉ±zα/2σn\bar{x} \pm z_{\alpha/2} \frac{\sigma}{\sqrt{n}} 124.

📝 A random sample of 10 students has a mean score of 72.4%. The population is normal with a known σ=12.3\sigma = 12.3 percentage points. For a 95% confidence interval, zα/2=1.96z_{\alpha/2} = 1.96. The margin of error E=1.96×(12.3/10)≈7.62E = 1.96 \times (12.3 / \sqrt{10}) \approx 7.62. The interval is 72.4±7.6272.4 \pm 7.62, which is (64.8%,80.0%)(64.8\%, 80.0\%) 124 156.

4.8 Confidence interval with unknown σ\sigma and small sample

When the population standard deviation (σ\sigma) is unknown and the sample size (nn) is small (typically n≤30n \le 30), the tt-distribution is used. This accounts for the additional uncertainty from estimating σ\sigma with the sample standard deviation (ss) 125 157.

  • Formula: The confidence interval is xˉ±tα/2sn\bar{x} \pm t_{\alpha/2} \frac{s}{\sqrt{n}}, where df=n−1df = n-1.
  • Finding tα/2t_{\alpha/2}: The tt-critical value requires both the confidence level and the degrees of freedom (dfdf) 125.
  • Course convention: For this course, the tt-method is specifically for small samples with unknown σ\sigma and an approximately normal population 136 168.

📝 For a 95% confidence interval with n=10n=10, the degrees of freedom (dfdf) are 10−1=910-1=9. With α=0.05\alpha=0.05, α/2=0.025\alpha/2=0.025. From a tt-table, t0.025t_{0.025} for df=9df=9 is 2.262. If xˉ=72.4%\bar{x}=72.4\% and s=11.7s=11.7 percentage points, E=2.262×(11.7/10)≈8.37E = 2.262 \times (11.7 / \sqrt{10}) \approx 8.37. The interval is 72.4±8.3772.4 \pm 8.37, or (64.0%,80.8%)(64.0\%, 80.8\%) 126 127 158 159.

4.9 Impact of confidence level and sample size160 161

The width of a confidence interval is affected by both the chosen confidence level and the sample size 128 129.

  • Confidence level: A higher confidence level requires a larger margin of error, resulting in a wider interval. The center of the interval remains unchanged 128 160.
  • Sample size: A larger sample size leads to greater precision and a smaller margin of error, resulting in a narrower interval for the same confidence level. To halve the margin of error, the sample size must be quadrupled 129 161.
Confidencezα/2z_{\alpha/2}Margin of Error (EE)Interval (mg)
90%1.6453.47(185.1, 192.1)
95%1.9604.13(184.5, 192.7)
99%2.5765.43(183.2, 194.0)
Sample SizeMargin of Error
nnEE
4n4nE/2E/2
9n9nE/3E/3

4.10 Planning sample size

To determine the necessary sample size (nn) for a desired margin of error (EE) and confidence level, the following formula is used 130 162.

  • Formula: n=(zα/2σE)2n = \left(\frac{z_{\alpha/2}\sigma}{E}\right)^2.
  • Steps:
  1. Choose zα/2z_{\alpha/2} based on the desired confidence level.
  2. Substitute the known or estimated population standard deviation (σ\sigma) and the target margin of error (EE) in consistent units.
  3. Calculate nn and always round up to the next whole number to ensure the target margin of error is met.
  • Unknown σ\sigma: If σ\sigma is unknown, a prior estimate or a pilot study estimate can be used as an approximate planning value 130.

📝 A researcher wants to estimate the mean exam score with 95% confidence and a margin of error of at most 2 percentage points, assuming σ=12.3\sigma = 12.3 percentage points. Here, zα/2=1.96z_{\alpha/2} = 1.96 and E=2E = 2. The required sample size is n=(1.96×12.32)2≈145.30n = \left(\frac{1.96 \times 12.3}{2}\right)^2 \approx 145.30. Therefore, 146 students must be sampled 131 163.

4.11 Exercise: Constructing a confidence interval

This exercise tests the ability to construct a confidence interval for a population mean given sample data from an approximately normal population 132 164.

  • Problem: A random sample from an approximately normal population gives n=16n = 16, xˉ=40\bar{x} = 40, and s=8s = 8. Construct a 95% confidence interval for the population mean, assuming independent observations and no serious outliers 132 164.
  • Solution:
  1. Choose formula: Since σ\sigma is unknown and n=16n=16 (small sample), use the tt-distribution formula: xˉ±tα/2sn\bar{x} \pm t_{\alpha/2} \frac{s}{\sqrt{n}}.
  2. Find critical value: For 95% confidence and n=16n=16, df=16−1=15df = 16-1=15. With α=0.05\alpha=0.05, α/2=0.025\alpha/2=0.025. From a tt-table, t0.025t_{0.025} for df=15df=15 is 2.131.
  3. Calculate EE and endpoints: The margin of error E=2.131×(8/16)=2.131×2=4.262E = 2.131 \times (8 / \sqrt{16}) = 2.131 \times 2 = 4.262. The interval is 40±4.26240 \pm 4.262, which is (35.74,44.26)(35.74, 44.26).
  4. State conclusion: We are 95% confident that the population mean is between 35.74 and 44.26 133 165.

4.12 General routine for confidence intervals

A consistent routine helps in constructing confidence intervals accurately 134 166.

  • Steps:
  1. Identify: List the given values: sample size (nn), sample mean (xˉ\bar{x}), standard deviation (σ\sigma or ss), and the confidence level.
  2. Choose: Check the conditions for the data, then select the appropriate formula and critical value (zz or tt).
  3. Calculate: Determine the margin of error (EE), then compute the lower (xˉ−E\bar{x}-E) and upper (xˉ+E\bar{x}+E) endpoints of the interval.
  4. Conclude: State the confidence level and interpret the interval in the context of the problem 134.

5. Hypothesis Testing

5.1 Defining statistical hypotheses

A statistical hypothesis is a statement about a population parameter, such as the population mean (μ\mu) or proportion (pp). We formulate hypotheses about these parameters, using sample statistics like the sample mean (xˉ\bar{x}) as evidence 171 183.

  • Null hypothesis (H0H_0): This is the competing baseline that is tested against an alternative hypothesis. It typically includes a statement of equality for the parameter.
  • Alternative hypothesis (HaH_a): This specifies the direction or difference for which evidence is sought. It uses inequality symbols (>,<,≠>, <, \neq) 172 173.
  • Relationship between H0H_0 and HaH_a: The two hypotheses must cover all possible values of the population parameter without overlap. The boundary value for calculation is usually taken from H0H_0 175 176.

5.2 Choosing H0H_0 and HaH_a

The research question determines the alternative hypothesis (HaH_a), which then dictates the complementary null hypothesis (H0H_0). It is crucial to express the research question in words before assigning symbols 170 173.

Question about the meanAlternative (HaH_a)Test Type
Greater, increased, aboveμ>μ0\mu > \mu_0Right-tailed
Less, decreased, belowμ<μ0\mu < \mu_0Left-tailed
Different, changedμ≠μ0\mu \neq \mu_0Two-tailed
  • Claim placement: A claim's mathematical meaning determines whether it belongs in H0H_0 or HaH_a, not the word "claim" itself. For example, "mean is exactly 15" (μ=15\mu = 15) belongs in H0H_0, while "mean is more than 15" (μ>15\mu > 15) belongs in HaH_a 178.
  • Sample results: The observed sample mean (xˉ\bar{x}) does not influence the choice of HaH_a; the hypotheses are established before data collection 184.
Stated ClaimH0H_0HaH_a
At least 50μ≥50\mu \geq 50μ<50\mu < 50
At most 50μ≤50\mu \leq 50μ>50\mu > 50
Exactly 50μ=50\mu = 50μ≠50\mu \neq 50

📝 If a light-bulb manufacturer claims the population mean life exceeds 1,000 hours, the alternative hypothesis is Ha:μ>1000H_a: \mu > 1000, and the null hypothesis is H0:μ≤1000H_0: \mu \leq 1000. The manufacturer's claim is HaH_a because it seeks evidence for "more than" 180.

5.3 Practice: Choosing the alternative

This section provides practice questions for setting up null and alternative hypotheses.

  • Question 1: Has mean waiting time decreased from 20 minutes?
  • H0:μ≥20H_0: \mu \geq 20, Ha:μ<20H_a: \mu < 20.
  • Question 2: Is mean package weight different from 500 g?
  • H0:μ=500H_0: \mu = 500, Ha:μ≠500H_a: \mu \neq 500.
  • Question 3: A claim says mean lifetime is at most 1,000 hours. Is there evidence against that claim?
  • H0:μ≤1000H_0: \mu \leq 1000, Ha:μ>1000H_a: \mu > 1000.
  • Question 4: Is there evidence that more than 60% of students use the bus?
  • H0:p≤0.60H_0: p \leq 0.60, Ha:p>0.60H_a: p > 0.60 185 186.

5.4 Possible decisions and errors

In hypothesis testing, there are two possible decisions: reject H0H_0 or fail to reject H0H_0. Failing to reject H0H_0 does not prove it true; it simply means there is insufficient evidence to support HaH_a 187 188.

Our DecisionH0H_0 Actually TrueH0H_0 Actually False
Reject H0H_0Type I errorCorrect rejection
Fail to reject H0H_0Correct non-rejectionType II error
  • Type I error: This occurs when we reject a true null hypothesis, concluding a departure exists when it does not. The probability of a Type I error is controlled by the significance level (α\alpha)191.
  • Type II error: This occurs when we fail to reject a false null hypothesis, missing a departure that actually exists. The probability of a Type II error is denoted by β\beta 189.
  • Power: This is the probability of correctly detecting a departure when it exists, calculated as 1−β1 - \beta. Larger samples generally increase power, while a smaller α\alpha typically reduces power 192.

📝 For H0:μ≤15H_0: \mu \leq 15 and Ha:μ>15H_a: \mu > 15, a Type I error would be concluding that mean study time exceeds 15 hours when it is actually at most 15. A Type II error would be failing to detect a mean above 15 hours when the true mean is indeed above 15 190.

5.5 Test statistics and conditions

The test statistic measures how far the sample mean (xˉ\bar{x}) is from the null hypothesis boundary (μ0\mu_0) in terms of standard errors 193.

test statistic=xˉ−μ0standard error\text{test statistic} = \frac{\bar{x} - \mu_0}{\text{standard error}}

  • Choosing z or t:
  • If the population standard deviation (σ\sigma) is known, use the z-statistic: zobs=xˉ−μ0σ/nz_{obs} = \frac{\bar{x} - \mu_0}{\sigma/\sqrt{n}}.
  • If the population standard deviation is unknown, use the t-statistic: tobs=xˉ−μ0s/nt_{obs} = \frac{\bar{x} - \mu_0}{s/\sqrt{n}}, with degrees of freedom df=n−1df = n-1 194.
  • Conditions for use:
  • An appropriate random sample with independent observations is required.
  • For small samples, a normal population model is important.
  • For non-normal populations, a sufficiently large sample (e.g., n>30n > 30) may justify an approximation, though strong skewness or outliers might require more data 195.

5.6 The p-value and decision rule

The p-value is the probability of observing a test statistic at least as extreme as the one calculated, assuming the null model is true and in the direction specified by HaH_a. A small p-value indicates that the observed result is unusual under the null model 196.

Alternative (HaH_a)Relevant AreaNormal p-value
μ>μ0\mu > \mu_0Right tail1−Φ(zobs)1 - \Phi(z_{obs})
μ<μ0\mu < \mu_0Left tailΦ(zobs)\Phi(z_{obs})
μ≠μ0\mu \neq \mu_0Both tails2[1−Φ(∣zobs∣)]2[1 - \Phi(\vert z_{obs}\vert )]
  • Decision rule:
  • If p-value ≤α\leq \alpha, reject H0H_0.
  • If p-value >α> \alpha, fail to reject H0H_0.
  • Critical regions: This is an alternative method that yields the same decision. It involves comparing the test statistic to a critical value determined by α\alpha and the type of test 200.
  • Conclusion: The conclusion must answer the original question in words, specifying the population, parameter, and direction. A statistically significant result does not necessarily imply a large practical effect 199 209.

5.7 Worked example: Mean study time

Scenario: Is the population mean study time more than 15 hours per week? Given: n=49n = 49, xˉ=15.9\bar{x} = 15.9, s=3.5s = 3.5, α=0.05\alpha = 0.05 201.

  1. Hypotheses: H0:μ≤15H_0: \mu \leq 15, Ha:μ>15H_a: \mu > 15 (right-tailed test) 201.
  2. Calculation (large-sample z approximation):
  • Standard Error (SE) =3.549=0.5= \frac{3.5}{\sqrt{49}} = 0.5.
  • Test statistic zobs=15.9−150.5=1.80z_{obs} = \frac{15.9 - 15}{0.5} = 1.80.
  • p-value =P(Z≥1.80)≈0.0359= P(Z \geq 1.80) \approx 0.0359.
  1. Decision: Since 0.0359<0.050.0359 < 0.05, reject H0H_0.
  2. Conclusion: At the 5% significance level, there is sufficient evidence that population mean study time exceeds 15 hours per week 202.

5.8 Worked example: Has mean height changed?

Scenario: Test whether a population mean height differs from 180 cm. Given: n=36n = 36, xˉ=183\bar{x} = 183, s=9s = 9, α=0.05\alpha = 0.05 203.

  1. Hypotheses: H0:μ=180H_0: \mu = 180, Ha:μ≠180H_a: \mu \neq 180 (two-tailed test).
  2. Calculation (large-sample z approximation):
  • Test statistic zobs=183−1809/36=2.00z_{obs} = \frac{183 - 180}{9/\sqrt{36}} = 2.00 203.
  • p-value =P(Z≤−2)+P(Z≥2)=2[1−Φ(2)]≈0.0455= P(Z \leq -2) + P(Z \geq 2) = 2[1 - \Phi(2)] \approx 0.0455.
  1. Decision: Since 0.0455<0.050.0455 < 0.05, reject H0H_0 using the z approximation.
  2. Conclusion: There is sufficient evidence, under this approximation, that the population mean height differs from 180 cm 204.

5.9 Worked example: The at-least claim

Scenario: A report claims population mean player weight is at least 195 lb. Given: n=36n = 36, xˉ=190.2\bar{x} = 190.2, s=12.8s = 12.8, α=0.01\alpha = 0.01 205.

  1. Hypotheses: H0:μ≥195H_0: \mu \geq 195, Ha:μ<195H_a: \mu < 195 (left-tailed test).
  2. Calculation (large-sample z approximation):
  • Test statistic zobs=190.2−19512.8/36=−2.25z_{obs} = \frac{190.2 - 195}{12.8/\sqrt{36}} = -2.25 205.
  • p-value =P(Z≤−2.25)≈0.0122= P(Z \leq -2.25) \approx 0.0122.
  1. Decision: Since 0.0122>0.010.0122 > 0.01, fail to reject H0H_0.
  2. Conclusion: At the 1% level, there is insufficient evidence that the population mean weight is below 195 lb 206.

5.10 Worked example: Mean statistics grade

Scenario: Is the population mean grade less than 70? Given: n=36n = 36, xˉ=66\bar{x} = 66, s=11s = 11, α=0.05\alpha = 0.05 207.

  1. Hypotheses: H0:μ≥70H_0: \mu \geq 70, Ha:μ<70H_a: \mu < 70.
  2. Calculation (large-sample z approximation):
  • Test statistic zobs=66−7011/36≈−2.1818z_{obs} = \frac{66 - 70}{11/\sqrt{36}} \approx -2.1818.
  • p-value ≈0.0146\approx 0.0146.
  1. Decision: Since 0.0146<0.050.0146 < 0.05, reject H0H_0.
  2. Conclusion: There is sufficient evidence that the population mean grade is below 70 207.

5.11 Worked example: Mean age

Scenario: Is the population mean age different from 40 years? Given: n=100n = 100, xˉ=43.1\bar{x} = 43.1, s=15.5s = 15.5, α=0.02\alpha = 0.02 208.

  1. Hypotheses: H0:μ=40H_0: \mu = 40, Ha:μ≠40H_a: \mu \neq 40.
  2. Calculation (large-sample z approximation):
  • Test statistic zobs=43.1−4015.5/100=2.00z_{obs} = \frac{43.1 - 40}{15.5/\sqrt{100}} = 2.00.
  • p-value =2[1−Φ(2)]≈0.0455= 2[1 - \Phi(2)] \approx 0.0455.
  1. Decision: Since 0.0455>0.020.0455 > 0.02, fail to reject H0H_0.
  2. Conclusion: There is insufficient evidence at the 2% level that the population mean age differs from 40 years 208.

5.12 Conclusion wording

The wording of the conclusion depends on whether the claim is in H0H_0 or HaH_a and the decision made 209.

Claim Belongs InReject H0H_0Fail to Reject H0H_0
HaH_aSufficient evidence for the claimInsufficient evidence for the claim
H0H_0Sufficient evidence against the claimInsufficient evidence against the claim
  • Key elements: Always include the population, the parameter, and the direction in the final conclusion sentence 209.

5.13 A complete test in six steps

A complete hypothesis test follows a structured six-step process 210.

  1. State the parameter and the question: Clearly define what is being investigated.
  2. Write HaH_a and the complementary H0H_0: Formulate the null and alternative hypotheses based on the question.
  3. Set α\alpha, check conditions, and choose the method: Determine the significance level, verify assumptions, and select the appropriate test (e.g., z-test or t-test).
  4. Calculate the test statistic at the null boundary: Compute the value of the test statistic using the sample data and the boundary value from H0H_0.
  5. Find the p-value using the direction in HaH_a: Calculate the probability of observing such an extreme result under the null hypothesis, considering the direction of HaH_a.
  6. Compare with α\alpha and conclude in context: Make a decision to reject or fail to reject H0H_0 by comparing the p-value to α\alpha, and state the conclusion in plain language relevant to the original question 210.

5.14 Final practice: Complete the test

Scenario: A service claims mean waiting time is at most 20 minutes. We investigate whether the mean is longer.

Given: n=64n = 64, xˉ=21.5\bar{x} = 21.5 min, σ=4\sigma = 4 min, α=0.05\alpha = 0.05. Assume independent random observations and a justified normal approximation 211.

  1. Write H0H_0 and HaH_a:
  • H0:μ≤20H_0: \mu \leq 20
  • Ha:μ>20H_a: \mu > 20.
  1. Calculate the statistic and the p-value:
  • SE =464=0.5= \frac{4}{\sqrt{64}} = 0.5.
  • zobs=21.5−200.5=3z_{obs} = \frac{21.5 - 20}{0.5} = 3.
  • p-value =P(Z≥3)≈0.00135= P(Z \geq 3) \approx 0.00135.
  1. Give the decision and conclusion:
  • Since 0.00135<0.050.00135 < 0.05, reject H0H_0.
  • There is sufficient evidence that mean waiting time exceeds 20 minutes, contrary to the at-most-20 claim 212.

6. Inferences for Proportions

6.1 Understanding population and sample proportions

In statistical studies, a proportion describes the fraction of a population that belongs to a specific category of interest, such as individuals using public transit or products being defective. The unknown population proportion is denoted by pp, while the sample proportion, p^\hat{p}, is an estimate calculated from observed data as the number of successes (xx) divided by the total number of observations (nn), or p^=x/n\hat{p} = x/n 215 216.

📝 If 12 out of 100 trials result in a success, then x=12x=12 and n=100n=100, leading to a sample proportion p^=12/100=0.12\hat{p} = 12/100 = 0.12, or 12% 217.

SymbolMeaningExample
ppPopulation proportionUnknown
p^\hat{p}Sample proportion0.5440.544
p0p_0Reference value in a hypothesis test0.600.60
pp-valueTail probability under the null modelCalculated from a test

The sample proportion P^\hat{P} is a random variable, following a binomial distribution X∼Bin(n,p)X \sim \text{Bin}(n, p), with an expected value E(P^)=pE(\hat{P}) = p and a standard deviation SD(P^)=p(1−p)/nSD(\hat{P}) = \sqrt{p(1-p)/n}. Larger samples generally result in smaller standard errors, indicating less variability in the sample proportion 219.

6.2 Conditions for the normal approximation

For the normal approximation to be valid when working with proportions, several conditions must be met to ensure the reliability of the statistical inference 220.

  • Random sample: The data must come from a random sample with independent observations and a consistent success probability.
  • Expected counts: Both the expected number of successes (npnp) and expected number of failures (n(1−p)n(1-p)) must be sufficiently large, typically greater than 5, or more cautiously, at least 10 for each.
  • Sampling without replacement: If sampling without replacement, the sample size should be a small fraction of the population, commonly at most 10% 220.

6.3 Confidence intervals for proportions

A confidence interval provides a range of plausible values for an unknown population proportion pp, starting with the sample estimate p^\hat{p}. Since the true pp is unknown, the standard error (SE) is estimated using p^\hat{p} 221 222.

  • Estimated standard error: SE=p^(1−p^)/nSE = \sqrt{\hat{p}(1-\hat{p})/n}.
  • Normal-approximation interval: p^±z∗SE\hat{p} \pm z^\ast SE, where z∗z^\ast is the critical value corresponding to the desired confidence level.
  • Common z∗z^\ast values: 1.6451.645 for 90% confidence, 1.9601.960 for 95% confidence, and 2.5762.576 for 99% confidence 222.

To check conditions for the usual interval, the observed counts np^n\hat{p} and n(1−p^)n(1-\hat{p}) are used 223.

📝 For 12 successes in 100 trials, p^=0.12\hat{p} = 0.12. The observed counts are np^=12n\hat{p} = 12 and n(1−p^)=88n(1-\hat{p}) = 88. Both counts exceed 5 (and 10), allowing the normal approximation. For a 95% confidence interval, z∗=1.96z^\ast = 1.96. The estimated standard error is SE=0.12(0.88)/100≈0.03250SE = \sqrt{0.12(0.88)/100} \approx 0.03250. The margin of error E=1.96(0.03250)≈0.0637E = 1.96(0.03250) \approx 0.0637. The interval is 0.12±0.06370.12 \pm 0.0637, which is (0.0563,0.1837)(0.0563, 0.1837), or 5.6% to 18.4% 223 224 225.

The margin of error (EE) quantifies the precision of the interval and is calculated from the data, but it is not the actual distance from the unknown true proportion 226.

6.4 Hypothesis tests for proportions

A hypothesis test assesses evidence against a specified null hypothesis about a population proportion pp. The calculation starts with a reference value p0p_0 from the null hypothesis 221.

  • Hypotheses: Hypotheses are written about the population proportion pp, not the sample proportion p^\hat{p} 227.
  • Test standard error: SE0=p0(1−p0)/nSE_0 = \sqrt{p_0(1-p_0)/n} is used, assuming the null hypothesis is true.
  • Test statistic: The zz-observed statistic is calculated as zobs=(p^−p0)/SE0z_{obs} = (\hat{p} - p_0) / SE_0 228.
QuestionNull Hypothesis (H0H_0)Alternative Hypothesis (HaH_a)
More than p0p_0?p≤p0p \le p_0p>p0p > p_0
Less than p0p_0?p≥p0p \ge p_0p<p0p < p_0
Different from p0p_0?p=p0p = p_0p≠p0p \ne p_0

The conditions for the normal approximation in hypothesis testing involve checking the expected counts under the null hypothesis: np0np_0 and n(1−p0)n(1-p_0) 229.

📝 To test if the proportion of female CEGEP students differs from 60% (p0=0.60p_0 = 0.60) with n=250n=250 and x=136x=136:

  • H0:p=0.60H_0: p = 0.60, Ha:p≠0.60H_a: p \ne 0.60 230.
  • p^=136/250=0.544\hat{p} = 136/250 = 0.544.
  • Expected counts: np0=250(0.60)=150np_0 = 250(0.60) = 150 and n(1−p0)=250(0.40)=100n(1-p_0) = 250(0.40) = 100. Both are large enough 231.
  • SE0=0.60(0.40)/250≈0.03098SE_0 = \sqrt{0.60(0.40)/250} \approx 0.03098.
  • zobs=(0.544−0.60)/0.03098≈−1.8074z_{obs} = (0.544 - 0.60) / 0.03098 \approx -1.8074.
  • For a two-tailed test, p-value=2P(Z≤−1.8074)≈0.0707p\text{-value} = 2P(Z \le -1.8074) \approx 0.0707 232.
  • Since 0.0707>0.050.0707 > 0.05 (for α=0.05\alpha = 0.05), we fail to reject H0H_0. There is insufficient evidence that the population proportion differs from 60% 233.

6.5 Planning sample size for proportions

When planning a study, determining the appropriate sample size (nn) is crucial to achieve a desired margin of error (EE) at a specific confidence level 236.

  • Formula: n=(z∗E)2p∗(1−p∗)n = \left(\frac{z^\ast}{E}\right)^2 p^\ast(1-p^\ast), where p∗p^\ast is a planning estimate for the population proportion.

  • Rounding: The calculated sample size must always be rounded up to ensure the desired margin of error is met 236.

  • Preliminary estimate: If a pilot study or prior knowledge suggests an approximate value for pp, use that as p∗p^\ast 237.

  • No preliminary estimate: If no suitable prior estimate is available, use p∗=0.50p^\ast = 0.50. This choice maximizes the variance factor p∗(1−p∗)p^\ast(1-p^\ast) and thus yields the largest required sample size, providing a conservative plan 238 239.

📝 To achieve 95% confidence with a margin of error of 2 percentage points (E=0.02E=0.02) and a preliminary estimate p∗=0.15p^\ast=0.15:

  • z∗=1.96z^\ast = 1.96.
  • n=(1.960.02)2(0.15)(0.85)=1224.51n = \left(\frac{1.96}{0.02}\right)^2 (0.15)(0.85) = 1224.51.
  • Rounding up, the required sample size is n=1225n = 1225 237.

It is important to distinguish between "percentage points" and "relative error" when defining the margin of error. A margin of 2 percentage points means E=0.02E=0.02 in the formula, not 2% of the proportion itself 240.

6.6 Practice: Confidence interval and hypothesis test

These examples demonstrate the application of confidence intervals and hypothesis tests for proportions using a common dataset 241 243.

📝 In a sample of 200 students, 80 use public transit.

  • Confidence Interval (95%):
  • p^=80/200=0.40\hat{p} = 80/200 = 0.40. Counts np^=80n\hat{p}=80 and n(1−p^)=120n(1-\hat{p})=120 are sufficient.
  • SE=0.40(0.60)/200≈0.03464SE = \sqrt{0.40(0.60)/200} \approx 0.03464.
  • E=1.96(0.03464)≈0.06790E = 1.96(0.03464) \approx 0.06790.
  • Interval: 0.40±0.067900.40 \pm 0.06790, or (0.3321,0.4679)(0.3321, 0.4679). We are 95% confident that between 33.2% and 46.8% of the population uses public transit 242.
  • Hypothesis Test (α=0.05\alpha=0.05, less than half):
  • H0:p≥0.50H_0: p \ge 0.50, Ha:p<0.50H_a: p < 0.50.
  • p0=0.50p_0 = 0.50. Expected counts np0=100np_0 = 100 and n(1−p0)=100n(1-p_0) = 100 are sufficient.
  • zobs=(0.40−0.50)/0.50(0.50)/200≈−2.8284z_{obs} = (0.40 - 0.50) / \sqrt{0.50(0.50)/200} \approx -2.8284.
  • p-value=P(Z≤−2.8284)≈0.00234p\text{-value} = P(Z \le -2.8284) \approx 0.00234.
  • Since 0.00234<0.050.00234 < 0.05, reject H0H_0. There is sufficient evidence that less than half of the population uses public transit 244.
ProcedureFormula
Estimatep^=x/n\hat{p} = x/n
Confidence Intervalp^±z∗p^(1−p^)/n\hat{p} \pm z^\ast \sqrt{\hat{p}(1-\hat{p})/n}
Hypothesis Testzobs=(p^−p0)/p0(1−p0)/nz_{obs} = (\hat{p} - p_0) / \sqrt{p_0(1-p_0)/n}
Sample Size Planningn=(z∗/E)2p∗(1−p∗)n = (z^\ast/E)^2 p^\ast(1-p^\ast) (rounded up)

All normal-based procedures for proportions require appropriate sampling methods and conditions for the normal approximation to be valid 245.

7. The Student t-Distribution

7.1 Inference for a mean when σ\sigma is unknown

When estimating a population mean, the sample mean xˉ\bar{x} is used. If the population standard deviation (σ\sigma) is known, the standard error is σ/n\sigma/\sqrt{n}.

However, σ\sigma is usually unknown and must be estimated from the sample using the sample standard deviation (ss), resulting in an estimated standard error of s/ns/\sqrt{n}. This estimation introduces additional uncertainty, which the t-distribution accounts for 247.

Population SDStandard Error UsedReference Distribution
σ\sigma knownσ/n\sigma/\sqrt{n}Standard normal z
σ\sigma unknowns/ns/\sqrt{n}Student t, df = n - 1

The t-distribution is exact for independent observations from a normal population, provided σ>0\sigma > 0 and n≥2n \ge 2. The distinction between using the z-distribution and the t-distribution becomes particularly important with small sample sizes 248 249.

7.2 Conditions for using the t procedures

For t-procedures to be exact, observations must form an appropriate random sample and be independent, and the population must be normal 250.

  • Small samples: Strong skewness or serious outliers can make the t-procedure unreliable.
  • Large samples: For sufficiently large samples, t-procedures can often work approximately even for non-normal populations.
  • Limitations: Using a t-critical value does not correct for unsuitable data or biased sampling 250.

7.3 The shape of the t distribution

The t-distribution is symmetric about zero and bell-shaped, but it has heavier tails than the standard normal distribution. Its shape is determined by its degrees of freedom (df).

Heavier tails indicate that more extreme standardized values are possible when the standard error is estimated. The total area under each probability density curve is 1 251.

7.4 Degrees of freedom

For one-sample t-procedures, the degrees of freedom are calculated as df=n−1df = n - 1, where nn is the sample size. This is because once the sample mean is fixed, n−1n-1 deviations from the mean can vary freely, but the final deviation is determined 254.

📝 If three values have a fixed mean of 10, their total must be 30. If two values are 8 and 11, the third value must be 30−8−11=1130 - 8 - 11 = 11. Thus, only two values are free to vary, so df=3−1=2df = 3 - 1 = 2 253.

7.5 Larger degrees of freedom bring t closer to z

As the degrees of freedom increase, the t-distribution gradually approaches the standard normal (z) distribution. There is no sudden change at n=30n=30; the distributions become closer continuously 255.

Sample Sizedf95% Two-Sided Critical Value
652.571
11102.228
31302.042
1011001.984
Standard normal—1.960

7.6 Critical value and observed statistic

The critical value (t∗t^\ast) is a cutoff chosen from the t-distribution based on the confidence level or test level, the tail choice, and the degrees of freedom. The observed test statistic (tobst_{obs}) is calculated from the sample data using the formula: T=Xˉ−μS/nT = \frac{\bar{X} - \mu}{S/\sqrt{n}} The critical value comes from the reference distribution, while the observed statistic comes from the sample 256.

7.7 A t confidence interval for μ\mu

A t-confidence interval for the population mean (μ\mu) is calculated using the formula: xˉ±t∗sn\bar{x} \pm t^\ast \frac{s}{\sqrt{n}} where df=n−1df = n-1 257.

  • Center: The sample mean (xˉ\bar{x}).
  • Estimated standard error: s/ns/\sqrt{n}.
  • Margin of error (E): E=t∗s/nE = t^\ast s/\sqrt{n} 257.

The calculation structure is similar to previous intervals, but the critical value t∗t^\ast is obtained from a t-table 257.

📝 To find the critical value for a 90% confidence interval with n=12n=12:

  1. Calculate df=12−1=11df = 12 - 1 = 11.
  2. Determine α=1−0.90=0.10\alpha = 1 - 0.90 = 0.10, so α/2=0.05\alpha/2 = 0.05.
  3. In the t-table, find the row for df=11df=11 and the column for an upper-tail area of 0.05.
  4. The critical value t∗t^\ast is approximately 1.796. This means P(T<−1.796)≈0.05P(T < -1.796) \approx 0.05, P(T>1.796)≈0.05P(T > 1.796) \approx 0.05, and P(−1.796<T<1.796)≈0.90P(-1.796 < T < 1.796) \approx 0.90 258 259.

When reading t-table headings for a two-sided interval, the same column might be labeled as "one-tail area: 0.05," "combined two-tail area: 0.10," or "central confidence level: 90%". Always read the heading carefully before selecting the column 260.

7.8 Worked interval: protein in nutrition bars

To construct a 90% confidence interval for the population mean protein content of nutrition bars, given a sample of nine bars with protein contents (in grams): 8.1, 8.5, 7.7, 7.9, 8.3, 8.0, 8.6, 8.9, 8.7. Assume independent sampling and an approximately normal population with no serious outliers. Since σ\sigma is unknown, a t-interval is used 261.

  • Summary statistics: n=9n=9, xˉ=8.30\bar{x} = 8.30 g, s≈0.4031s \approx 0.4031 g.
  • Degrees of freedom: df=9−1=8df = 9 - 1 = 8.
  • Critical value: For α=0.10\alpha = 0.10 and α/2=0.05\alpha/2 = 0.05, t∗=t0.05,8≈1.8595t^\ast = t_{0.05,8} \approx 1.8595 262.
  • Margin of error: E=1.85950.40319≈0.2499E = 1.8595 \frac{0.4031}{\sqrt{9}} \approx 0.2499 g.
  • Confidence interval: 8.30±0.2499⇒(8.05,8.55)8.30 \pm 0.2499 \Rightarrow (8.05, 8.55) g 263.

We are 90% confident that the population mean protein content lies between 8.05 g and 8.55 g. This interval estimates a population mean, not the protein content of individual bars 263.

7.9 Why is a t interval wider?

A t-interval is wider than a z-interval for the same data and confidence level because the t-critical value is larger than the z-critical value. This larger critical value accounts for the additional uncertainty introduced by estimating σ\sigma from the sample.

For small samples with unknown σ\sigma, the z-approximation is not appropriate 264.

7.10 Hypothesis tests: the same logic as before

The logic for hypothesis testing with the t-distribution remains consistent with previous methods, but the reference distribution changes due to estimating σ\sigma 265.

  • Steps for a t-test:
  1. State the alternative hypothesis (HaH_a) and the complementary null hypothesis (H0H_0).
  2. Check conditions and calculate df=n−1df = n-1.
  3. Calculate the observed test statistic: tobs=xˉ−μ0s/nt_{obs} = \frac{\bar{x} - \mu_0}{s/\sqrt{n}}.
  4. Find the relevant tail area using the t-distribution.
  5. Compare the p-value with the preselected significance level (α\alpha) 265.

The alternative hypothesis still determines the tail of the test 265.

HaH_aFull H0H_0p-value Area
μ>μ0\mu > \mu_0μ≤μ0\mu \le \mu_0P(T≥tobs)P(T \ge t_{obs})
μ<μ0\mu < \mu_0μ≥μ0\mu \ge \mu_0P(T≤tobs)P(T \le t_{obs})
μ≠μ0\mu \ne \mu_0μ=μ0\mu = \mu_02P(T≥∣tobs∣)2P(T \ge \vert t_{obs}\vert )

These p-values are calculated using T∼tn−1T \sim t_{n-1} at the null reference value μ0\mu_0 266.

7.11 Worked test: mean passengers per flight

An airline claims the mean passenger count is more than 120. A sample of n=16n=16 flights yields xˉ=123.3\bar{x} = 123.3 passengers and s=7.7s = 7.7 passengers, with α=0.05\alpha = 0.05. Assume independent random sampling and an approximately normal population 267.

  • Hypotheses: H0:μ≤120H_0: \mu \le 120, Ha:μ>120H_a: \mu > 120. The "more than" claim indicates a right-tailed test 267.
  • Degrees of freedom: df=16−1=15df = 16 - 1 = 15.
  • Estimated standard error: SE=7.716=1.925SE = \frac{7.7}{\sqrt{16}} = 1.925.
  • Observed test statistic: tobs=123.3−1201.925≈1.7143t_{obs} = \frac{123.3 - 120}{1.925} \approx 1.7143. This means the sample mean is about 1.71 estimated standard errors above the null boundary of 120 268.
  • Critical value: For df=15df=15 and a right-tailed test at α=0.05\alpha=0.05, tcrit≈1.7531t_{crit} \approx 1.7531.
  • Decision: Since tobs≈1.7143<1.7531t_{obs} \approx 1.7143 < 1.7531, we fail to reject H0H_0 269.
  • p-value: P(T15≥1.7143)≈0.0535P(T_{15} \ge 1.7143) \approx 0.0535.
  • Conclusion: Since 0.0535>0.050.0535 > 0.05, there is insufficient evidence at the 5% level to conclude that the mean passenger count exceeds 120. This does not prove the mean is at most 120, but rather that the sample does not establish the greater-than claim at this level 270.

7.12 Why the z substitution can matter

Using a z-approximation instead of a t-procedure when σ\sigma is unknown and the sample is small can lead to a different conclusion 271.

Reference ModelRight-Tail p-valueDecision at 5%
t, df = 15About 0.0535Fail to reject
Standard normal approximationAbout 0.0432Reject

For the passenger example, the t-procedure led to failing to reject H0H_0, while a z-approximation would have led to rejecting H0H_0. Therefore, it is crucial to use the t-procedure when σ\sigma is unknown and the sample is small and approximately normal 271.

7.13 Practice: find the correct t critical value

To find critical values for different scenarios with n=10n=10, all calculations use df=9df = 9 272.

  • 95% two-sided confidence interval: α/2=0.025\alpha/2 = 0.025, so t∗≈2.262t^\ast \approx 2.262.
  • Right-tailed test at α=0.05\alpha = 0.05: The cutoff is +1.833+1.833.
  • Left-tailed test at α=0.05\alpha = 0.05: The cutoff is −1.833-1.833 273.

An interval's positive critical value applies to both endpoints through ±t∗\pm t^\ast, while a one-sided test uses a signed cutoff 273.

7.14 Practice: a complete t test

Given a random sample of 12 independent measurements with xˉ=48\bar{x} = 48 and s=3s = 3, assume an approximately normal population and unknown σ\sigma. Test whether the population mean is below 50 at α=0.05\alpha = 0.05 274.

  • Hypotheses: H0:μ≥50H_0: \mu \ge 50, Ha:μ<50H_a: \mu < 50.
  • Degrees of freedom: df=11df = 11.
  • Observed test statistic: tobs=48−503/12≈−2.3094t_{obs} = \frac{48 - 50}{3/\sqrt{12}} \approx -2.3094.
  • p-value: P(T11≤−2.3094)≈0.0207P(T_{11} \le -2.3094) \approx 0.0207.
  • Conclusion: Since 0.0207<0.050.0207 < 0.05, reject H0H_0. There is sufficient evidence that the population mean is below 50, under the stated assumptions 275.

7.15 The essentials for presenting a t procedure

When presenting a t-procedure, several key elements must be included 276.

  • Standard error: Since σ\sigma is unknown, estimate the standard error using s/ns/\sqrt{n}.
  • Degrees of freedom: For a one-sample mean procedure, use df=n−1df = n-1.
  • Assumptions: Always check the sampling and population assumptions.
  • Confidence interval: Calculate using xˉ±t∗s/n\bar{x} \pm t^\ast s/\sqrt{n}.
  • Hypothesis test: Use the test statistic (xˉ−μ0)/(s/n)(\bar{x} - \mu_0)/(s/\sqrt{n}) and the tail specified by HaH_a 276.

The fundamental logic of statistical inference remains the same; the t-distribution simply adjusts for the estimation of the population standard deviation 276.

8. Chi-Square Tests

Chi-square tests are used to analyze categorical data, addressing questions about whether observed counts for one categorical variable align with specified population proportions (goodness of fit) or if there is an association between two categorical variables in a population (independence). Both types of tests compare observed counts with expected counts under the null hypothesis 278.

8.1 Observed counts and expected counts

Observed counts (O) are the actual counts recorded in a sample, while expected counts (E) are the counts predicted by the null model. Expected counts do not necessarily equal observed counts, even when the null hypothesis is true, due to random sampling fluctuations 279.

📝 If a fair six-sided die is rolled 60 times, the expected count for each face is E=60×16=10E = 60 \times \frac{1}{6} = 10.

8.2 The common statistic

The chi-square (χ2\chi^2) statistic quantifies the discrepancy between observed and expected counts. Small values of χ2\chi^2 indicate close agreement, while large values suggest a significant overall discrepancy 280.

χobs2=∑(O−E)2E\chi^2_{obs} = \sum \frac{(O - E)^2}{E}

Calculation steps:

  • For each category or table cell, find the difference between the observed and expected counts (O−EO - E).
  • Square this difference and divide it by the expected count (EE).
  • Sum all these contributions to get the χobs2\chi^2_{obs} value. Rejection region: The rejection region for chi-square tests is always on the right tail of the distribution because departures in either direction (positive or negative O−EO-E) increase the squared difference (O−E)2(O-E)^2, leading to larger χ2\chi^2 values. Large χ2\chi^2 values provide evidence against the null hypothesis 281.

8.3 The chi-square distribution

The chi-square distribution describes the probability distribution of the χ2\chi^2 statistic 282.

  • Possible values: All possible values are non-negative.
  • Shape: The distribution is asymmetric with a right tail.
  • Degrees of freedom (df): Its shape depends on its degrees of freedom.
  • Approximation: Under the null hypothesis, the test statistic approximately follows a chi-square distribution when certain conditions are met.

8.4 Conditions before using the approximation

Before using the chi-square approximation, several conditions must be met to ensure the validity of the test 283.

  • Sampling: Use appropriate random sampling or a suitable randomized design.
  • Independence: Observations must be independent, meaning each person or trial contributes to only one category or cell.
  • Categories: Categories must be mutually exclusive and cover all possible outcomes.
  • Expected counts: Every expected count must be at least 5. This condition applies to expected counts, not observed counts.

8.5 Goodness of fit: the question and hypotheses

The goodness-of-fit test assesses whether the observed counts for a single categorical variable align with specified population proportions 284.

  • Null hypothesis (H0H_0): The population category proportions equal the specified values (p1,…,pkp_1, \dots, p_k).
  • Alternative hypothesis (HaH_a): At least one population proportion differs from the specified value.
  • Interpretation: Rejecting H0H_0 indicates that the overall distribution differs from the specified model, but it does not imply that every category's proportion is different.

8.6 Goodness of fit: expected counts and df

For a goodness-of-fit test, the expected counts and degrees of freedom are calculated as follows 285.

  • Expected count (EiE_i): For a sample of size nn and specified category probability pip_i, the expected count for category ii is Ei=npiE_i = np_i.
  • The sum of all specified probabilities must equal 1.
  • The sum of all expected counts must equal the total sample size nn.
  • Degrees of freedom (df): When probabilities are fully specified in advance, df=k−1df = k - 1, where kk is the number of categories.
  • This is because once k−1k-1 category counts are known, the last one is determined by the fixed total sample size 286.

📝 A sample of 150 random digits is collected, and the question is whether the population digit proportions are uniform 287.

  • H0:p0=p1=⋯=p9=0.10H_0: p_0 = p_1 = \dots = p_9 = 0.10.
  • HaH_a: At least one digit probability differs from 0.10.
  • For each of the 10 digits, the expected count is Ei=150×0.10=15E_i = 150 \times 0.10 = 15.
  • The degrees of freedom are df=10−1=9df = 10 - 1 = 9.

8.7 Random digits: statistic and decision

After calculating the contributions from each category, the χobs2\chi^2_{obs} statistic is compared to the chi-square distribution to make a decision 289 290.

📝 For the random digits example, the calculated χobs2\chi^2_{obs} is 10.00 with df=9df = 9. The p-value is P(χ92≥10)≈0.3505P(\chi^2_9 \ge 10) \approx 0.3505. Since 0.3505>0.050.3505 > 0.05 (assuming α=0.05\alpha = 0.05), we fail to reject H0H_0. There is insufficient evidence to conclude that the population digit probabilities differ from 0.10 each. The observed statistic (10.00) is below the critical value of 16.919 for α=0.05\alpha = 0.05 and df=9df = 9 291.

8.8 Independence: two variables for each person

The chi-square test for independence investigates whether there is an association between two categorical variables in a population. Data are typically arranged in a contingency table 293.

  • Null hypothesis (H0H_0): The two variables are independent in the population.
  • Alternative hypothesis (HaH_a): The two variables are associated in the population.
  • Interpretation: Independence implies that the population proportions for one variable are the same across all categories of the other variable. An association does not necessarily imply a causal relationship 295.

8.9 Expected counts: the general formula

For a test of independence, the expected count for each cell in a contingency table is calculated based on the assumption of independence 297.

  • Formula: Eij=RiCjnE_{ij} = \frac{R_i C_j}{n}, where RiR_i is the total for row ii, CjC_j is the total for column jj, and nn is the overall total sample size.
  • Calculation: Multiply the row total by the column total for a specific cell, then divide by the overall total.

📝 In an opinion poll with 100 males and 100 females, 110 people were "For" a proposed law, 70 were "Against", and 20 were "Undecided" 294.

  • The proportion "For" in the whole sample is 110200=0.55\frac{110}{200} = 0.55.
  • Under H0H_0 (independence), the expected count for "Male, For" would be 100×0.55=55100 \times 0.55 = 55.
  • The expected count for "Male, Against" is Emale,against=100×70200=35E_{male, against} = \frac{100 \times 70}{200} = 35.
  • The expected counts for the opinion poll are shown in the table below 298:
Recorded groupForAgainstUndecidedTotal
Male553510100
Female553510100
Total1107020200

8.10 Independence: degrees of freedom

For an r×cr \times c contingency table (where rr is the number of rows and cc is the number of columns, excluding total rows/columns), the degrees of freedom are calculated as df=(r−1)(c−1)df = (r-1)(c-1) 299.

📝 For the 2×32 \times 3 opinion poll table, df=(2−1)(3−1)=1×2=2df = (2-1)(3-1) = 1 \times 2 = 2.

8.11 Opinion poll: decision and conclusion

After calculating the χobs2\chi^2_{obs} statistic, a decision is made by comparing it to the chi-square distribution 301.

📝 For the opinion poll, the χobs2\chi^2_{obs} is approximately 2.3377 with df=2df = 2. The p-value is P(χ22≥2.3377)≈0.3107P(\chi^2_2 \ge 2.3377) \approx 0.3107. At α=0.05\alpha = 0.05, we fail to reject H0H_0 because 0.3107>0.050.3107 > 0.05. There is insufficient evidence of an association between opinion and recorded gender category in the population. This does not prove that the variables are independent.

8.12 Independence and homogeneity

The tests for independence and homogeneity share the same statistical methods but differ in their sampling setup and the question they address 302.

TestSampling setupQuestion
IndependenceOne sample, two variables recorded for each personAre the variables associated?
HomogeneitySeparate samples from different populations or groupsAre the category proportions the same?

Both tests use the same expected count formula (Eij=RiCj/nE_{ij} = R_i C_j / n), the same Pearson chi-square statistic, and the same degrees of freedom formula (df=(r−1)(c−1)df = (r-1)(c-1)) 302.

8.13 A checklist for either test

A systematic approach helps ensure all necessary steps are covered for chi-square tests 303.

  • Identify the type of test: goodness of fit, independence, or homogeneity.
  • State the null hypothesis (H0H_0), alternative hypothesis (HaH_a), and the significance level (α\alpha).
  • Calculate the expected counts under H0H_0.
  • Check sampling assumptions and the condition that all expected counts are at least 5.
  • Compute the chi-square statistic ∑(O−E)2E\sum \frac{(O-E)^2}{E} and the correct degrees of freedom (dfdf).
  • Find the right-tail p-value and state the conclusion in the context of the problem.

8.14 Practice: goodness of fit

📝 A spinner has four categories (A, B, C, D). In 100 independent spins, the observed counts are A: 40, B: 20, C: 20, D: 20. At α=0.05\alpha = 0.05, test whether all four population probabilities are equal 304.

  1. Hypotheses and expected counts:
  • H0:pA=pB=pC=pD=0.25H_0: p_A = p_B = p_C = p_D = 0.25.
  • HaH_a: At least one probability differs.
  • Expected count for each category: Ei=100×0.25=25E_i = 100 \times 0.25 = 25.
  1. Statistic and degrees of freedom:
  • χobs2=(40−25)225+(20−25)225+(20−25)225+(20−25)225=15225+3×(−5)225=22525+3×2525=9+3=12\chi^2_{obs} = \frac{(40-25)^2}{25} + \frac{(20-25)^2}{25} + \frac{(20-25)^2}{25} + \frac{(20-25)^2}{25} = \frac{15^2}{25} + 3 \times \frac{(-5)^2}{25} = \frac{225}{25} + 3 \times \frac{25}{25} = 9 + 3 = 12.
  • df=k−1=4−1=3df = k - 1 = 4 - 1 = 3.
  1. Decision:
  • The p-value is P(χ32≥12)≈0.0074P(\chi^2_3 \ge 12) \approx 0.0074.
  • Since 0.0074<0.050.0074 < 0.05, reject H0H_0. There is sufficient evidence that the four category probabilities are not all equal 305.

8.15 The formulas side by side

—Goodness of fitIndependence / homogeneity
Expected countEi=npiE_i = np_iEij=RiCj/nE_{ij} = R_i C_j / n
Degrees of freedomk−1k - 1(r−1)(c−1)(r - 1)(c - 1)
Statistic∑(O−E)2/E\sum (O - E)^2 / E∑(O−E)2/E\sum (O - E)^2 / E
Rejection tailRightRight

For the goodness-of-fit formula, category probabilities are specified in advance. A large discrepancy provides evidence against H0H_0, while a small discrepancy does not prove H0H_0 306.

8.16 Optional reference: the multinomial model

The multinomial model describes nn independent trials, each with the same category probabilities p1,…,pkp_1, \dots, p_k, where ∑pi=1\sum p_i = 1 and ∑Oi=n\sum O_i = n. It is a generalization of the binomial model for two or more categories.

The probability of observing a specific set of counts (O1,…,Ok)(O_1, \dots, O_k) is given by 307:

P(O1,…,Ok)=n!O1!⋯Ok!∏i=1kpiOiP(O_1, \dots, O_k) = \frac{n!}{O_1! \cdots O_k!} \prod_{i=1}^{k} p_i^{O_i} This factorial formula is not needed to calculate the Pearson chi-square statistic 307.

© 2026 Maeve. All rights reserved. This content is protected by copyright.

See also