Statistics Review: Confidence Intervals & Hypothesis Testing

Understanding Statistical Inference: Confidence Intervals and Hypothesis Testing

Focus on Logic, Not Memorization of Proofs

  • The primary goal is to understand the logic behind statistical results, not to memorize complex proofs.
  • Proofs are useful to understand once to grasp the underlying meaning of a result, such as knowing that XX^* is a random variable with a specific distribution and the logic for calculating a confidence interval from it.
  • The emphasis is on the practical implications and understanding what the results mean, rather than the exact mathematical derivations.

Population Parameters and Sampling

  • Population too big: Often, we deal with populations that are too large to measure every member.
  • Unknown Parameters: We don't know the true parameters of these populations (e.g., mean (μ\mu), variance (σ2\sigma^2), standard deviation (σ\sigma)).
  • Comparison of Populations: We might want to compare parameters between two or more populations (e.g., μ<em>x1\mu<em>{x1} vs. μ</em>x2\mu</em>{x2} or ratio of variances).
  • Sampling: To learn about population parameters, we take a sample, which is a set of observations.
  • Random Event: The act of drawing a sample is a random event, which can be represented by random variables.
    • Example: Choosing 1010 students from MSU results in different sets of students each time.

Point Estimators

  • Definition: A single value (a statistic derived from a sample) used to estimate an unknown population parameter.
  • Formation: Sample data is 'put together' (e.g., summed, averaged) to estimate parameters.
    • Examples:
      • Sum: Xi\sum X_i
      • Average (Sample Mean): $\bar{X} = \frac{1}{n} \sum{i=1}^{n} Xi
      • Sample Variance: s2=(XiXˉ)2n1s^2 = \frac{\sum (X_i - \bar{X})^2}{n-1} (an unbiased estimator for population variance).
      • Alternative Sample Variance: s<em>b2=(X</em>iXˉ)2ns<em>b^2 = \frac{\sum (X</em>i - \bar{X})^2}{n} (often called the maximum likelihood estimator, but it is a biased estimator for population variance).
  • Properties of Estimators:
    • Unbiasedness: An estimator θ^\hat{\theta} is unbiased if its expected value equals the true population parameter θ\theta (i.e., E[θ^]=θE[\hat{\theta}] = \theta).
      • Example: E[Xˉ]=μXE[\bar{X}] = \mu_X (sample mean is an unbiased estimator of population mean).
      • Example: E[s2]=σ2E[s^2] = \sigma^2 (sample variance with n1n-1 in denominator is an unbiased estimator of population variance).
  • Limitations of Point Estimators: Even if unbiased, a single point estimate doesn't convey the quality or accuracy of the estimation. Increasing sample size (nn) generally improves quality, but we need more precise measures.

