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!
==Assumptions== {{Disputed section|Assumptions|date=October 2022}} Most test statistics have the form {{math|1=''t'' = ''Z''/''s''}}, where {{math|''Z''}} and {{math|''s''}} are functions of the data. {{math|''Z''}} may be sensitive to the alternative hypothesis (i.e., its magnitude tends to be larger when the alternative hypothesis is true), whereas {{math|''s''}} is a [[Scale parameter|scaling parameter]] that allows the distribution of {{math|''t''}} to be determined. As an example, in the one-sample ''t''-test : <math>t = \frac{Z}{s} = \frac{\bar{X} - \mu}{\hat\sigma / \sqrt{n}},</math> where <math>\bar{X}</math> is the [[sample mean]] from a sample {{math|''X''<sub>1</sub>, ''X''<sub>2</sub>, …, ''X''<sub>''n''</sub>}}, of size {{math|''n''}}, {{math|''s''}} is the [[standard error of the mean]], <math>\hat\sigma = \sqrt{\frac{1}{n-1} \sum_i (X_i - \bar X)^2}</math> is the estimate of the [[variance|standard deviation]] of the population, and {{math|''μ''}} is the [[population mean]]. The assumptions underlying a ''t''-test in the simplest form above are that: * {{math|{{overline|''X''}}}} follows a normal distribution with mean {{math|''μ''}} and variance {{math|''σ''<sup>2</sup>/''n''}}. * {{math|''s''<sup>2</sup>(''n'' − 1)/''σ''<sup>2</sup>}} follows a [[chi-squared distribution|{{math|''χ''<sup>2</sup>}} distribution]] with {{math|''n'' − 1}} [[Degrees of freedom (statistics)|degrees of freedom]]. This assumption is met when the observations used for estimating {{math|''s''<sup>2</sup>}} come from a normal distribution (and [[i.i.d.]] for each group). * {{math|''Z''}} and {{math|''s''}} are [[statistical independence|independent]]. In the ''t''-test comparing the means of two independent samples, the following assumptions should be met: * The means of the two populations being compared should follow [[normal distributions]]. Under weak assumptions, this follows in large samples from the [[central limit theorem]], even when the distribution of observations in each group is non-normal.<ref name=":0">{{Cite journal |last1=Lumley |first1=Thomas |last2=Diehr |first2=Paula |author2-link=Paula Diehr |last3=Emerson |first3=Scott |last4=Chen |first4=Lu |date=May 2002 |title=The Importance of the Normality Assumption in Large Public Health Data Sets |journal=Annual Review of Public Health |volume=23 |issue=1 |pages=151–169 |doi=10.1146/annurev.publhealth.23.100901.140546 |doi-access=free |pmid=11910059 |issn=0163-7525}}</ref> * If using Student's original definition of the ''t''-test, the two populations being compared should have the same variance (testable using [[F-test of equality of variances|''F''-test]], [[Levene's test]], [[Bartlett's test]], or the [[Brown–Forsythe test]]; or assessable graphically using a [[Q–Q plot]]). If the sample sizes in the two groups being compared are equal, Student's original ''t''-test is highly robust to the presence of unequal variances.<ref>{{cite journal |last1=Markowski |first1=Carol A. |last2=Markowski |first2=Edward P. |year=1990 |title=Conditions for the Effectiveness of a Preliminary Test of Variance |journal=The American Statistician |pages=322–326 |volume=44 |jstor=2684360 |doi=10.2307/2684360 |issue=4}}</ref> [[Welch's t-test|Welch's ''t''-test]] is insensitive to equality of the variances regardless of whether the sample sizes are similar. * The data used to carry out the test should either be sampled independently from the two populations being compared or be fully paired. This is in general not testable from the data, but if the data are known to be dependent (e.g. paired by test design), a dependent test has to be applied. For partially paired data, the classical independent ''t''-tests may give invalid results as the test statistic might not follow a ''t'' distribution, while the dependent ''t''-test is sub-optimal as it discards the unpaired data.<ref name="Guo2017">{{cite journal |last1=Guo |first1=Beibei |last2=Yuan |first2=Ying |s2cid=46598415 |title=A comparative review of methods for comparing means using partially paired data |journal=Statistical Methods in Medical Research |date=2017 |volume=26 |issue=3 |pages=1323–1340 |doi=10.1177/0962280215577111 |pmid=25834090}}</ref> Most two-sample ''t''-tests are robust to all but large deviations from the assumptions.<ref name="Bland1995">{{cite book |first=Martin |last=Bland |title=An Introduction to Medical Statistics |url=https://books.google.com/books?id=v6xpAAAAMAAJ |year=1995 |publisher=Oxford University Press |isbn=978-0-19-262428-4 |page=168}}</ref> For [[Exact test|exactness]], the ''t''-test and ''Z''-test require normality of the sample means, and the ''t''-test additionally requires that the sample variance follows a scaled [[Chi-squared distribution|''χ''{{isup|2}} distribution]], and that the sample mean and sample variance be [[independence (probability theory)|statistically independent]]. Normality of the individual data values is not required if these conditions are met. By the [[central limit theorem]], sample means of moderately large samples are often well-approximated by a normal distribution even if the data are not normally distributed. However, the sample size required for the sample means to converge to normality depends on the skewness of the distribution of the original data. The sample can vary from 30 to 100 or higher values depending on the skewness.<ref>{{Cite web |title=Central limit theorem and the normality assumption > Normality > Continuous distributions > Distribution > Statistical Reference Guide {{!}} Analyse-it® 6.15 documentation |url=https://analyse-it.com/docs/user-guide/101/normality-central-limit-theorem |access-date=2024-05-17 |website=analyse-it.com}}</ref><ref>{{Cite journal |last=DEMİR |first=Süleyman |date=2022-06-26 |title=Comparison of Normality Tests in Terms of Sample Sizes under Different Skewness and Kurtosis Coefficients |url=http://dx.doi.org/10.21449/ijate.1101295 |journal=International Journal of Assessment Tools in Education |volume=9 |issue=2 |pages=397–409 |doi=10.21449/ijate.1101295 |issn=2148-7456}}</ref> For non-normal data, the distribution of the sample variance may deviate substantially from a ''χ''{{isup|2}} distribution. However, if the sample size is large, [[Slutsky's theorem]] implies that the distribution of the sample variance has little effect on the distribution of the test statistic. That is, as sample size <math>n</math> increases: : <math>\sqrt{n}(\bar{X} - \mu) \xrightarrow{d} N(0, \sigma^2)</math> as per the [[Central limit theorem]], : <math>s^2 \xrightarrow{p} \sigma^2</math> as per the [[law of large numbers]], : <math>\therefore \frac{\sqrt{n}(\bar{X} - \mu)}{s} \xrightarrow{d} N(0, 1)</math>.
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)