Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Statistics 03 Hypothesis Testing (假设检验) Hypothesis Testing (假设检验) • When we have two sets of data and we want to know whether there is any statistically significant difference between them, we can use hypothesis testing. Principles of hypothesis testing • Small probability event: • Something that is very unlikely to take place • When something is a small probability event, we usually take it as false. • When a small probability event takes place, we take it as true. • e.g. Win a lottery Null hypothesis • As a procedure in hypothesis testing, we usually have to establish a null hypothesis, a hypothesis that there is no significant variability between the two sets of data compared. • H0: μ=μ0 • Underlying principle: the variability is caused by random errors. Therefore small probability events do not take place. Hypothesis Alternative hypothesis • We need to establish a second hypothesis: alternative hypothesis as an opposite to the null hypothesis. • H1: μ≠μ0 • In the alternative hypothesis, the small probability event takes place. The variability between the two sets of data compared is no longer caused by random errors. It is the result of systematic difference. Case: Comparison of means • Class A has been given a special kind of instruction. We want to know the effect of this methodology. • Class A took the same test as the other students. We got the data as follows: • Class A mean: 72 n: 45 • The other classes mean: 69 s: 5 Analysis • Class A: a sample with a mean μ=72 • The others: the population where the sample is taken with the mean μ0=69 • The special methodology should have brought about some systematic effect on Class A. Such an effect is not a small probability event. • Therefore • Null hypothesis: no significant difference between Class A and the other classes in spite of the special teaching methodology. i.e. H0: μ=μ0 • Alternative hypothesis: difference is significant. i.e. H1: μ≠μ0 Computation • 1. Establish the null hypothesis and the alternative hypothesis H0: μ=μ0 H1: μ≠μ0 • 2. Calculate the Z value |Z|=|(μ-μ0)/ (σ0/√n)| • 3. Look up in the Normal Distribution Table for Zα, usually Zα/2=0.025=1.96 • 4. Compare |Z| and Zα/2 If |Z| > Zα/2, reject H0 If |Z| <= Zα/2, accept H0 Computation • • • • • • • |Z|=|(μ-μ0)/ (σ0/√n)| =|(72-69)/(5/√45)| =3/(5/6.71) =3/0.745 =4.027 |Z| > Zα/2=0.025=1.96 Reject H0 Another Case • An experiment on reading comprehension was done on two groups of students: an advanced class with 63 students and a normal class with 67 students. The investigator obtained the following data: • Advanced class M: 2.33929 s: 0.69483 n: 56 • Normal class M: 1.864407 s: 0.797791 n: 59 Question • Is there any statistically significant difference between the two groups at the 95% confidence level? Analysis • The advanced class is taken as a sample from a population represented by the normal class. The advanced students are supposed to possess a higher level of reading comprehension which can make systematic difference from average students. • Therefore • null hypothesis H0: μ=μ0 • alternative hypothesis H1: μ≠μ0 Computation • |Z|=|(μ-μ0)/ (σ0/√n)| =|(2.33929-1.864407)/( 0.797791/√56)| =3/(5/6.71) =3/0.745 =4.027 • |Z| > Zα/2=0.025=1.96 • Reject H0 One Tailed vs. Two Tailed • When we ask: Is A different from B, we need a two tailed test. One Tailed vs. Two Tailed • When we ask: is A better or worse than B, we need a one tailed test.