Interval Estimators (Confidence Intervals)

  • Purpose: To provide a range of values (an interval) within which the true population parameter is likely to lie, along with a specified level of confidence.
  • Formulation: Finding two estimators (a lower bound θ^<em>1\hat{\theta}<em>1 and an upper bound θ^</em>2\hat{\theta}</em>2) such that the probability of the true parameter θ\theta being between them is 1α1-\alpha (e.g., P(θ^<em>1θθ^</em>2)=1αP(\hat{\theta}<em>1 \le \theta \le \hat{\theta}</em>2) = 1-\alpha).
    • Example: The mean height of MSU students is between 5.75.7 and 5.85.8 feet with 99.95%99.95\% confidence.
    • Interpretation: If we repeat the sampling and interval calculation many times, 1α1-\alpha of these intervals would contain the true population parameter. (e.g., if 1α=0.99951-\alpha = 0.9995, then in 10,00010,000 universities, 99959995 of the calculated intervals would contain the actual mean height).
  • Derivation for Population Mean (μ\mu) with Known Population Standard Deviation (σ\sigma):
    • Assumption: For sufficiently large sample sizes (n30n \geq 30), the sample mean Xˉ\bar{X} is approximately normally distributed: XˉN(μ,σ2n)\bar{X} \sim N(\mu, \frac{\sigma^2}{n}).
    • Standardization: Convert Xˉ\bar{X} to a standard normal variable (Z-score): Z=Xˉμσ/nZ = \frac{\bar{X} - \mu}{\sigma/\sqrt{n}}.
    • Probability Statement: From the Z-distribution table, we find critical values ±Z<em>α/2\pm Z<em>{\alpha/2} such that: P(Z</em>α/2ZZα/2)=1αP(-Z</em>{\alpha/2} \le Z \le Z_{\alpha/2}) = 1-\alpha
    • Rearranging to find Confidence Interval for μ\mu:
      P(XˉZ<em>α/2σnμXˉ+Z</em>α/2σn)=1αP(\bar{X} - Z<em>{\alpha/2}\frac{\sigma}{\sqrt{n}} \le \mu \le \bar{X} + Z</em>{\alpha/2}\frac{\sigma}{\sqrt{n}}) = 1-\alpha
    • The lower bound is θ^<em>1=XˉZ</em>α/2σn\hat{\theta}<em>1 = \bar{X} - Z</em>{\alpha/2}\frac{\sigma}{\sqrt{n}} and the upper bound is θ^<em>2=Xˉ+Z</em>α/2σn\hat{\theta}<em>2 = \bar{X} + Z</em>{\alpha/2}\frac{\sigma}{\sqrt{n}}.
  • Derivation for Population Mean (μ\mu) with Unknown Population Standard Deviation (σ\sigma) or Small Sample Size (n<30n < 30):
    • Use the t-distribution instead of the Z-distribution.
    • Replace population standard deviation σ\sigma with sample standard deviation ss: T=Xˉμs/nT = \frac{\bar{X} - \mu}{s/\sqrt{n}} with n1n-1 degrees of freedom.
    • The process for finding the interval is otherwise similar.
  • Derivation for Population Variance (σ2\sigma^2):
    • Uses the Chi-squared (χ2\chi^2) distribution.
    • Test Statistic: (n1)s2σ2χn12\frac{(n-1)s^2}{\sigma^2} \sim \chi^2_{n-1}.
    • Probability Statement: Find critical values χ2<em>α/2\chi^2<em>{\alpha/2} and χ2</em>1α/2\chi^2</em>{1-\alpha/2} from the Chi-squared table such that:
      P(χ2<em>α/2(n1)s2σ2χ2</em>1α/2)=1αP(\chi^2<em>{\alpha/2} \le \frac{(n-1)s^2}{\sigma^2} \le \chi^2</em>{1-\alpha/2}) = 1-\alpha
      * (Note: The speaker clarifies that for the upper bound of the interval for χ2\chi^2, one typically uses χ2<em>1α/2\chi^2<em>{1-\alpha/2}, which corresponds to the smaller critical value on the left tail, and χ2</em>α/2\chi^2</em>{\alpha/2} for the right tail, since the inequality is inverted when solving for σ2\sigma^2)
    • Rearranging to find Confidence Interval for σ2\sigma^2:
      P((n1)s2χ2<em>1α/2σ2(n1)s2χ2</em>α/2)=1αP(\frac{(n-1)s^2}{\chi^2<em>{1-\alpha/2}} \le \sigma^2 \le \frac{(n-1)s^2}{\chi^2</em>{\alpha/2}}) = 1-\alpha
  • Controlling Confidence Interval Properties:
    • Width vs. Confidence: To increase confidence (1α1-\alpha) while keeping sample size (nn) fixed, the interval must become wider.
    • Width vs. Sample Size: To keep the interval width fixed while increasing confidence, or to narrow the interval for fixed confidence, the sample size (nn) must be increased.
    • This trade-off helps in deciding optimal sample size based on desired precision and confidence.
  • Other Parameters: Similar procedures exist for other parameters like proportions (p<em>1p</em>2p<em>1 - p</em>2) or ratios of variances ($\sigma1^2 / \sigma2^2 which uses the F-distribution, as seen in Fisher's technique).

Hypothesis Testing

  • Core Idea: To check if a claim or belief, formulated as a hypothesis, is supported by available data and evidence.
    • Example: A belief that MSU students are taller than Missouri students.
  • Formulating Hypotheses:
    • Null Hypothesis (H0H_0): A statement about a population parameter that is assumed to be true until evidence suggests otherwise. It typically includes an equality.
      • Example: The mean height of MSU students is 5.65.6 feet (H0:μ=5.6H_0: \mu = 5.6).
    • Alternative Hypothesis (H<em>aH<em>a or H</em>1H</em>1): A statement that contradicts the null hypothesis. It can be:
      • Two-sided: The parameter is not equal to a specific value (e.g., Ha:μ5.6H_a: \mu \neq 5.6).
      • One-sided: The parameter is greater than or less than a specific value (e.g., H<em>a:μ>5.6H<em>a: \mu > 5.6 or Ha: \mu < 5.6).
    • The null and alternative hypotheses should collectively cover all possibilities in the parametric space.
  • Logic of Hypothesis Testing:
    • Assumption: Assume the null hypothesis (H0H_0) is true.
    • Sampling and Test Statistic: Take a sample and calculate a test statistic (e.g., Xˉ\bar{X}).
    • Probability under H<em>0H<em>0: Determine the probability of observing a test statistic as extreme as, or more extreme than, the one obtained, assuming H</em>0H</em>0 is true.
    • Decision: If this probability is very low (below a predetermined significance level α\alpha), then it casts doubt on the initial assumption that H<em>0H<em>0 is true, and we reject H</em>0H</em>0. Otherwise, we fail to reject H0H_0.
  • Critical Region (Rejection Region):
    • Significance Level (α\alpha): A chosen threshold (e.g., 0.050.05 or 5%5\%). It represents the maximum probability of making a Type I error.
    • Critical Values: Based on α\alpha and the distribution of the test statistic (assuming H0H_0 is true), we find critical values that define the boundaries of the critical region.
    • Decision Rule: If the calculated test statistic falls within the critical region, we reject H0H_0.
    • Example for Mean (μ\mu) with Known σ\sigma (Two-sided test H<em>0:μ=μ</em>0H<em>0: \mu = \mu</em>0 vs. H<em>a:μμ</em>0H<em>a: \mu \neq \mu</em>0):
      • Test statistic: Z=Xˉμ0σ/nZ = \frac{\bar{X} - \mu_0}{\sigma/\sqrt{n}}.
      • Critical Region: Reject H<em>0H<em>0 if Z<Z</em>α/2Z < -Z</em>{\alpha/2} or Z > Z_{\alpha/2}.
  • Conclusion Statement:
    • If the test statistic is in the critical region: