Comprehensive Study Guide to Statistical Inference and Decisions

Sampling Distributions

  • Definition of Sampling Distribution: A sampling distribution of a statistic is a probability distribution for all possible values of the statistic computed from a sample of size nn.

  • Sampling Distribution of the Sample Mean (xˉ\bar{x}): The probability distribution of all possible values of the random variable xˉ\bar{x} computed from a sample of size nn drawn from a population with mean μ\mu and standard deviation σ\sigma.

  • Algorithm to Obtain the Sampling Distribution of xˉ\bar{x}:

    • Step 1: Obtain a simple random sample of size nn.

    • Step 2: Compute the sample mean xˉ\bar{x}.

    • Step 3: Assuming sampling from a finite population, repeat Steps 1 and 2 until all distinct simple random samples of size nn have been obtained (once a sample is obtained, it cannot be sampled again).

  • Center of the Distribution of xˉ\bar{x}: The mean of the sampling distribution of xˉ\bar{x}, denoted μxˉ\mu_{\bar{x}}, is exactly equal to the population mean:   μxˉ=μ\mu_{\bar{x}} = \mu

  • Spread of the Distribution of xˉ\bar{x} (Standard Error): The standard deviation of the sampling distribution of xˉ\bar{x}, denoted σxˉ\sigma_{\bar{x}}, is called the standard error of the mean and is given by:   σxˉ=σn\sigma_{\bar{x}} = \frac{\sigma}{\sqrt{n}}

    • As the sample size nn increases, the standard deviation of the sampling distribution decreases, resulting in less variability among sample means.

  • Shape of the Sampling Distribution of xˉ\bar{x} for a Normal Population:

    • If a random variable XX is normally distributed with mean μ\mu and standard deviation σ\sigma, then the sampling distribution of the sample mean xˉ\bar{x} is normally distributed regardless of the sample size nn, with mean μxˉ=μ\mu_{\bar{x}} = \mu and standard deviation σxˉ=σn\sigma_{\bar{x}} = \frac{\sigma}{\sqrt{n}}.

    • Example (Stanford-Binet IQ Scores): IQ scores follow a normal distribution with μ=100\mu = 100 and σ=15\sigma = 15. For samples of size n=9n = 9, the sampling distribution of xˉ\bar{x} is normally distributed with μxˉ=100\mu_{\bar{x}} = 100 and σxˉ=159=5\sigma_{\bar{x}} = \frac{15}{\sqrt{9}} = 5.

    • In a simulation of 1000 random samples of size n=9n = 9, the observed mean of sample means was 100.02 and the observed standard deviation was 5.01.

    • When the sample size is increased to n=25n = 25, the distribution remains normal and centered at μxˉ=100\mu_{\bar{x}} = 100, but the spread decreases to σxˉ=1525=3\sigma_{\bar{x}} = \frac{15}{\sqrt{25}} = 3 (simulation yielded a mean of 100.05 and a standard deviation of 3.08).


Sampling distribution of sample mean for IQ scores with n=9 vs population
  • Probability Calculations for a Sample Mean (Normal Population):

    • To compute the probability that a sample of size n=10n = 10 drawn from a normal population with μ=100\mu = 100 and σ=15\sigma = 15 has a mean greater than 110 (P(xˉ>110)P(\bar{x} > 110)):

    • Calculate the standard error:     σxˉ=1510≈4.743\sigma_{\bar{x}} = \frac{15}{\sqrt{10}} \approx 4.743

    • Compute the zz-score:     z=xˉ−μxˉσxˉ=110−1001510=2.11z = \frac{\bar{x} - \mu_{\bar{x}}}{\sigma_{\bar{x}}} = \frac{110 - 100}{\frac{15}{\sqrt{10}}} = 2.11

    • Find the area under the standard normal curve to the right of z=2.11z = 2.11:     P(xˉ>110)=P(z>2.11)=0.0174P(\bar{x} > 110) = P(z > 2.11) = 0.0174

    • Using technology, the exact probability is 0.0175. This indicates that if 100 simple random samples of size n=10n = 10 are drawn, approximately 2 samples will result in a sample mean exceeding 110.

  • The Central Limit Theorem (Nonnormal Populations):

    • Regardless of the shape of the underlying population, the sampling distribution of the sample mean xˉ\bar{x} becomes approximately normal as the sample size nn increases.

    • If the population distribution is nonnormal or unknown, the sampling distribution of xˉ\bar{x} is approximately normal provided that n≥30n \ge 30.

    • Populations that exhibit heavy skewness require larger sample sizes before their sampling distributions approach normality.


Central Limit Theorem demonstrated across sample sizes for skewed household income data
  • Simulation on Discrete Household Size Data:

    • Population distribution of household sizes from the General Social Survey:

    • 1 person: 0.147

    • 2 persons: 0.361

    • 3 persons: 0.187

    • 4 persons: 0.168

    • 5 persons: 0.083

    • 6 persons: 0.034

    • 7 persons: 0.012

    • 8 persons: 0.004

    • 9 persons: 0.002

    • 10 persons: 0.002

    • Population parameters: μ=2.9\mu = 2.9, σ=1.48\sigma = 1.48.

    • For n=4n = 4, simulated xˉ\bar{x} values had a mean of 2.9 and standard deviation of 0.76 (theoretical: 1.484=0.74\frac{1.48}{\sqrt{4}} = 0.74), with a right-skewed distribution.

    • For n=10n = 10, simulated xˉ\bar{x} values had a mean of 2.9 and standard deviation of 0.50 (theoretical: 1.4810≈0.47\frac{1.48}{\sqrt{10}} \approx 0.47), with moderate skewness.

    • For n=30n = 30, simulated xˉ\bar{x} values had a mean of 2.9 and standard deviation of 0.27 (theoretical: 1.4830≈0.27\frac{1.48}{\sqrt{30}} \approx 0.27), yielding an approximately normal distribution.

  • Probability Calculation for a Skewed Variable (Pregnancy Weight Gain):

    • Pregnancy weight gain is skewed right with μ=30 pounds\mu = 30\,\text{pounds} and σ=12.9 pounds\sigma = 12.9\,\text{pounds}.

    • A sample of n=35n = 35 low-income patients yields xˉ=36.2 pounds\bar{x} = 36.2\,\text{pounds}.

    • Because n=35≥30n = 35 \ge 30, the Central Limit Theorem applies:     z=36.2−3012.935=2.84z = \frac{36.2 - 30}{\frac{12.9}{\sqrt{35}}} = 2.84

    • The area to the left of z=2.84z = 2.84 is 0.9977, giving an upper-tail probability of:     P(xˉ≥36.2)=1−0.9977=0.0023P(\bar{x} \ge 36.2) = 1 - 0.9977 = 0.0023

    • Using technology, the probability is 0.0022. Because this event occurs only 2 times in 1000 samples by chance, it suggests that low-income patients gain significantly more weight on average than the general population.

  • Sampling Distribution of the Sample Proportion (p^\hat{p}):

    • Let XX be the number of individuals in a simple random sample of size nn possessing a specific characteristic. The sample proportion is:     p^=xn\hat{p} = \frac{x}{n}

    • The mean of the sampling distribution of p^\hat{p} is:     μp^=p\mu_{\hat{p}} = p

    • The standard deviation of the sampling distribution of p^\hat{p} (standard error) is:     σp^=p(1−p)n\sigma_{\hat{p}} = \sqrt{\frac{p(1 - p)}{n}}

    • The shape of the sampling distribution of p^\hat{p} is approximately normal provided that:     np(1−p)≥10n p (1 - p) \ge 10     and the sample size nn is no more than 5% of the population size (n≤0.05Nn \le 0.05N) to ensure trial independence.


Sampling distribution of p-hat with n = 60, p = 0.76
  • Sample Proportion Probability Example (Hearing Trouble):

    • In the U.S., 15% of individuals have hearing trouble (p=0.15p = 0.15). A random sample of n=120n = 120 Americans is taken:     np(1−p)=120(0.15)(0.85)=15.3≥10n p (1 - p) = 120(0.15)(0.85) = 15.3 \ge 10     μp^=0.15,σp^=0.15(0.85)120≈0.0326\mu_{\hat{p}} = 0.15, \quad \sigma_{\hat{p}} = \sqrt{\frac{0.15(0.85)}{120}} \approx 0.0326

    • Probability that at most 12% have hearing trouble (P(p^≤0.12)P(\hat{p} \le 0.12)):     z=0.12−0.150.0326=−0.92z = \frac{0.12 - 0.15}{0.0326} = -0.92     P(z≤−0.92)=0.1788(technology: 0.1787)P(z \le -0.92) = 0.1788 \quad (\text{technology: } 0.1787)

    • In an independent random sample of 120 headphone users, 26 report hearing trouble (p^=26120≈0.217\hat{p} = \frac{26}{120} \approx 0.217):     z=0.217−0.150.15(1−0.15)120=2.06z = \frac{0.217 - 0.15}{\sqrt{\frac{0.15(1 - 0.15)}{120}}} = 2.06     P(p^≥0.217)=P(z≥2.06)=0.0197(technology: 0.0199)P(\hat{p} \ge 0.217) = P(z \ge 2.06) = 0.0197 \quad (\text{technology: } 0.0199)

    • Because obtaining a proportion of 0.217 or greater happens only about 2 times in 100 samples, the evidence indicates that regular headphone users suffer hearing trouble at a rate higher than the general population.

Confidence Intervals for a Single Parameter

  • Point Estimates and Confidence Intervals:

    • A point estimate is the value of a sample statistic used to estimate an unknown population parameter.

    • A confidence interval consists of an interval of numbers centered around a point estimate:     point estimate±margin of error\text{point estimate} \pm \text{margin of error}

    • The level of confidence, denoted (1−α)×100%(1 - \alpha) \times 100\%, represents the expected proportion of intervals that will contain the parameter when a large number of independent samples are taken.

    • A 95% confidence interval does not indicate a 95% probability that the fixed parameter lies within the computed bounds. The parameter is a fixed, unchanging quantity; the interval either contains it (probability 1) or does not (probability 0). The 95% figure reflects the long-term capture rate of the statistical process.


Simulation of 200 confidence intervals illustrating the meaning of 95% level of confidence
  • Critical Values for Common Levels of Confidence:

    • Level of confidence 90% (α=0.10)90\%\, (\alpha = 0.10): tail area α2=0.05\frac{\alpha}{2} = 0.05, critical value zα2=1.645z_{\frac{\alpha}{2}} = 1.645.

    • Level of confidence 95% (α=0.05)95\%\, (\alpha = 0.05): tail area α2=0.025\frac{\alpha}{2} = 0.025, critical value zα2=1.96z_{\frac{\alpha}{2}} = 1.96.

    • Level of confidence 99% (α=0.01)99\%\, (\alpha = 0.01): tail area α2=0.005\frac{\alpha}{2} = 0.005, critical value zα2=2.575z_{\frac{\alpha}{2}} = 2.575.

  • Confidence Intervals for a Population Proportion (pp):

    • Requirements: Simple random sample or randomized experiment, np^(1−p^)≥10n \hat{p}(1 - \hat{p}) \ge 10, and n≤0.05Nn \le 0.05N.

    • Margin of error (EE):     E=zα2p^(1−p^)nE = z_{\frac{\alpha}{2}} \sqrt{\frac{\hat{p}(1 - \hat{p})}{n}}

    • Lower bound:     p^−zα2p^(1−p^)n\hat{p} - z_{\frac{\alpha}{2}} \sqrt{\frac{\hat{p}(1 - \hat{p})}{n}}

    • Upper bound:     p^+zα2p^(1−p^)n\hat{p} + z_{\frac{\alpha}{2}} \sqrt{\frac{\hat{p}(1 - \hat{p})}{n}}

    • Example (Teens Texting While Driving): Out of n=800n = 800 teens aged 16–17, x=272x = 272 text while driving (p^=272800=0.34\hat{p} = \frac{272}{800} = 0.34). For a 95% confidence interval (z0.025=1.96z_{0.025} = 1.96):     E=1.960.34(1−0.34)800=0.033E = 1.96 \sqrt{\frac{0.34(1 - 0.34)}{800}} = 0.033     Lower Bound=0.34−0.033=0.307,Upper Bound=0.34+0.033=0.373\text{Lower Bound} = 0.34 - 0.033 = 0.307, \quad \text{Upper Bound} = 0.34 + 0.033 = 0.373

    • Increasing confidence to 99% (z0.005=2.575z_{0.005} = 2.575) expands the margin of error:     E=2.5750.34(0.66)800=0.043E = 2.575 \sqrt{\frac{0.34(0.66)}{800}} = 0.043     Interval: (0.297,0.383)\text{Interval: } (0.297, 0.383)

  • Sample Size Determination for Estimating Proportion (pp):

    • When a prior estimate p^\hat{p} is available:     n=p^(1−p^)(zα2E)2n = \hat{p}(1 - \hat{p}) \left( \frac{z_{\frac{\alpha}{2}}}{E} \right)^2

    • When no prior estimate is available (using the worst-case maximum variance where p^=0.5\hat{p} = 0.5 and p^(1−p^)=0.25\hat{p}(1 - \hat{p}) = 0.25):     n=0.25(zα2E)2n = 0.25 \left( \frac{z_{\frac{\alpha}{2}}}{E} \right)^2

    • Note: Always round up to the nearest whole integer.

    • Carpooling Example: Target margin of error E=0.02E = 0.02 at 90% confidence (z0.05=1.645z_{0.05} = 1.645):

    • With prior estimate p^=0.10\hat{p} = 0.10:       n=0.10(1−0.10)(1.6450.02)2=608.9  ⟹  609n = 0.10(1 - 0.10) \left( \frac{1.645}{0.02} \right)^2 = 608.9 \implies 609

    • Without prior estimate:       n=0.25(1.6450.02)2=1691.3  ⟹  1692n = 0.25 \left( \frac{1.645}{0.02} \right)^2 = 1691.3 \implies 1692

  • Student's tt-Distribution Properties:

    • Developed by William S. Gosset under the pseudonym "Student".

    • When sampling from a normal population with unknown standard deviation σ\sigma, the statistic:     t=xˉ−μsnt = \frac{\bar{x} - \mu}{\frac{s}{\sqrt{n}}}     follows Student's tt-distribution with n−1n - 1 degrees of freedom (dfdf).

    • Characteristics:

    • Centered at 0 and symmetric about 0.

    • Total area under the curve is 1.

    • Possesses heavier, longer tails than the standard normal distribution due to the additional variability introduced by using sample standard deviation ss in place of σ\sigma.

    • As sample size nn (and degrees of freedom) increases, the tt-distribution approaches the standard normal distribution.


Comparison of Student's t-distributions and Standard Normal curve
  • Confidence Intervals for a Population Mean (μ\mu):

    • Requirements: Random sampling, n≤0.05Nn \le 0.05N, and either the parent population is normal with no outliers, or n≥30n \ge 30.

    • Formula:     xˉ±tα2⋅sn\bar{x} \pm t_{\frac{\alpha}{2}} \cdot \frac{s}{\sqrt{n}}     with critical value tα2t_{\frac{\alpha}{2}} determined using df=n−1df = n - 1.

    • Example (2019 Honda Accord Hybrid MPG): Sample data (n=16n = 16): 42.3, 43.6, 48.2, 40.0, 39.0, 42.9, 44.8, 43.0, 40.7, 38.6, 39.0, 44.5, 35.5, 45.1, 35.4, 42.2.

    • xˉ=41.55 mpg\bar{x} = 41.55\,\text{mpg}, s=3.51 mpgs = 3.51\,\text{mpg}.

    • Normal probability plot has correlation r=0.985>0.941r = 0.985 > 0.941, with no outliers.

    • For 95% confidence (df=15df = 15), Table VI yields t0.025=2.131t_{0.025} = 2.131.     Lower Bound=41.55−2.131⋅3.5116=41.55−1.87=39.68\text{Lower Bound} = 41.55 - 2.131 \cdot \frac{3.51}{\sqrt{16}} = 41.55 - 1.87 = 39.68     Upper Bound=41.55+2.131⋅3.5116=41.55+1.87=43.42\text{Upper Bound} = 41.55 + 2.131 \cdot \frac{3.51}{\sqrt{16}} = 41.55 + 1.87 = 43.42

    • Sample Size for Estimating μ\mu:     n=(zα2⋅sE)2n = \left( \frac{z_{\frac{\alpha}{2}} \cdot s}{E} \right)^2

    • To estimate mean MPG within E=0.5 mpgE = 0.5\,\text{mpg} at 95% confidence (z0.025=1.96z_{0.025} = 1.96, s=3.51s = 3.51):       n=(1.96⋅3.510.5)2=189.3  ⟹  190n = \left( \frac{1.96 \cdot 3.51}{0.5} \right)^2 = 189.3 \implies 190

  • Confidence Intervals for Population Variance (σ2\sigma^2) and Standard Deviation (σ\sigma):

    • If a sample of size nn is drawn from a normal population, then:     χ2=(n−1)s2σ2\chi^2 = \frac{(n - 1)s^2}{\sigma^2}     follows a chi-square distribution with df=n−1df = n - 1.

    • Properties of the χ2\chi^2-distribution:

    • Non-symmetric (skewed right), non-negative (χ2≥0\chi^2 \ge 0).

    • Becomes more symmetric as degrees of freedom increase.

    • Not robust: Strict normality of the underlying population is mandatory.


Chi-square distributions for various degrees of freedom
  • Confidence Interval for Variance (σ2\sigma^2):     Lower Bound=(n−1)s2χα22,Upper Bound=(n−1)s2χ1−α22\text{Lower Bound} = \frac{(n - 1)s^2}{\chi_{\frac{\alpha}{2}}^2}, \quad \text{Upper Bound} = \frac{(n - 1)s^2}{\chi_{1 - \frac{\alpha}{2}}^2}

  • Confidence Interval for Standard Deviation (σ\sigma):     (n−1)s2χα22<σ<(n−1)s2χ1−α22\sqrt{\frac{(n - 1)s^2}{\chi_{\frac{\alpha}{2}}^2}} < \sigma < \sqrt{\frac{(n - 1)s^2}{\chi_{1 - \frac{\alpha}{2}}^2}}

  • Note that this interval is not of the form point estimate±margin of error\text{point estimate} \pm \text{margin of error} because the chi-square distribution is skewed.

  • Example (Used Chevy Corvette Prices): Sample of n=12n = 12 six-year-old Corvettes has s=$2615.19s = \$2615.19 (s2=6,839,205.5s^2 = 6,839,205.5).

    • Level of confidence: 90% (α=0.10\alpha = 0.10, df=11df = 11).

    • Critical values: χ0.052=19.675\chi_{0.05}^2 = 19.675, χ0.952=4.575\chi_{0.95}^2 = 4.575.     Variance Lower Bound=11(2615.19)219.675=3,823,705.52\text{Variance Lower Bound} = \frac{11(2615.19)^2}{19.675} = 3,823,705.52     Variance Upper Bound=11(2615.19)24.575=16,444,023.19\text{Variance Upper Bound} = \frac{11(2615.19)^2}{4.575} = 16,444,023.19     \text{Standard Deviation Interval: } \sqrt{3,823,705.52} \approx \1955 < \sigma < \sqrt{16,444,023.19} \approx \40554055


Decision tree for constructing confidence intervals for a parameter
  • Resampling Methods and Bootstrapping:

    • Nonparametric alternative when parametric normality assumptions fail.

    • Bootstrapping treats sample data of size nn as a pseudo-population and repeatedly draws BB resamples of size nn with replacement.

    • Requirements: The center of the bootstrap distribution must align with the original sample center, and the bootstrap distribution must be symmetric.

    • Percentile Method: For a (1−α)×100%(1 - \alpha) \times 100\% confidence interval, find the (α2)×100th\left(\frac{\alpha}{2}\right) \times 100^{\text{th}} percentile (lower bound) and the (1−α2)×100th\left(1 - \frac{\alpha}{2}\right) \times 100^{\text{th}} percentile (upper bound).

    • Accord Hybrid Example (B=2000B = 2000 resamples): The 2.5th percentile was 39.90 (StatCrunch: 39.88) mpg and the 97.5th percentile was 43.23 mpg, aligning closely with the parametric tt-interval of (39.68, 43.42).

    • Caveat: The standard error of bootstrap distributions tends to be narrower by a factor of n−1n\sqrt{\frac{n - 1}{n}} relative to sn\frac{s}{\sqrt{n}}.


Bootstrap distribution of sample means based on 2000 resamples

