Week 9: Hypothesis Testing Errors and Confidence Intervals
Learning Outcomes
LO1: Defining and Explaining Errors: Understand how to define and explain Type I and Type II errors within the context of hypothesis testing.
LO2: Decision Outcomes and Errors: Distinguish between rejecting and failing to reject the null hypothesis and identify how these decisions relate to Type I and Type II errors.
LO3: Confidence Interval Interpretation: Define a confidence interval and explain its interpretation as an interval estimator for a population parameter.
LO4: Construction and Interpretation: Construct and interpret confidence intervals for various population parameters.
Overview of Statistical Inference and Review
Sampling Distribution Context: In previous sessions (Lecture 6), the sampling distribution for the sample mean () was explored. This was based on simple random samples of students drawn from a population of students based on test marks (out of points).
Population Parameters: The true population mean () for these test marks was known to be .
Sample Statistics: For each sample, the sample mean (), sample variance (), and standard deviation () were calculated.
Probability of Deviance: While most sample means fell close to the true population mean (), there is a small but finite probability of obtaining a sample mean that is very different from the true mean.
Hypothesis Testing: Decision Scenarios
Scenario A: Correct Decision (Fail to Reject True Null)
Hypotheses:
Sample Data: Sample Mean (), Sample Variance (), Sample Size ().
Critical Value: .
Decision Rule: Reject if the -statistic is greater than or less than .
Test Statistic Calculation:
Outcome: Since is between and , and the -value () is greater than (), the decision is to not reject the null hypothesis.
Conclusion: At a significance level, there is insufficient evidence to conclude the population mean is different from . This is the correct decision because is indeed .
Scenario B: Type I Error (Rejecting a True Null)
Context: Sampling variability means we might occasionally draw a sample with an unusually high or low mean.
Sample Data: Sample Mean (), Sample Variance (), Sample Size ().
Test Statistic Calculation:
Outcome: Since , and the -value () is less than (), the decision is to reject the null hypothesis.
Conclusion: This decision is incorrect because the true population mean is . We have rejected a true null hypothesis, which is a Type I error.
Scenario C: Type II Error (Failing to Reject a False Null)
Context: Testing a claim that the average mark () is . We know this claim is false because the true mean is .
Hypotheses:
Sample Data: , , .
Test Statistic Calculation:
Outcome: Since , the decision is to not reject the null hypothesis.
Conclusion: This is an incorrect decision (Type II error) because the null hypothesis was false. This illustrates why we say "fail to reject" rather than "accept"; failing to reject means we lack sufficient evidence against the null, not that the null is definitely true.
Types of Errors in Hypothesis Testing
Type I Error
Verbatim Definition: A Type I error is the incorrect decision to reject when is true.
Probability: The probability of committing a Type I error is exactly equal to the significance level, denoted by .
Type II Error
Verbatim Definition: A Type II error is the decision NOT to reject when it is false.
Probability: The probability of committing a Type II error is denoted by .
Challenges: Calculating is difficult because it requires knowing the true population parameter, which is typically unknown in practice.
Factors Influencing Errors and The Trade-off
Significance Level ( ) Influence:
Decreasing : Reducing (e.g., from to ) makes the rejection region smaller. This reduces the risk of a Type I error but makes it harder to reject the null, thereby increasing the risk of a Type II error ().
Increasing : Increasing makes it easier to reject the null. This reduces but increases the risk of a Type I error ().
Sample Size () Influence:
Larger samples reduce variability and improve precision, resulting in a smaller (lower risk of Type II error).
Smaller samples have more variability, resulting in a higher .
Data Variability Influence:
Higher variability () leads to less precise estimates and a higher .
Power of a Test:
Definition: The probability of correctly rejecting a false null hypothesis (avoiding a Type II error).
A high-power test is desirable as it indicates a strong ability to detect when the null hypothesis is false.
Confidence Intervals (CIs)
Conceptual Basis
Point Estimate: A single value (like ) used to estimate a population parameter. It is limited by sampling variability.
Interval Estimator: A range of values constructed from sample data that is likely to contain the true population parameter. It is more informative than a point estimate because it quantifies uncertainty.
Derivation from Hypothesis Testing
A confidence interval represents the range of all hypothesised values () for which the null hypothesis would not be rejected in a two-tailed test.
Non-Rejection Condition:
The Resulting Interval:
Confidence Interval for a Mean ( )
Formula:
Properties:
The sample mean is an efficient estimator of .
The distribution is Student-t distributed with degrees of freedom.
The interval is symmetric around .
Interpretation: A confidence interval means that if we were to repeat the sampling process many times, approximately of the resulting intervals would contain the true population mean.
Important Caveat: We are confident in the method used to construct the interval. We do not say the mean is "certainly" in a specific calculated interval.
Worked Example: Test Marks ()
Data: , , , .
Critical Value: .
Standard Error: .
CI Calculation:
Interval:
Hypothesis Link: Any where is outside this range (e.g., or ) would be rejected at the level. Values inside (e.g., or ) would not be rejected.
Precision and Length of Confidence Intervals
Length Formula:
Informativeness:
Short Interval: Indicates the sample is highly informative about the parameter.
Wide Interval: Indicates higher uncertainty; the sample is less informative.
Ways to achieve a shorter (more precise) interval:
Smaller population variability ().
Larger sample size ().
Lower confidence level (e.g., instead of , which reduces the critical value ).
Confidence Intervals for Other Parameters
Population Proportion ()
Use Case: Constructing intervals for proportions, such as urban dwellers in Victoria.
Formula:
Example Calculations: If , , , and (for confidence):
Difference Between Two Independent Means ()
Use Case: Comparing average wages between urban and regional dwellers.
Formula:
Example Calculation: , , combined Standard Error = .
Note: A wide interval here reflects high uncertainty in the estimated difference in earnings.
Difference Between Two Independent Proportions ()
Formula:
Note: For large sample sizes, the t-distribution provides a good approximation of the standard normal distribution.
Mean of the Differences (Matched Pairs) ()
Formula:
Summary Keywords
Error Types: Type I error, Type II error, Probability of errors (, ).
Test Performance: Power of a test (), Error trade-offs.
Estimation: Point estimate, Interval estimator, Confidence Level (), Confidence Limits (Upper and Lower).