NOTES
1 The basic problem of hypothesis test
1.1 Example
year | weight of new born (mean) | size of data | SD |
---|---|---|---|
1989 | 3190 g | ∞\infty∞ | 80 g |
1990 | 3210 g | 100 | NA |
It is obvious that the mean of 100 new born’s weight is 20g higher than that of 1989.
The point here is that what is shown by this 20 g diference. One explain is that it caused by randomness of sampling. Or it is true that baby born in 1990 is weighter than born in 1989.
To figure out this problem, we use μ0\mu_0μ0 indecate the mean of baby’s weight in 1989 and μ\muμ indecate that of 1990. We hypothesize that μ=μ0\mu=\mu_0μ=μ0, and use 100 samples in 1990 to test whether the hypothesis is true or not.
Here
Null hypothesis: H0:μ=3190gH_0:\mu=3190gH0:μ=3190g
If the null hypothesis is not stand, we need an alternative hypothesis:
Alternative hypothesis: H1:μ≠3190gH_1:\mu \ne 3190gH1:μ=3190g
1.2 Two type error
α error\alpha\ errorα error: H0H_0H0 is right but is rejected.
β error\beta\ errorβ error: H1H_1H1 is wrong but is accepted.
1.3 The procedure of hypothesis test
- raise hypothesis:
H0:μ=3190gH_0:\mu=3190gH0:μ=3190g
H1:μ≠3190gH_1:\mu \ne 3190gH1:μ=3190g - statistics (σ\sigmaσ is known, sample > 30):
z=xˉ−μ0σn=3210−319080/100=2.5z=\frac{\bar{x}-\mu_0}{\sigma\sqrt{n}}=\frac{3210-3190}{80/\sqrt{100}}=2.5z=σnxˉ−μ0=80/1003210−3190=2.5 - zα2=±1.96<2.5z_{\frac{\alpha}{2}}=\pm1.96<2.5z2α=±1.96<2.5, zzz is in the critical region, so we reject H0H_0H0.
1.4 Test region
- two-tailed test:
H0:μ=μ0H_0 :\mu=\mu_0H0