= Student's t Test = '''Student's t test''' is a statistical test for differences between two groups. <> ---- == Description == The test statistic is compared to [[Analysis/StudentsTDistribution|Student's t distribution]], which definitionally is centered on 0 and parameterized to [[Statistics/DegreesOfFreedom|degrees of freedom]] rather than [[Analysis/Variance|variance]]. (As for situations when sample variance is not an appropriate estimator for population variance.) ---- == Usage == === One Sample Test === The null hypothesis assumes a value for the true population mean ''μ'', so it becomes notated ''μ,,0,,''. The test statistic is calculated as: {{attachment:onesamp.svg}} where ''X̅'' is the sample mean, ''s'' is the sample standard deviation, and ''n'' is the sample size. Typically the null hypothesis is that ''μ = 0'', and so the test statistic reflects the probability of realizing that sample mean when the true population parameter is zero. This test is widely appropriate because, by the central limit theorem, the sampling distribution of a sample statistic is [[Analysis/NormalDistribution|normal]] even when the underlying population distribution is not. ---- === Two Sample Test === Following directly from the above application, the difference of two sample statistics is similarly normal. Without inserting any null hypotheses or estimators for variance, the formulation is: {{attachment:twosamp1.svg}} As indicated by the lack of subscripts on ''σ'', a key assumption is that both samples have equal variance. In this circumstance, [[Statistics/PooledVariance|pooled variance]] is commonly used. Typically the null hypothesis is that the true population means (now notated ''μ,,1,,'' and ''μ,,2,,'') do not differ: ''μ,,1,, - μ,,2,, = 0''. Altogether, the typical test statistic is calculated as: {{attachment:twosamp2.svg}} [[Statistics/WelchsTTest|Welch's t test]] relaxes the assumptions about variance. ---- === Paired Samples Test === The paired samples test, also known as the dependent two sample test or repeated measures test, involves the difference between two sets of observations from the same sample. This is most commonly done before and after some treatment, with the null hypothesis typically being that there is zero difference. {{attachment:pairedsamp.svg}} The assumption that both samples have equal variance is much more straightforward here. It must be noted however that ''n'' (for purposes of both the above formula and the calculation of degrees of freedom) now is the number of pairs, not the number of observations. ---- CategoryRicottone