Comprehensive Guide to Hypothesis Testing
Overview of Hypothesis Testing
Definition of Statistical Hypothesis: A statistical hypothesis is a claim or statement regarding the value or values of a specific population parameter.
The Statistical Process: To verify claims statistically, sample data must be gathered and analyzed. The results from the sample lead to one of two conclusions about the hypothesized value of the population parameter:
The value is accepted as probably true.
The value is rejected as probably false.
Hypothesis Testing Definition: This is the formal statistical process used to test the validity of a claim regarding the true value of any population parameter.
Types of Hypothesis
1. Null Hypothesis ():
This is the specific hypothesis that is being tested.
It represents a claim or statement about a population parameter that is assumed to be true until evidence suggests it is false.
It is often called the "hypothesis of no difference."
Notation: Includes symbols of equality or semi-equality, such as .
2. Alternative Hypothesis ():
This is the hypothesis believed to be true if the null hypothesis () is rejected.
It is known as the "hypothesis of difference."
Notation: Includes symbols of inequality, such as .
Directions and Tails in Hypothesis Testing
Rejection Region Logic: The rejection region of a test is determined entirely by the alternative hypothesis ().
Two-Tailed Test: Defined by the symbol in the alternative hypothesis. This test has two rejection regions (one in each tail of the distribution).
One-Tailed Test: Defined by the symbols or in the alternative hypothesis. These tests have only one rejection region.
One-Sided Upper-Tailed Test: Used when the claim states the parameter is more than a specified value.
The rejection region is in the far right tail.
One-Sided Lower-Tailed Test: Used when the claim states the parameter is less than a specified value.
The rejection region is in the far left tail.
Risks and Errors in Hypothesis Testing
Because hypothesis tests are based on samples (which may be biased or non-representative), there is always a probability of making an incorrect decision.
Type I Error (): The probability of rejecting the null hypothesis when it is actually true.
Type II Error (): The probability of accepting (not rejecting) the null hypothesis when it is actually false.
Decision Matrix Summary:
Situation | Conclusion: Not Rejected | Conclusion: Rejected |
|---|---|---|
is True | Correct Decision | Type I Error () |
is Not True | Type II Error () | Correct Decision |
Relationship between and : These probabilities work inversely; as the probability of a Type I error () increases, the probability of a Type II error () decreases.
Hypothesis Test for a Single Population Mean ()
Hypotheses Formulation
Left-tailed: ;
Right-tailed: ;
Two-tailed: ;
Test Statistics
Z-Test Statistic: Used when the population standard deviation () is known or the sample size is large ().
Critical Value:
T-Test Statistic: Used when the population standard deviation () is unknown and the sample size is small ().
Denominator Note: is an estimate for the standard error term .
Critical Value: where .
Distribution Consistency Table
Condition | is known | is not known |
|---|---|---|
Z-test | Z-test | |
Z-test | t-test |
Hypothesis Test for Single Population Proportion ()
Hypotheses Formulation
Left-tailed: ;
Right-tailed: ;
Two-tailed: ;
Calculation
Sample Proportion (): , where is the number of successes in sample size .
Z-Test Statistic:
Critical Value:
Hypothesis Test for the Difference Between Two Population Means ()
Hypotheses Formulation
Left-tailed: ;
Right-tailed: ;
Two-tailed: ;
Calculation Cases
Case 1: known; large.
Case 2: known; small.
Same Z-statistic formula as Case 1.
Case 3: unknown; large.
Case 4: unknown; small.
Assumption: Population variances are equal ().
Pooled Variance ():
T-Test Statistic:
Critical Value:
Examples and Numerical Case Studies
Single Mean Examples
Example 1 (SARS Tax Returns): SARS claims eFiling takes typical taxpayers less than 45 minutes on average (). Sample of . Times: 42, 56, 29, 35, 47, 37, 39, 29, 45, 35, 51, 53. Sample mean , sample SD . Test at .
Example 2 (Cement Bags): Hardware store receives complaints that "1 kg" bags weight less than 1 kg (). Sample , mean , known population SD . Test at .
Example 3 (Coffee Containers): Manager suspects over-filling of "500 g" containers (). Sample , mean , known population variance (). Test at .
Example 4 (Frozen Shrimp Cans): Factory manager checks if cans conform to label weight of 600 g (). Tests for both over and under filling (). Sample , mean , known population SD . Test at and .
Single Proportion Examples
Example 1 (Construction Schedule): Company suspects 20% of jobs are behind schedule (). Data: , late jobs. Calculation: . Test at .
Example 2 (Product Marketing): Campaign for new product. Data: out of users would use it (). Test evidence for more than 85% () at .
Two Means Examples
Example 1 (Hospital Response): Comparison of response times for senior citizens vs other patients. Complaint: Seniors take longer (). Test at .
Example 2 (Metal Hardening): Comparing saltwater quenching () vs oil quenching (). Assume hardness is normally distributed and variances are equal. Test at .