Statistics Lecture 10 Hypothesis testing: Non-parametric tests •David Bartl •Statistics •INM/BASTA Outline of the lecture •About statistical hypothesis testing: Parametric and Non-parametric tests •Sign test for the median •Pearson’s χ2-test for the goodness of fit •χ2-test of independence of qualitative data items About statistical hypothesis testing •Parametric and Non-parametric tests • Parametric and Non-parametric tests •There are two large classes of statistical tests: parametric and non-parametric. • •The parametric tests make assumptions about the probability distributions of the random variables that are subject to the test. It is often assumed that the underlying distribution is normal (Gaussian). • •The non-parametric tests do not make such assumptions. The non-parametric tests can be used if the random variables are not normally distributed. Sign test for the median •Sign test for the median •Paired sign test for the difference of the medians • Sign test for the median Sign test for the median Sign test for the median Sign test for the median Sign test for the median Sign (binomial) test for the median Sign (binomial) test for the median that Sign (binomial) test for the median Sign (z-) test for the median Sign (z-) test for the median Sign (z-) test for the median Sign (z-) test for the median Sign (z-) test for the median Sign test for the median Sign test for the median Paired sign test for the difference of the medians Paired sign test for the difference of the medians Paired sign test for the difference of the medians Paired sign test for the difference of the medians χ2-test for goodness of fit •Pearson’s χ2-test for the goodness of fit • Pearson’s χ2-test for the goodness of fit Pearson’s χ2-test for the goodness of fit Pearson’s χ2-test for the goodness of fit Pearson’s χ2-test for the goodness of fit Pearson’s χ2-test for the goodness of fit Pearson’s χ2-test for the goodness of fit Pearson’s χ2-test for the goodness of fit Pearson’s χ2-test for the goodness of fit Pearson’s χ2-test for the goodness of fit Example: Tests for population proportion Example: Tests for population proportion Example: Tests for population proportion Pearson’s χ2-test for the goodness of fit χ2-test of independence of qualitative data items •χ2-test of independence of qualitative data items • χ2-test of independence of qualitative data items Contingency table the observed counts of the combinations of the categories Ai&Bj for i=1,…,r & j=1,…,s marginal totals marginal totals the grand total 2 × 2 contingency table •The 2 × 2 contingency table is popular. •It is a contingency table with r=2 rows and s=2 columns. the observed counts of the combinations of the categories Ai&Bj for i=1,2 & j=1,2 marginal totals marginal totals the grand total χ2-test of independence of qualitative data items •Having all the observed counts of the combinations of the categories Ai & Bj summarized in the contingency table for i=1,…,r and for j=1,…,s, we ask whether the category of the data item (variable) B depends upon the category of the data item (variable) A, or whether the categories of both data items (variables) A and B are independent of each other. • •Assume therefore the null hypothesis H0: •the categories of both data items (variables) A and B are independent of each other χ2-test of independence of qualitative data items •Having all the observed counts of the combinations of the categories Ai & Bj summarized in the contingency table for i=1,…,r and for j=1,…,s, assume the null hypothesis H0 that the categories of both data items (variables) A and B are independent of each other. •Now – if we choose a data unit randomly: •What is the probability that the data item A of the chosen data unit is of category Ai for some i=1,…,r ? •What is the probability that the data item B of the chosen data unit is of category Bj for some j=1,…,s ? χ2-test of independence of qualitative data items χ2-test of independence of qualitative data items χ2-test of independence of qualitative data items χ2-test of independence of qualitative data items χ2-test of independence of qualitative data items χ2-test of independence of qualitative data items χ2-test of independence of qualitative data items χ2-test of independence of qualitative data items