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 X^* 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 (\sigma^2), standard deviation (\sigma)).
- Comparison of Populations: We might want to compare parameters between two or more populations (e.g., \mu{x1} vs. \mu{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 10 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: \sum X_i
- Average (Sample Mean): $\bar{X} = \frac{1}{n} \sum{i=1}^{n} Xi
- Sample Variance: s^2 = \frac{\sum (X_i - \bar{X})^2}{n-1} (an unbiased estimator for population variance).
- Alternative Sample Variance: sb^2 = \frac{\sum (Xi - \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[\hat{\theta}] = \theta).
- Example: E[\bar{X}] = \mu_X (sample mean is an unbiased estimator of population mean).
- Example: E[s^2] = \sigma^2 (sample variance with n-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 (n) 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 \hat{\theta}1 and an upper bound \hat{\theta}2) such that the probability of the true parameter \theta being between them is 1-\alpha (e.g., P(\hat{\theta}1 \le \theta \le \hat{\theta}2) = 1-\alpha).
- Example: The mean height of MSU students is between 5.7 and 5.8 feet with 99.95\% confidence.
- Interpretation: If we repeat the sampling and interval calculation many times, 1-\alpha of these intervals would contain the true population parameter. (e.g., if 1-\alpha = 0.9995, then in 10,000 universities, 9995 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 (n \geq 30), the sample mean \bar{X} is approximately normally distributed: \bar{X} \sim N(\mu, \frac{\sigma^2}{n}).
- Standardization: Convert \bar{X} to a standard normal variable (Z-score): Z = \frac{\bar{X} - \mu}{\sigma/\sqrt{n}}.
- Probability Statement: From the Z-distribution table, we find critical values \pm Z{\alpha/2} such that: P(-Z{\alpha/2} \le Z \le Z_{\alpha/2}) = 1-\alpha
- Rearranging to find Confidence Interval for \mu:
P(\bar{X} - Z{\alpha/2}\frac{\sigma}{\sqrt{n}} \le \mu \le \bar{X} + Z{\alpha/2}\frac{\sigma}{\sqrt{n}}) = 1-\alpha - The lower bound is \hat{\theta}1 = \bar{X} - Z{\alpha/2}\frac{\sigma}{\sqrt{n}} and the upper bound is \hat{\theta}2 = \bar{X} + Z{\alpha/2}\frac{\sigma}{\sqrt{n}}.
- Derivation for Population Mean (\mu) with Unknown Population Standard Deviation (\sigma) or Small Sample Size (n < 30):
- Use the t-distribution instead of the Z-distribution.
- Replace population standard deviation \sigma with sample standard deviation s: T = \frac{\bar{X} - \mu}{s/\sqrt{n}} with n-1 degrees of freedom.
- The process for finding the interval is otherwise similar.
- Derivation for Population Variance (\sigma^2):
- Uses the Chi-squared (\chi^2) distribution.
- Test Statistic: \frac{(n-1)s^2}{\sigma^2} \sim \chi^2_{n-1}.
- Probability Statement: Find critical values \chi^2{\alpha/2} and \chi^2{1-\alpha/2} from the Chi-squared table such that:
P(\chi^2{\alpha/2} \le \frac{(n-1)s^2}{\sigma^2} \le \chi^2{1-\alpha/2}) = 1-\alpha
* (Note: The speaker clarifies that for the upper bound of the interval for \chi^2, one typically uses \chi^2{1-\alpha/2}, which corresponds to the smaller critical value on the left tail, and \chi^2{\alpha/2} for the right tail, since the inequality is inverted when solving for \sigma^2) - Rearranging to find Confidence Interval for \sigma^2:
P(\frac{(n-1)s^2}{\chi^2{1-\alpha/2}} \le \sigma^2 \le \frac{(n-1)s^2}{\chi^2{\alpha/2}}) = 1-\alpha
- Controlling Confidence Interval Properties:
- Width vs. Confidence: To increase confidence (1-\alpha) while keeping sample size (n) 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 (n) 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 (p1 - p2) 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 (H_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.6 feet (H_0: \mu = 5.6).
- Alternative Hypothesis (Ha or H1): A statement that contradicts the null hypothesis. It can be:
- Two-sided: The parameter is not equal to a specific value (e.g., H_a: \mu \neq 5.6).
- One-sided: The parameter is greater than or less than a specific value (e.g., Ha: \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 (H_0) is true.
- Sampling and Test Statistic: Take a sample and calculate a test statistic (e.g., \bar{X}).
- Probability under H0: Determine the probability of observing a test statistic as extreme as, or more extreme than, the one obtained, assuming H0 is true.
- Decision: If this probability is very low (below a predetermined significance level \alpha), then it casts doubt on the initial assumption that H0 is true, and we reject H0. Otherwise, we fail to reject H_0.
- Critical Region (Rejection Region):
- Significance Level (\alpha): A chosen threshold (e.g., 0.05 or 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 H_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 H_0.
- Example for Mean (\mu) with Known \sigma (Two-sided test H0: \mu = \mu0 vs. Ha: \mu \neq \mu0):
- Test statistic: Z = \frac{\bar{X} - \mu_0}{\sigma/\sqrt{n}}.
- Critical Region: Reject H0 if Z < -Z{\alpha/2} or Z > Z_{\alpha/2}.
- Conclusion Statement:
- If the test statistic is in the critical region: