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: H 0 : μ = 3190 g H_0:\mu=3190g H0:μ=3190g
If the null hypothesis is not stand, we need an alternative hypothesis:
Alternative hypothesis: H 1 : μ ≠ 3190 g H_1:\mu \ne 3190g H1:μ=3190g
1.2 Two type error
α e r r o r \alpha\ error α error: H 0 H_0 H0 is right but is rejected.
β e r r o r \beta\ error β error: H 1 H_1 H1 is wrong but is accepted.
1.3 The procedure of hypothesis test
- raise hypothesis:
H 0 : μ = 3190 g H_0:\mu=3190g H0:μ=3190g
H 1 : μ ≠ 3190 g H_1:\mu \ne 3190g H1:μ=3190g - statistics ( σ \sigma σ is known, sample > 30):
z = x ˉ − μ 0 σ n = 3210 − 3190 80 / 100 = 2.5 z=\frac{\bar{x}-\mu_0}{\sigma\sqrt{n}}=\frac{3210-3190}{80/\sqrt{100}}=2.5 z=σnxˉ−μ0=80/1003210−3190=2.5 - z α 2 = ± 1.96 < 2.5 z_{\frac{\alpha}{2}}=\pm1.96<2.5 z2α=±1.96<2.5, z z z is in the critical region, so we reject H 0 H_0 H0.