Hypothesis Testing for a Single Normal Population
When the Variance Is Known (Z Test)
Population: , with known
Hypotheses:
- (two-sided test)
- (right one-sided test)
- (left one-sided test)
Test statistic:
Rejection region:
- Two-sided test:
- Right one-sided test:
- Left one-sided test:
Example 1: the lengths of the parts produced by a factory follow the normal distribution . 16 parts are drawn at random from the products, and the measured average length is 10.2cm. At the significance level , test whether the part length equals 10cm.
Solution:
- State the hypotheses: ,
- Test statistic:
- Rejection region:
- Decision: , so reject the null hypothesis
- Conclusion: the part length is not equal to 10cm
When the Variance Is Unknown (T Test)
Population: , with unknown
Hypotheses:
- (two-sided test)
- (right one-sided test)
- (left one-sided test)
Test statistic:
Rejection region:
- Two-sided test:
- Right one-sided test:
- Left one-sided test:
Example 2: the service life of a brand of batteries follows a normal distribution. 10 batteries of this brand are drawn at random, and the measured average service life is 120 hours with a sample standard deviation of 8 hours. At the significance level , test whether the average service life of the batteries is greater than 115 hours.
Solution:
- State the hypotheses: ,
- Test statistic:
- Rejection region:
- Decision: , so reject the null hypothesis
- Conclusion: the average service life of the batteries is greater than 115 hours
When the Mean Is Known
Population: , with known
Hypotheses:
- (two-sided test)
- (right one-sided test)
- (left one-sided test)
Test statistic:
Rejection region:
- Two-sided test: or
- Right one-sided test:
- Left one-sided test:
When the Mean Is Unknown
Population: , with unknown
Hypotheses:
- (two-sided test)
- (right one-sided test)
- (left one-sided test)
Test statistic:
Rejection region:
- Two-sided test: or
- Right one-sided test:
- Left one-sided test:
Example 3: the lengths of the parts produced by a factory follow a normal distribution. 10 parts are drawn at random from the products, and the measured sample variance is 0.04. At the significance level , test whether the variance of the part lengths equals 0.03.
Solution:
- State the hypotheses: ,
- Test statistic:
- Rejection region: or
- Decision: , so the null hypothesis is not rejected
- Conclusion: the variance of the part lengths equals 0.03
Comparison of the Z Test and the T Test
Z test:
- Applicable condition: the variance is known
- Test statistic:
- Advantages: simple to compute, no need to consult the t distribution table
- Disadvantages: requires knowing the population variance
T test:
- Applicable condition: the variance is unknown
- Test statistic:
- Advantages: does not require knowing the population variance
- Disadvantages: requires consulting the t distribution table
Comparison of Mean Testing and Variance Testing
Mean testing:
- Object of the test: the population mean
- Application scenarios: testing product quality, treatment effects, and so on
- Test statistic: the Z statistic or the T statistic
Variance testing:
- Object of the test: the population variance
- Application scenarios: testing production stability, measurement precision, and so on
- Test statistic: the chi-square statistic
Power Function
Definition
A definition is a precise description of what a concept, a term, or an object means. Understanding definitions is the foundation of learning any field, and every concept has its own exact meaning.
The power function gives the probability of rejecting the null hypothesis when the null hypothesis is false.
Factors that influence it:
- Sample size: the larger the sample size, the higher the power
- Significance level: the higher the significance level, the higher the power
- Effect size: the larger the effect size, the higher the power
Determining the Sample Size
Problem: given the significance level, the power, and the effect size, determine the sample size required.
Example 4: for testing the mean of a normal population, given the significance level , the power , and the effect size , find the sample size .
Solution:
- Use the power analysis formula
- Consult the table or use software to compute
- We obtain
The Normality Assumption
Importance: the normality assumption is the basis of the Z test and the T test.
Testing methods:
- Graphical methods: Q-Q plots, histograms
- Statistical tests: the Shapiro-Wilk test, the Kolmogorov-Smirnov test
Handling non-normal data:
- Data transformation: logarithmic transformation, square root transformation, and so on
- Nonparametric tests: the Wilcoxon signed-rank test, and so on
The Independence Assumption
Importance: the sample observations should be mutually independent.
Testing methods:
- Time series analysis: the autocorrelation function
- Spatial data analysis: spatial autocorrelation
The Multiple Comparison Problem
Problem: when performing several hypothesis tests, the probability of committing a Type I error increases.
Solution:
- Bonferroni correction: divide the significance level by the number of tests
- Holm correction: adjust the significance level step by step
- FDR control: control the false discovery rate
Effect Size
Definition
A definition is a precise description of what a concept, a term, or an object means. Understanding definitions is the foundation of learning any field, and every concept has its own exact meaning.
The effect size is an indicator that measures the magnitude of an actual difference.
Common effect sizes:
- Cohen’s d:
- Correlation coefficient:
Significance: even if the result is statistically significant, a small effect size may mean little practical significance.
Exercise 1
Let with known. To test , write the test statistic.
Approach: Use the test statistic of the normal distribution.
Steps:
- Test statistic:
- Under the condition that the null hypothesis holds,
Answer:
Exercise 2
Let with unknown. To test , write the test statistic.
Approach: Use the test statistic of the t distribution.
Steps:
- Test statistic:
- Under the condition that the null hypothesis holds,
Answer:
Exercise 3
Let with unknown. To test , write the test statistic.
Approach: Use the test statistic of the chi-square distribution.
Steps:
- Test statistic:
- Under the condition that the null hypothesis holds,
Answer:
Exercise 4
Let the sample mean be , the population standard deviation be , and the sample size be . Test , at the significance level .
Approach: Use the Z test for a two-sided test.
Steps:
- Test statistic:
- Rejection region:
- Decision: , so the null hypothesis is not rejected
- Conclusion: the population mean equals 50
Answer: the null hypothesis is not rejected
Exercise 5
Let the sample mean be , the sample standard deviation be , and the sample size be . Test , at the significance level .
Approach: Use the T test for a right one-sided test.
Steps:
- Test statistic:
- Rejection region:
- Decision: , so reject the null hypothesis
- Conclusion: the population mean is greater than 115
Answer: reject the null hypothesis