Hypothesis Testing Foundations & Single-Parameter Tests

  • Logic of Hypothesis Testing:

    • A hypothesis is a statement regarding a characteristic of one or more populations.

    • Hypothesis testing evaluates sample evidence against a baseline assumption using probability models.

    • Coin-Flipping Metaphor: If a friend flips 5 consecutive tails in a game (P(5 tails)=(0.5)5=0.03125P(\text{5 tails}) = (0.5)^5 = 0.03125), this result occurs by chance in about 3 out of 100 experiments. Because it is unusual under the fair-coin model, it provides evidence of cheating.

  • Null and Alternative Hypotheses:

    • Null Hypothesis (H0H_0): A statement of status quo, no change, no effect, or no difference. Always contains a statement of equality (==).

    • Alternative Hypothesis (H1H_1): The statement seeking supporting evidence.

    • Test structures:

    • Two-tailed: H0:parameter=valueH_0: \text{parameter} = \text{value} versus H1:parameter≠valueH_1: \text{parameter} \neq \text{value}

    • Left-tailed: H0:parameter=valueH_0: \text{parameter} = \text{value} versus H1:parameter<valueH_1: \text{parameter} < \text{value}

    • Right-tailed: H0:parameter=valueH_0: \text{parameter} = \text{value} versus H1:parameter>valueH_1: \text{parameter} > \text{value}

  • Decision Outcomes and Error Types:

    • Four possible outcomes:

    • Reject H0H_0 when H1H_1 is true: Correct Decision.

    • Do not reject H0H_0 when H0H_0 is true: Correct Decision.

    • Reject H0H_0 when H0H_0 is true: Type I Error (probability α\alpha, the level of significance).

    • Do not reject H0H_0 when H1H_1 is true: Type II Error (probability β\beta).

    • As α\alpha increases, β\beta decreases, and vice versa.

    • Acceptance Fallacy: The null hypothesis is never "accepted." Because full population data is not observed, the conclusion is strictly "do not reject H0H_0", analogous to a "not guilty" legal verdict.

  • Testing Hypotheses Regarding a Proportion (pp):

    • Requirements: Simple random sample or randomized experiment, np0(1−p0)≥10n p_0 (1 - p_0) \ge 10, and n≤0.05Nn \le 0.05N.

    • Test statistic:     z0=p^−p0p0(1−p0)nz_0 = \frac{\hat{p} - p_0}{\sqrt{\frac{p_0(1 - p_0)}{n}}}

    • Classical rejection criteria:

    • Two-tailed: Reject H0H_0 if z0<−zα2z_0 < -z_{\frac{\alpha}{2}} or z0>zα2z_0 > z_{\frac{\alpha}{2}}

    • Left-tailed: Reject H0H_0 if z0<−zαz_0 < -z_\alpha

    • Right-tailed: Reject H0H_0 if z0>zαz_0 > z_\alpha

    • PP-value rejection rule: Reject H0H_0 if P-value<αP\text{-value} < \alpha.

    • Example 1 (Humira Adverse Reaction - Right-Tailed):

    • H0:p=0.08H_0: p = 0.08 versus H1:p>0.08H_1: p > 0.08, α=0.05\alpha = 0.05.

    • Sample: n=705n = 705, x=66x = 66 reporting nausea (p^=66705≈0.094\hat{p} = \frac{66}{705} \approx 0.094

    • Model check: np0(1−p0)=705(0.08)(0.92)=51.888≥10n p_0 (1 - p_0) = 705(0.08)(0.92) = 51.888 \ge 10.

    • Test statistic:       z0=0.094−0.080.08(1−0.08)705=1.37z_0 = \frac{0.094 - 0.08}{\sqrt{\frac{0.08(1 - 0.08)}{705}}} = 1.37

    • Critical value: z0.05=1.645z_{0.05} = 1.645.

    • PP-value: P(z>1.37)=0.0853P(z > 1.37) = 0.0853 (Minitab: 0.091).

    • Decision: Since 1.37<1.6451.37 < 1.645 (and 0.0853>0.050.0853 > 0.05), do not reject H0H_0. There is insufficient evidence to conclude the proportion exceeds 0.08.

    • Example 2 (Gun Law Attitudes - Two-Tailed):

    • General population: 53% support stricter gun laws. Sample of college-educated adults: n=780n = 780, x=457x = 457 support (p^=457780≈0.586\hat{p} = \frac{457}{780} \approx 0.586).

    • Hypotheses: H0:p=0.53H_0: p = 0.53 versus H1:p≠0.53H_1: p \neq 0.53, α=0.10\alpha = 0.10.

    • Model check: np0(1−p0)=780(0.53)(0.47)=194.3≥10n p_0 (1 - p_0) = 780(0.53)(0.47) = 194.3 \ge 10.

    • Test statistic:       z0=0.586−0.530.53(1−0.53)780=3.13z_0 = \frac{0.586 - 0.53}{\sqrt{\frac{0.53(1 - 0.53)}{780}}} = 3.13

    • Critical values: ±z0.05=±1.645\pm z_{0.05} = \pm 1.645.

    • PP-value: 2P(z>3.13)=2(0.0009)=0.00182 P(z > 3.13) = 2(0.0009) = 0.0018.

    • Decision: Reject H0H_0 because 3.13>1.6453.13 > 1.645 and 0.0018<0.100.0018 < 0.10. There is sufficient evidence that attitudes differ among college-educated adults.

    • Example 3 (Small-Sample Binomial Test for Proportion):

    • CTIA reports 72% of adult Americans would give up chocolate over cell phones (p=0.72p = 0.72). A survey of n=35n = 35 teens finds x=28x = 28 (p^=2835=0.80\hat{p} = \frac{28}{35} = 0.80). Test at α=0.10\alpha = 0.10 if teen proportion exceeds 0.72.

    • Model check: np0(1−p0)=35(0.72)(0.28)=7.056<10n p_0 (1 - p_0) = 35(0.72)(0.28) = 7.056 < 10 (normal approximation fails).

    • Exact binomial PP-value using X∼Binomial(n=35,p=0.72)X \sim \text{Binomial}(n = 35, p = 0.72):       P(X≥28)=1−P(X≤27)=1−binomcdf(35,0.72,27)=0.1953P(X \ge 28) = 1 - P(X \le 27) = 1 - \text{binomcdf}(35, 0.72, 27) = 0.1953

    • Decision: Since 0.1953>0.100.1953 > 0.10, do not reject H0H_0. Small sample sizes require substantial divergence to achieve significance.

  • Testing Hypotheses Regarding a Population Mean (μ\mu):

    • Requirements: Random sampling, n≤0.05Nn \le 0.05N, normal population or n≥30n \ge 30, no outliers.

    • Test statistic:     t0=xˉ−μ0snt_0 = \frac{\bar{x} - \mu_0}{\frac{s}{\sqrt{n}}}     which follows Student's tt-distribution with df=n−1df = n - 1.

    • Example 1 (Student Debt - Large Sample, Left-Tailed):

    • National average debt payment: $242.64. Wyoming sample: n=70n = 70, xˉ=$176.46\bar{x} = \$176.46, s=$163.56s = \$163.56, α=0.05\alpha = 0.05.

    • Hypotheses: H0:μ=$242.64H_0: \mu = \$242.64 versus H1:μ<$242.64H_1: \mu < \$242.64.

    • Test statistic:       t0=176.46−242.64163.5670=−3.385t_0 = \frac{176.46 - 242.64}{\frac{163.56}{\sqrt{70}}} = -3.385

    • Critical value (df=70df = 70): −t0.05=−1.667-t_{0.05} = -1.667.

    • PP-value: Area under tt-distribution (df=70df = 70) left of −3.385-3.385 is between 0.0005 and 0.001 (TI-84: 0.0006).

    • Decision: Reject H0H_0 (−3.385<−1.667-3.385 < -1.667). Wyoming monthly student debt payments are significantly lower.

    • Example 2 (Snickers Fun Size Weight - Small Sample, Two-Tailed):

    • Factory target weight: 20.1 grams. Random sample of n=11n = 11 bars yields xˉ=20.301 g\bar{x} = 20.301\,\text{g}, s=0.64 gs = 0.64\,\text{g}, α=0.01\alpha = 0.01.

    • Normal probability plot correlation r=0.967>0.923r = 0.967 > 0.923; boxplot shows no outliers.

    • Hypotheses: H0:μ=20.1H_0: \mu = 20.1 versus H1:μ≠20.1H_1: \mu \neq 20.1.

    • Test statistic:       t0=20.301−20.10.6411=1.042t_0 = \frac{20.301 - 20.1}{\frac{0.64}{\sqrt{11}}} = 1.042

    • Critical values (df=10df = 10): ±t0.005=±3.169\pm t_{0.005} = \pm 3.169.

    • PP-value: Between 0.30 and 0.40 (Minitab: 0.323).

    • Decision: Do not reject H0H_0. Machine remains in calibration.

    • Statistical versus Practical Significance:

    • Collin County commute time: baseline μ=29.3 minutes\mu = 29.3\,\text{minutes}. Sample of n=2500n = 2500 commuters yields xˉ=29.0 minutes\bar{x} = 29.0\,\text{minutes}, s=8.5 minutess = 8.5\,\text{minutes}, α=0.05\alpha = 0.05.

    • Test statistic:       t0=29.0−29.38.52500=−1.765t_0 = \frac{29.0 - 29.3}{\frac{8.5}{\sqrt{2500}}} = -1.765

    • Critical value (df>1000df > 1000): −t0.05=−1.645-t_{0.05} = -1.645.

    • PP-value: 0.025<P<0.050.025 < P < 0.05 (Technology: 0.0389).

    • Result is statistically significant (t0<−1.645t_0 < -1.645), but a reduction of 0.3 minutes (18 seconds) lacks practical significance in daily commuting.

  • Testing Hypotheses Regarding Standard Deviation (σ\sigma) or Variance (σ2\sigma^2):

    • Requirements: Simple random sample, normal population (non-robust test).

    • Test statistic:     χ02=(n−1)s2σ02\chi_0^2 = \frac{(n - 1)s^2}{\sigma_0^2}     follows chi-square distribution with df=n−1df = n - 1.

    • Example (Snickers Weight Consistency - Left-Tailed):

    • Previous machine standard deviation σ0=0.75 g\sigma_0 = 0.75\,\text{g}. Test if recalibration reduced variability (H0:σ=0.75H_0: \sigma = 0.75 vs H1:σ<0.75H_1: \sigma < 0.75) at α=0.05\alpha = 0.05.

    • Sample of n=11n = 11 bars gives s=0.6404 gs = 0.6404\,\text{g}.

    • Test statistic:       χ02=(11−1)(0.6404)2(0.75)2=7.291\chi_0^2 = \frac{(11 - 1)(0.6404)^2}{(0.75)^2} = 7.291

    • Critical value (df=10df = 10): χ1−0.052=χ0.952=3.940\chi_{1 - 0.05}^2 = \chi_{0.95}^2 = 3.940.

    • Rejection rule: Reject if χ02<3.940\chi_0^2 < 3.940.

    • PP-value: Area left of 7.291 is greater than 0.10 (StatCrunch: 0.3022).

    • Decision: Do not reject H0H_0. Recalibration did not significantly reduce variance.


Decision tree for single-parameter hypothesis testing
  • Type II Error Probability (β\beta) and Test Power (1−β1 - \beta):

    • Effect Size: The absolute difference between the hypothesized parameter in H0H_0 and the true parameter value.

    • Computing β\beta for a Right-Tailed Test of Proportion (H0:p=0.08H_0: p = 0.08 vs H1:p>0.08H_1: p > 0.08, n=705n = 705, α=0.05\alpha = 0.05):

    • Cut-off value in sample proportion scale:       p^=p0+zαp0(1−p0)n=0.08+1.6450.08(0.92)705=0.097\hat{p} = p_0 + z_\alpha \sqrt{\frac{p_0(1 - p_0)}{n}} = 0.08 + 1.645 \sqrt{\frac{0.08(0.92)}{705}} = 0.097

    • Reject H0H_0 if p^>0.097\hat{p} > 0.097, fail to reject if p^≤0.097\hat{p} \le 0.097.

    • If true parameter is p=0.09p = 0.09, the distribution of p^\hat{p} has μp^=0.09\mu_{\hat{p}} = 0.09 and σp^=0.09(0.91)705=0.0108\sigma_{\hat{p}} = \sqrt{\frac{0.09(0.91)}{705}} = 0.0108.

    • Probability of Type II error:       β=P(p^≤0.097∣p=0.09)=P(z<0.097−0.090.09(0.91)705)=P(z<0.65)=0.7422\beta = P(\hat{p} \le 0.097 \mid p = 0.09) = P\left( z < \frac{0.097 - 0.09}{\sqrt{\frac{0.09(0.91)}{705}}} \right) = P(z < 0.65) = 0.7422

    • Power of the test:       Power=1−β=1−0.7422=0.2578\text{Power} = 1 - \beta = 1 - 0.7422 = 0.2578


Distribution of sample proportions under H0 and alternative hypothesis illustrating Type I error, Type II error, and effect size
  • Power and Type II Error across alternative pp values (H0:p=0.08,n=705H_0: p = 0.08, n = 705):

    • p=0.12p = 0.12 (Effect size: 0.04): β=0.0301\beta = 0.0301, Power=0.9699\text{Power} = 0.9699

    • p=0.11p = 0.11 (Effect size: 0.03): β=0.1357\beta = 0.1357, Power=0.8643\text{Power} = 0.8643

    • p=0.105p = 0.105 (Effect size: 0.025): β=0.2451\beta = 0.2451, Power=0.7549\text{Power} = 0.7549

    • p=0.10p = 0.10 (Effect size: 0.02): β=0.3936\beta = 0.3936, Power=0.6064\text{Power} = 0.6064

    • p=0.095p = 0.095 (Effect size: 0.015): β=0.5714\beta = 0.5714, Power=0.4286\text{Power} = 0.4286

    • p=0.09p = 0.09 (Effect size: 0.01): β=0.7422\beta = 0.7422, Power=0.2578\text{Power} = 0.2578

    • p=0.085p = 0.085 (Effect size: 0.005): β=0.8729\beta = 0.8729, Power=0.1271\text{Power} = 0.1271

  • Principles of Test Power:

    • As effect size increases, power increases.

    • As sample size nn increases, power increases.


Power curve showing test power versus actual values of parameter p

Statistical Inference on Two Population Parameters

  • Independent versus Dependent Sampling:

    • Independent sampling: The selection of individuals in one sample has no influence on the selection of individuals in the second sample.

    • Dependent sampling (Matched-Pairs): Individuals selected for one sample are paired or matched with individuals in the second sample (e.g., pre-test/post-test on the same subject, twins, identical test products across two platforms).

  • Inference for Two Proportions (Independent Samples):

    • Point estimate of difference: p^1−p^2\hat{p}_1 - \hat{p}_2.

    • Standard error of difference:     σp^1−p^2=p1(1−p1)n1+p2(1−p2)n2\sigma_{\hat{p}_1 - \hat{p}_2} = \sqrt{\frac{p_1(1 - p_1)}{n_1} + \frac{p_2(1 - p_2)}{n_2}}

    • Under H0:p1=p2=pH_0: p_1 = p_2 = p, sample proportions are combined into a pooled estimate of pp:     p^=x1+x2n1+n2\hat{p} = \frac{x_1 + x_2}{n_1 + n_2}

    • Test statistic:     z0=p^1−p^2p^(1−p^)(1n1+1n2)z_0 = \frac{\hat{p}_1 - \hat{p}_2}{\sqrt{\hat{p}(1 - \hat{p}) \left( \frac{1}{n_1} + \frac{1}{n_2} \right)}}

    • Requirements: Random sampling, independent samples, n1p^1(1−p^1)≥10n_1 \hat{p}_1 (1 - \hat{p}_1) \ge 10, n2p^2(1−p^2)≥10n_2 \hat{p}_2 (1 - \hat{p}_2) \ge 10, and sample sizes ni≤0.05Nin_i \le 0.05N_i.

    • Example (Nasonex vs. Placebo Headaches):

    • Group 1 (Nasonex): n1=2103n_1 = 2103, x1=547x_1 = 547 (p^1=0.260\hat{p}_1 = 0.260).

    • Group 2 (Placebo): n2=1671n_2 = 1671, x2=368x_2 = 368 (p^2=0.220\hat{p}_2 = 0.220).

    • H0:p1=p2H_0: p_1 = p_2 versus H1:p1>p2H_1: p_1 > p_2, α=0.05\alpha = 0.05.

    • Pooled estimate:       p^=547+3682103+1671=9153774=0.242\hat{p} = \frac{547 + 368}{2103 + 1671} = \frac{915}{3774} = 0.242

    • Test statistic:       z0=0.260−0.2200.242(1−0.242)(12103+11671)=2.85z_0 = \frac{0.260 - 0.220}{\sqrt{0.242(1 - 0.242) \left( \frac{1}{2103} + \frac{1}{1671} \right)}} = 2.85

    • Critical value: z0.05=1.645z_{0.05} = 1.645.

    • PP-value: P(z>2.85)=0.0022P(z > 2.85) = 0.0022 (Minitab: 0.002).

    • Decision: Reject H0H_0 (2.85>1.6452.85 > 1.645). Nasonex users experience significantly higher incidence of headaches.

    • Confidence Interval for p1−p2p_1 - p_2:     (p^1−p^2)±zα2p^1(1−p^1)n1+p^2(1−p^2)n2(\hat{p}_1 - \hat{p}_2) \pm z_{\frac{\alpha}{2}} \sqrt{\frac{\hat{p}_1(1 - \hat{p}_1)}{n_1} + \frac{\hat{p}_2(1 - \hat{p}_2)}{n_2}}

    • Example (Moral Values 2022 vs. 2002): 2022 sample: n1=1007n_1 = 1007, x1=784x_1 = 784 (p^1=0.779\hat{p}_1 = 0.779); 2002 sample: n2=1100n_2 = 1100, x2=737x_2 = 737 (p^2=0.670\hat{p}_2 = 0.670). Construct 90% CI (z0.05=1.645z_{0.05} = 1.645):       p^1−p^2=0.779−0.670=0.109\hat{p}_1 - \hat{p}_2 = 0.779 - 0.670 = 0.109       E=1.6450.779(0.221)1007+0.670(0.330)1100=0.032E = 1.645 \sqrt{\frac{0.779(0.221)}{1007} + \frac{0.670(0.330)}{1100}} = 0.032       Interval: (0.077,0.141)(R: 0.0768,0.1403)\text{Interval: } (0.077, 0.141) \quad (\text{R: } 0.0768, 0.1403)

    • Sample size for estimating p1−p2p_1 - p_2 within margin of error EE:

    • Prior estimates: n1=n2=[p^1(1−p^1)+p^2(1−p^2)](zα2E)2n_1 = n_2 = [\hat{p}_1(1 - \hat{p}_1) + \hat{p}_2(1 - \hat{p}_2)] \left( \frac{z_{\frac{\alpha}{2}}}{E} \right)^2

    • No prior estimates: n1=n2=0.5(zα2E)2n_1 = n_2 = 0.5 \left( \frac{z_{\frac{\alpha}{2}}}{E} \right)^2

    • Target: E=0.03E = 0.03, 95% confidence (z0.025=1.96z_{0.025} = 1.96). With p^1=0.62,p^2=0.55\hat{p}_1 = 0.62, \hat{p}_2 = 0.55: n=2062.1  ⟹  2063n = 2062.1 \implies 2063 per group. Without estimates: n=2134.2  ⟹  2135n = 2134.2 \implies 2135 per group.

  • Inference for Two Means: Dependent Samples (Matched Pairs):

    • Differences are computed per pair: di=Xi−Yid_i = X_i - Y_i.

    • Test statistic:     t0=dˉ−μdsdnt_0 = \frac{\bar{d} - \mu_d}{\frac{s_d}{\sqrt{n}}}     with df=n−1df = n - 1, where dˉ\bar{d} is the mean difference and sds_d is the sample standard deviation of differences.

    • Confidence interval for μd\mu_d:     dˉ±tα2⋅sdn\bar{d} \pm t_{\frac{\alpha}{2}} \cdot \frac{s_d}{\sqrt{n}}

    • Example (Dominant vs. Nondominant Hand Reaction Times):

    • Data (n=12n = 12 students, dominant minus nondominant):

      • Student 1: 0.177, 0.179 (d1=−0.002d_1 = -0.002)

      • Student 2: 0.210, 0.202 (d2=0.008d_2 = 0.008)

      • Student 3: 0.186, 0.208 (d3=−0.022d_3 = -0.022)

      • Student 4: 0.189, 0.184 (d4=0.005d_4 = 0.005)

      • Student 5: 0.198, 0.215 (d5=−0.017d_5 = -0.017)

      • Student 6: 0.194, 0.193 (d6=0.001d_6 = 0.001)

      • Student 7: 0.160, 0.194 (d7=−0.034d_7 = -0.034)

      • Student 8: 0.163, 0.160 (d8=0.003d_8 = 0.003)

      • Student 9: 0.166, 0.209 (d9=−0.043d_9 = -0.043)

      • Student 10: 0.152, 0.164 (d10=−0.012d_{10} = -0.012)

      • Student 11: 0.190, 0.210 (d11=−0.020d_{11} = -0.020)

      • Student 12: 0.172, 0.197 (d12=−0.025d_{12} = -0.025)

      • ∑di=−0.158\sum d_i = -0.158, dˉ=−0.0132 s\bar{d} = -0.0132\,\text{s}, sd=0.0164 ss_d = 0.0164\,\text{s}.

    • Normality check: correlation r=0.978>0.928r = 0.978 > 0.928, no outliers.

    • Hypotheses: H0:μd=0H_0: \mu_d = 0 versus H1:μd<0H_1: \mu_d < 0, α=0.05\alpha = 0.05.

    • Test statistic:       t0=−0.0132−00.016412=−2.788t_0 = \frac{-0.0132 - 0}{\frac{0.0164}{\sqrt{12}}} = -2.788

    • Critical value (df=11df = 11): −t0.05=−1.796-t_{0.05} = -1.796.

    • PP-value: Between 0.005 and 0.01 (StatCrunch: 0.009).

    • Decision: Reject H0H_0 (−2.788<−1.796-2.788 < -1.796). Reaction time in the dominant hand is significantly faster.

    • 95% Confidence Interval (t0.025=2.201t_{0.025} = 2.201):       −0.0132±2.201⋅0.016412=−0.0132±0.0104  ⟹  (−0.0236,−0.0028) seconds-0.0132 \pm 2.201 \cdot \frac{0.0164}{\sqrt{12}} = -0.0132 \pm 0.0104 \implies (-0.0236, -0.0028)\,\text{seconds}       (TI-84 calculator yields: −0.0236-0.0236 to −0.0027-0.0027 seconds).

  • Inference for Two Means: Independent Samples (Welch's tt-Test):

    • When population standard deviations σ1\sigma_1 and σ2\sigma_2 are unknown, the test statistic is:     t0=(xˉ1−xˉ2)−(μ1−μ2)s12n1+s22n2t_0 = \frac{(\bar{x}_1 - \bar{x}_2) - (\mu_1 - \mu_2)}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}}

    • Conservative by-hand degrees of freedom: smaller of n1−1n_1 - 1 or n2−1n_2 - 1.

    • Satterthwaite approximation for degrees of freedom (used by statistical software):     df=(s12n1+s22n2)2(s12n1)2n1−1+(s22n2)2n2−1df = \frac{\left( \frac{s_1^2}{n_1} + \frac{s_2^2}{n_2} \right)^2}{\frac{\left( \frac{s_1^2}{n_1} \right)^2}{n_1 - 1} + \frac{\left( \frac{s_2^2}{n_2} \right)^2}{n_2 - 1}}

    • Example 1 (Spacelab Rats Red Blood Cell Mass - Two-Tailed):

    • Flight: n1=14n_1 = 14, xˉ1=7.881\bar{x}_1 = 7.881, s1=1.017s_1 = 1.017.

    • Control: n2=14n_2 = 14, xˉ2=8.430\bar{x}_2 = 8.430, s2=1.005s_2 = 1.005.

    • Hypotheses: H0:μ1=μ2H_0: \mu_1 = \mu_2 versus H1:μ1≠μ2H_1: \mu_1 \neq \mu_2, α=0.05\alpha = 0.05.

    • Test statistic:       t0=(7.881−8.430)−01.017214+1.005214=−0.5490.3821=−1.437t_0 = \frac{(7.881 - 8.430) - 0}{\sqrt{\frac{1.017^2}{14} + \frac{1.005^2}{14}}} = \frac{-0.549}{0.3821} = -1.437

    • Conservative critical values (df=13df = 13): ±t0.025=±2.160\pm t_{0.025} = \pm 2.160.

    • PP-value: 0.10<P<0.200.10 < P < 0.20 (R output with df=25.996df = 25.996 gives p=0.1627p = 0.1627).

    • Decision: Do not reject H0H_0. Insufficient evidence of a difference in red blood cell mass.

    • Example 2 (Low-Level Laser Therapy for Hair Loss - 95% Confidence Interval):

    • Lasercomb: nL=43n_L = 43, xˉL=20.2\bar{x}_L = 20.2, sL=11.2s_L = 11.2.

    • Placebo: nC=22n_C = 22, xˉC=2.8\bar{x}_C = 2.8, sC=16.5s_C = 16.5.

    • Conservative df=22−1=21df = 22 - 1 = 21, t0.025=2.080t_{0.025} = 2.080.     Margin of Error: 2.08011.2243+16.5222=2.080(3.896)≈8.1\text{Margin of Error: } 2.080 \sqrt{\frac{11.2^2}{43} + \frac{16.5^2}{22}} = 2.080(3.896) \approx 8.1     Interval: (20.2−2.8)±8.1=17.4±8.1  ⟹  (9.3,25.5) hairs/cm2\text{Interval: } (20.2 - 2.8) \pm 8.1 = 17.4 \pm 8.1 \implies (9.3, 25.5)\,\text{hairs/cm}^2     (Minitab using exact degrees of freedom yields: 9.42 to 25.38 hairs/cm2^2).

    • Pooled Two-Sample tt-Test Comparison:

    • Valid only when σ12=σ22\sigma_1^2 = \sigma_2^2. Combines variance estimates with df=n1+n2−2df = n_1 + n_2 - 2.

    • Because equality of population variances cannot be reliably verified from sample data, Welch's tt-test is preferred.

  • Inference for Two Population Standard Deviations (Fisher's FF-Distribution):

    • When independent random samples are drawn from normally distributed populations, the ratio of sample variances follows Fisher's FF-distribution:     F=s12s22F = \frac{s_1^2}{s_2^2}     with n1−1n_1 - 1 numerator degrees of freedom and n2−1n_2 - 1 denominator degrees of freedom.


Family of F-distributions for varying numerator and denominator degrees of freedom
  • Properties of FF-distribution: Skewed right, non-negative (F≥0F \ge 0), total area equals 1.

  • Reciprocal Property for Left-Tail Critical Values:     F1−α,n1−1,n2−1=1Fα,n2−1,n1−1F_{1 - \alpha, n_1 - 1, n_2 - 1} = \frac{1}{F_{\alpha, n_2 - 1, n_1 - 1}}

  • Example 1 (Critical Values):

    • Right-tailed, α=0.05\alpha = 0.05, dfN=10df_N = 10, dfD=7df_D = 7: Table VII gives F0.05,10,7=3.64F_{0.05, 10, 7} = 3.64.

    • Two-tailed, α=0.05\alpha = 0.05, dfN=15df_N = 15, dfD=20df_D = 20: Right critical value F0.025,15,20=2.57F_{0.025, 15, 20} = 2.57. Left critical value:       F0.975,15,20=1F0.025,20,15=12.76≈0.36F_{0.975, 15, 20} = \frac{1}{F_{0.025, 20, 15}} = \frac{1}{2.76} \approx 0.36

  • Example 2 (Stock Volatility - Cisco vs. General Electric):

    • Cisco: n1=10n_1 = 10, s1=11.84%s_1 = 11.84\%; GE: n2=14n_2 = 14, s2=4.32%s_2 = 4.32\%.

    • Hypotheses: H0:σ12=σ22H_0: \sigma_1^2 = \sigma_2^2 versus H1:σ12>σ22H_1: \sigma_1^2 > \sigma_2^2, α=0.05\alpha = 0.05.

    • Test statistic:       F0=11.8424.322=7.51F_0 = \frac{11.84^2}{4.32^2} = 7.51

    • Critical value (dfN=9df_N = 9, dfD=13≈12df_D = 13 \approx 12): F0.05,9,12=2.80F_{0.05, 9, 12} = 2.80.

    • PP-value: P(F>7.51)=0.0007P(F > 7.51) = 0.0007 (StatCrunch).

    • Decision: Reject H0H_0 (7.51>2.807.51 > 2.80). Cisco stock is significantly more volatile.

  • Example 3 (Spacelab Rats Standard Deviation - Two-Tailed):

    • Flight: n1=14,s1=1.017n_1 = 14, s_1 = 1.017; Control: n2=14,s2=1.005n_2 = 14, s_2 = 1.005, α=0.05\alpha = 0.05.

    • Hypotheses: H0:σ1=σ2H_0: \sigma_1 = \sigma_2 versus H1:σ1≠σ2H_1: \sigma_1 \neq \sigma_2.

    • Test statistic:       F0=1.01721.0052=1.024F_0 = \frac{1.017^2}{1.005^2} = 1.024

    • Critical values (dfN=13,dfD=13≈12df_N = 13, df_D = 13 \approx 12): F0.025,12,12=3.28F_{0.025, 12, 12} = 3.28, F0.975,12,12=13.28≈0.30F_{0.975, 12, 12} = \frac{1}{3.28} \approx 0.30.

    • PP-value: TI-84 reports p=0.9666p = 0.9666.

    • Decision: Do not reject H0H_0. Standard deviations do not differ significantly.


Decision tree for two-sample hypothesis testing

Inference on Categorical Data

  • Chi-Square Goodness-of-Fit Test:

    • Purpose: Tests whether an observed frequency distribution conforms to a specified theoretical probability distribution across kk mutually exclusive categories.

    • Hypotheses:

    • H0H_0: The random variable follows the specified distribution.

    • H1H_1: The random variable does not follow the specified distribution.

    • Expected count for category ii:     Ei=npiE_i = n p_i

    • Test statistic:     χ02=∑i=1k(Oi−Ei)2Ei\chi_0^2 = \sum_{i=1}^{k} \frac{(O_i - E_i)^2}{E_i}

    • Degrees of freedom: df=k−1df = k - 1.

    • Requirements: All expected frequencies Ei≥1E_i \ge 1, and no more than 20% of expected frequencies are less than 5.

    • Directionality: Always right-tailed because large discrepancies between OiO_i and EiE_i increase χ02\chi_0^2.

    • Example 1 (U.S. Household Income Distribution Shift):

    • Survey of n=1500n = 1500 households across 9 income brackets evaluated against year 2000 distribution percentages at α=0.05\alpha = 0.05:

      • Under $15,000 (p=0.085p = 0.085): Observed O1=139O_1 = 139, Expected E1=1500(0.085)=127.5E_1 = 1500(0.085) = 127.5

      • $15,000 to $24,999 (p=0.089p = 0.089): Observed O2=122O_2 = 122, Expected E2=1500(0.089)=133.5E_2 = 1500(0.089) = 133.5

      • $25,000 to $34,999 (p=0.086p = 0.086): Observed O3=117O_3 = 117, Expected E3=1500(0.086)=129.0E_3 = 1500(0.086) = 129.0

      • $35,000 to $49,999 (p=0.125p = 0.125): Observed O4=163O_4 = 163, Expected E4=1500(0.125)=187.5E_4 = 1500(0.125) = 187.5

      • $50,000 to $74,999 (p=0.171p = 0.171): Observed O5=243O_5 = 243, Expected E5=1500(0.171)=256.5E_5 = 1500(0.171) = 256.5

      • $75,000 to $99,999 (p=0.134p = 0.134): Observed O6=179O_6 = 179, Expected E6=1500(0.134)=201.0E_6 = 1500(0.134) = 201.0

      • $100,000 to $149,999 (p=0.163p = 0.163): Observed O7=242O_7 = 242, Expected E7=1500(0.163)=244.5E_7 = 1500(0.163) = 244.5

      • $150,000 to $199,999 (p=0.074p = 0.074): Observed O8=126O_8 = 126, Expected E8=1500(0.074)=111.0E_8 = 1500(0.074) = 111.0

      • At least $200,000 (p=0.073p = 0.073): Observed O9=169O_9 = 169, Expected E9=1500(0.073)=109.5E_9 = 1500(0.073) = 109.5

    • Test statistic:       χ02=(139−127.5)2127.5+(122−133.5)2133.5+⋯+(169−109.5)2109.5=43.848\chi_0^2 = \frac{(139 - 127.5)^2}{127.5} + \frac{(122 - 133.5)^2}{133.5} + \cdots + \frac{(169 - 109.5)^2}{109.5} = 43.848

    • Critical value (df=9−1=8df = 9 - 1 = 8): χ0.052=15.507\chi_{0.05}^2 = 15.507.

    • PP-value: P(χ2>43.848)<0.005P(\chi^2 > 43.848) < 0.005 (R reports 6.079 \times 10^{-7}$).\n - Decision: Reject H_0. Income distribution has changed significantly since 2000.\n - *Example 2 (Day of the Week Birth Distribution):*\n - Obstetrician evaluates n = 500birthrecordsacrossbirth records acrossk = 7daysatdays at\alpha = 0.01.\n - Null hypothesis: H_0: p_1 = p_2 = \dots = p_7 = \frac{1}{7}.\n - Expected count per day: E_i = 500 \left( \frac{1}{7} \right) \approx 71.429.\n - Observed frequencies:\n - Sunday: 46\n - Monday: 76\n - Tuesday: 83\n - Wednesday: 81\n - Thursday: 81\n - Friday: 80\n - Saturday: 53\n - Test statistic:\n      \chi_0^2 = \frac{\left( 46 - \frac{500}{7} \right)^2}{\frac{500}{7}} + \frac{\left( 76 - \frac{500}{7} \right)^2}{\frac{500}{7}} + \cdots + \frac{\left( 53 - \frac{500}{7} \right)^2}{\frac{500}{7}} = 19.568\n - Critical value (df = 6):):\chi_{0.01}^2 = 16.812.\n - P−value:-value:P(\chi^2 > 19.568) < 0.005 (technology: 0.0033).\n - Decision: Reject H_0. Births do not occur with equal frequency across all days of the week.\n\n- **Chi-Square Test for Independence:**\n - Tests whether an association exists between a row variable and a column variable in a single population sample contingency table.\n - Hypotheses:\n - H_0: The row variable and column variable are independent.\n - H_1: The row variable and column variable are dependent.\n - Expected frequency formula for cell (r, c):\n    \text{Expected frequency} = \frac{(\text{row total}) \cdot (\text{column total})}{\text{table total}}\n - Test statistic:\n    \chi_0^2 = \sum \frac{(O_i - E_i)^2}{E_i}\n - Degrees of freedom:\n    df = (r - 1)(c - 1)\n    where risthenumberofrowsandis the number of rows andc is the number of columns.\n - *Example (Marital Status vs. Happiness):*\n - Data from the General Social Survey (n = 2985),),r = 3happinesslevels,happiness levels,c = 4maritalstatuses,marital statuses,\alpha = 0.05:\n - Observed Counts:\n - Very Happy: Married = 600, Widowed = 63, Divorced/Separated = 112, Never Married = 144 (Row total = 919)\n - Pretty Happy: Married = 720, Widowed = 142, Divorced/Separated = 355, Never Married = 459 (Row total = 1676)\n - Not Too Happy: Married = 93, Widowed = 51, Divorced/Separated = 119, Never Married = 127 (Row total = 390)\n - Column totals: Married = 1413, Widowed = 256, Divorced/Separated = 586, Never Married = 730\n - Expected Counts:\n - Very Happy: Married = 435.025, Widowed = 78.816, Divorced/Separated = 180.413, Never Married = 224.747\n - Pretty Happy: Married = 793.362, Widowed = 143.737, Divorced/Separated = 329.025, Never Married = 409.876\n - Not Too Happy: Married = 184.613, Widowed = 33.447, Divorced/Separated = 76.562, Never Married = 95.377\n - Degrees of freedom: df = (3 - 1)(4 - 1) = 2 \times 3 = 6.\n - Test statistic:\n        \chi_0^2 = \frac{(600 - 435.025)^2}{435.025} + \frac{(63 - 78.816)^2}{78.816} + \cdots + \frac{(127 - 95.377)^2}{95.377} = 224.116\n - Critical value: \chi_{0.05}^2 = 12.592.\n - P−value:-value:P(\chi^2 > 224.116) < 0.005(TI−84reports(TI-84 reports1.379 \times 10^{-45}).\n - Decision: Reject H_0. Marital status and happiness are strongly associated.\n - Conditional Distributions of Happiness given Marital Status:\n - Married: Very Happy = \frac{600}{1413} = 0.425,PrettyHappy=, Pretty Happy =\frac{720}{1413} = 0.510,NotTooHappy=, Not Too Happy = \frac{93}{1413} = 0.066.\n - Widowed: Very Happy = \frac{63}{256} = 0.246,PrettyHappy=, Pretty Happy =\frac{142}{256} = 0.555,NotTooHappy=, Not Too Happy =\frac{51}{256} = 0.199.\n - Divorced/Separated: Very Happy = \frac{112}{586} = 0.191,PrettyHappy=, Pretty Happy =\frac{355}{586} = 0.606,NotTooHappy=, Not Too Happy =\frac{119}{586} = 0.203.\n - Never Married: Very Happy = \frac{144}{730} = 0.197,PrettyHappy=, Pretty Happy =\frac{459}{730} = 0.629,NotTooHappy=, Not Too Happy =\frac{127}{730} = 0.174.\n\n![Bar graph of conditional distribution of happiness by marital status](https://assets.knowt.com/pdf-flow-prod/df28c1cd-a927-468f-aab5-050acafcc0b1-figures/73.jpg)\n\n- **Chi-Square Test for Homogeneity of Proportions:**\n - Purpose: Tests whether multiple independent populations have identical proportions across categorical outcomes.\n - Calculations: Identical to the test for independence, with df = (r - 1)(c - 1).\n - *Example (Zocor Side Effects Across Treatments):*\n - Three treatment groups evaluated for abdominal pain at \alpha = 0.01((n = 1919 total patients):\n - Group 1 (Zocor, total = 1583): Pain = 51 (Expected = 59.393), No Pain = 1532 (Expected = 1523.607)\n - Group 2 (Placebo, total = 157): Pain = 5 (Expected = 5.891), No Pain = 152 (Expected = 151.109)\n - Group 3 (Cholestyramine, total = 179): Pain = 16 (Expected = 6.716), No Pain = 163 (Expected = 172.284)\n - Row totals: Pain = 72, No Pain = 1847.\n - Hypotheses: H_0: p_1 = p_2 = p_3versusversusH_1: At least one proportion differs.\n - Test statistic (df = (2 - 1)(3 - 1) = 2):\n      \chi_0^2 = \frac{(51 - 59.393)^2}{59.393} + \frac{(5 - 5.891)^2}{5.891} + \frac{(16 - 6.716)^2}{6.716} + \frac{(1532 - 1523.607)^2}{1523.607} + \frac{(152 - 151.109)^2}{151.109} + \frac{(163 - 172.284)^2}{172.284} = 14.707\n - Critical value: \chi_{0.01}^2 = 9.210.\n - P−value:-value:P(\chi^2 > 14.707) < 0.005 (StatCrunch: 0.0006).\n - Decision: Reject H_0. Cholestyramine exhibits a significantly higher rate of abdominal pain.\n\n![Conditional bar graph of patients reporting abdominal pain by treatment group](https://assets.knowt.com/pdf-flow-prod/df28c1cd-a927-468f-aab5-050acafcc0b1-figures/78.jpg)\n\n- **Inference for Two Dependent Proportions (McNemar's Test):**\n - Evaluates paired, binary categorical data structured in a 2 \times 2 contingency table:\n - Treatment A Success / Treatment B Success: count f_{11}\n - Treatment A Failure / Treatment B Success: count f_{12}\n - Treatment A Success / Treatment B Failure: count f_{21}\n - Treatment A Failure / Treatment B Failure: count f_{22}\n - Requirement: The total count of discordant pairs must satisfy:\n    f_{12} + f_{21} \ge 10\n - Hypotheses:\n    H_0: p_1 = p_2 \quad \text{versus} \quad H_1: p_1 eq p_2\n - Test statistic (follows a chi-square distribution with df = 1):\n    \chi_0^2 = \frac{(f_{12} - f_{21})^2}{f_{12} + f_{21}}\n - *Example (Government Anti-Terrorism Powers):*\n - Survey of n = 1492Americansontwopairedquestions:PhoneTappingvs.RandomStreetStopsatAmericans on two paired questions: Phone Tapping vs. Random Street Stops at\alpha = 0.05:\n - Random Stop Agree & Tap Phone Agree (f_{11}): 494\n - Random Stop Disagree & Tap Phone Agree (f_{12}): 335\n - Random Stop Agree & Tap Phone Disagree (f_{21}): 126\n - Random Stop Disagree & Tap Phone Disagree (f_{22}): 537\n - Check: f_{12} + f_{21} = 335 + 126 = 461 \ge 10.\n - Test statistic:\n      \chi_0^2 = \frac{(335 - 126)^2}{335 + 126} = \frac{209^2}{461} = \frac{43681}{461} \approx 94.753\n - Critical value (df = 1):):\chi_{0.05}^2 = 3.841.\n - P−value:-value:P(\chi^2 > 94.753) < 0.0001.\n - Decision: Reject H_0((94.753 > 3.841).Americansaresignificantlymorewillingtoallowphonetapping(). Americans are significantly more willing to allow phone tapping (\frac{829}{1492} \approx 55.6\%)thanrandomstreetstops() than random street stops (\frac{620}{1492} \approx 41.6\%$$).