Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Student's t-test
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Independent two-sample ''t''-test=== ====Equal sample sizes and variance==== Given two groups (1, 2), this test is only applicable when: * the two sample sizes are equal, * it can be assumed that the two distributions have the same variance. Violations of these assumptions are discussed below. The {{math|''t''}} statistic to test whether the means are different can be calculated as follows: : <math> t = \frac{\bar{X}_1 - \bar{X}_2}{s_p \sqrt\frac{2}{n}}, </math> where : <math> s_p = \sqrt{\frac{s_{X_1}^2 + s_{X_2}^2}{2}}.</math> Here {{math|''s<sub>p</sub>''}} is the [[pooled standard deviation]] for {{math|1=''n'' = ''n''<sub>1</sub> = ''n''<sub>2</sub>}}, and {{math|''s''{{su|b=''X''<sub>1</sub>|p= 2}}}} and {{math|''s''{{su|b=''X''<sub>2</sub>|p= 2}}}} are the [[unbiased estimator]]s of the population variance. The denominator of {{math|''t''}} is the [[Standard error (statistics)|standard error]] of the difference between two means. For significance testing, the [[Degrees of freedom (statistics)|degrees of freedom]] for this test is {{math|2''n'' − 2}}, where {{math|''n''}} is sample size. ====Equal or unequal sample sizes, similar variances ({{sfrac|1|2}} < {{sfrac|''s''<sub>''X''<sub>1</sub></sub>|''s''<sub>''X''<sub>2</sub></sub>}} < 2)==== This test is used only when it can be assumed that the two distributions have the same variance (when this assumption is violated, see below). The previous formulae are a special case of the formulae below, one recovers them when both samples are equal in size: {{math|1=''n'' = ''n''<sub>1</sub> = ''n''<sub>2</sub>}}. The {{math|''t''}} statistic to test whether the means are different can be calculated as follows: : <math>t = \frac{\bar{X}_1 - \bar{X}_2}{s_p \cdot \sqrt{\frac{1}{n_1} + \frac{1}{n_2}}},</math> where : <math> s_p = \sqrt{\frac{(n_1 - 1)s_{X_1}^2 + (n_2 - 1)s_{X_2}^2}{n_1 + n_2-2}}</math> is the [[pooled standard deviation]] of the two samples: it is defined in this way so that its square is an [[unbiased estimator]] of the common variance, whether or not the population means are the same. In these formulae, {{math|''n<sub>i</sub>'' − 1}} is the number of degrees of freedom for each group, and the total sample size minus two (that is, {{math|''n''<sub>1</sub> + ''n''<sub>2</sub> − 2}}) is the total number of degrees of freedom, which is used in significance testing. The [[Minimum Detectable Effect|minimum detectable effect]] (MDE) is:<ref>[https://webspace.ship.edu/pgmarr/Geo441/Examples/Minimum%20Detectable%20Difference.pdf Minimum Detectable Difference for Two-Sample t-Test for Means. Equation and example adapted from Zar, 1984 ]</ref> <math>\delta \ge \sqrt{\frac{2S_p^2}{n}}(t_{1-\alpha, \nu} + t_{1-\beta, \nu})</math> ==== Equal or unequal sample sizes, unequal variances (''s''<sub>''X''<sub>1</sub></sub> > 2''s''<sub>''X''<sub>2</sub></sub> or ''s''<sub>''X''<sub>2</sub></sub> > 2''s''<sub>''X''<sub>1</sub></sub>) ==== {{main|Welch's t test{{!}}Welch's ''t''-test}} This test, also known as Welch's ''t''-test, is used only when the two population variances are not assumed to be equal (the two sample sizes may or may not be equal) and hence must be estimated separately. The {{math|''t''}} statistic to test whether the population means are different is calculated as : <math>t = \frac{\bar{X}_1 - \bar{X}_2}{s_{\bar\Delta}},</math> where : <math>s_{\bar\Delta} = \sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}.</math> Here {{math|''s<sub>i</sub>''<sup>2</sup>}} is the [[unbiased estimator]] of the [[variance]] of each of the two samples with {{math|''n<sub>i</sub>''}} = number of participants in group {{math|''i''}} ({{math|''i''}} = 1 or 2). In this case <math>(s_{\bar\Delta})^2</math> is not a pooled variance. For use in significance testing, the distribution of the test statistic is approximated as an ordinary Student's ''t''-distribution with the degrees of freedom calculated using : <math> \text{d.f.} = \frac{\left(\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}\right)^2}{\frac{(s_1^2/n_1)^2}{n_1 - 1} + \frac{(s_2^2/n_2)^2}{n_2 - 1}}. </math> This is known as the [[Welch–Satterthwaite equation]]. The true distribution of the test statistic actually depends (slightly) on the two unknown population variances (see [[Behrens–Fisher problem]]).
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)