In: Statistics and Probability
Explain in detail the following tests and when we use them, give
proper justifications & examples?
1. One sample t-test
2. Test of normality
3. Wilcoxon
4. Kruskal
5. Crosstab Chi-Square
1. One sample t-test in done to test hypothesis regarding the mean of a normal population with unknown variance. As an example suppose we know that the heights of a population is normally distributed, with known variance. A one sample t-test can be used to test (based on the sample), whether the population mean is equal to a certain value or not.
2. Test for normality includes many tests and are usually done to check whether a sample comes from normal distribution or not. Some examples may include, the kolmogorov-smirnov test, the anderson-darling test, the shapiro-wilk test etc. One frequent use of such tests is in the diagnostics of linear models. After a linear model has been fitted, we use these tests to see whether the errors are gaussian or not.
3. There are two nonparametric tests attributed to wilcoxon. One is the signed rank test. It is especially applicable when we are not sure of the normality of a sample but know that the sample comes from a symmetric distribution. This is an alternative to the t-test and used for similar purposes.
Another one is the wilcoxon signed rank test. It is used to test for difference is effects. It is also a non-parametric test on two samples, and is used ti check whether there has been a location shift or not. Such a test can be used a scenario, for example, where we have a drug against a placebo and we want to test whether the effect of the drug is significant or not. Then, we can perform a wilcoxon rank sum test to see whether the drug caused a positive location shift or not.
4. Krushkal (or Krushkal-Wallis) test is again a nonparametric rank based test to test the homogenity of treatment effects. Suppose we have more than one treatments applied over some units. We are not sure of normality of reponses. We can use the krushkal wallis test to check whether the effects of the treatments are same or not.
5. The chi-sq test is used to test for association. Suppose we have a two way classification based on two factors. Then a chi-sq test on a cross table can be used to test whether the two factors are independent or not. For example if we want to test whether smoking and lung cancer are related or not and we collect only 'yes/no' type response, then such a test can be used.