Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
STATISTICS HYPOTHESES TEST (II) One-sample tests on the mean and variance Professor Ke-Sheng Cheng Department of Bioenvironmental Systems Engineering National Taiwan University Tests on Mean 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 2 (1) 2 is known 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 3 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 4 (2) 2 is unknown 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 5 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 6 (3) 2 is known 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 7 (4) 2 is unknown 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 8 Tests on Variance 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 9 (1) is known 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 10 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 11 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 12 (2) is unknown 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 13 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 14 (3) is known 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 15 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 16 (4) is unknown 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 17 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 18 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 19 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 20 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 21 Test in means using t-test in R For a two-tailed test, the p-value is twice the exceedance probability shown in the above figure. Can also be used to find the confidence interval. 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 22 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 23 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 24 Test in population proportion • Prop.test in R 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 25 • Example 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 26 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 27 • The above example demonstrates that the exact calculation and the CLT approximation yield different conclusions. In the case of significance testing, when the CLT yields a borderline answer, it is best to use exact calculation. 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 28 Paired t-test • The paired t test provides a hypothesis test of the difference between population means for a pair of random samples whose differences are approximately normally distributed. 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 29 • If the population from which paired differences to be analyzed by a paired t test were sampled violate one or more of the paired t test assumptions, the results of the analysis may be incorrect or misleading. For example, if the assumption of independence for the paired differences is violated, then the paired t test is simply not appropriate. 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 30 • Note that the two values that make up each paired difference need not be independent, and in fact are expected to be correlated, such as before and after measurements. If you treat paired data as coming from two independent samples, such as doing an inappropriate two-sample unpaired t test instead of a paired t test, then you may sacrifice power. 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 31 • If the assumption of normality is violated, or outliers are present, then the paired t test may not be the most powerful test available, and this could mean the difference between detecting a true difference or not. A nonparametric test or employing a transformation may result in a more powerful test. For example, if the distribution of the paired differences is not symmetric, a transformation may produce symmetry. 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 32 • The test statistic is calculated as: T d Sd n ~ tn1 , if d 0 H 0 : d 0 H 0 : d 0 H1 : d 0 H1 : d 0 Two-sided test One-sided test 5/25/2017 Department of Bioenvironmental Systems Engineering National Taiwan University 33