[[http://www.sofastatistics.com/userguide.php | Contents]] [[:help:stats_tests | Statistical Tests Available]] ====== Paired t-test ====== The paired t-test (see [[http://en.wikipedia.org/wiki/Student's_t-test | Student's t-test]]) is useful for looking at differences in two variables. The data must be paired e.g. looking at pre and post-diet weight. The variables being averaged must also be numerical and adequately normal. If you are looking at independent/unpaired data e.g. height between two countries, you need to use the [[:help:indep_ttest | independent t-test]]. If your data is not normally distributed, or there are outliers, you may be better using the [[:help:wilcoxon | Wilcoxon Signed Ranks Test]]. The p value tells you how likely the difference observed would occur if sampling from a population in which there is no actual difference. A small p value tells you that it would be rare to observe such a difference if there is no actual difference between the variables. From this we might reject the null hypothesis in favour of the alternative hypothesis - namely, that there is a difference. In the example below (based on false data for illustration only), the p value is very low. In which case we can reject the hypothesis that there is no difference in weight pre and post-diet. Of course, whether the difference is of practical significance is another matter entirely. {{:help:paired_ttest_example.gif|}} Be aware that there is a certain sensitivity about terminology around this area. According to a widespread convention, we shouldn't conclude that there is a relationship, only that we reject the null hypothesis (see [[http://www.stats.gla.ac.uk/steps/glossary/hypothesis_testing.html#h0 | Hypothesis testing]]). We might go so far as to reject the null hypothesis in favour of the alternative hypothesis. See [[http://en.wikipedia.org/wiki/Statistical_hypothesis_testing | Statistical hypothesis testing]]. [[https://www.youtube.com/watch?v=DiAYu0aM9Zw |{{:help:play_button.gif|}}]] A video is available showing how to do paired t-tests using SOFA Statistics: [[https://www.youtube.com/watch?v=DiAYu0aM9Zw]] [[http://www.sofastatistics.com/userguide.php | Contents]] [[:help:stats_tests | Statistical Tests Available]] [[:home | Wiki]]