TTest
TTEST
A normal distribution plays a prominent role in tests of hypothesis that involve the mean of a population. In particular, if a random sample of observations is normally distributed, statistical inferences for the sample mean can be made by constructing a Ztest statistic that follows a standard normal distribution. However, the use of this statistic requires knowledge of the true variance of population from which the observations were sampled. Frequently, this quantity is unknown and can only be estimated using the values obtained through sampling. Specifically, an estimate of the sample variance (s^{2}) can be obtained as follows:
where n is the total number of observations, x is the mean of the sampled observations, and x _{i} is the value for the ith observation (i = 1,2,…n). When the population variance is estimated using sampled data, the use of the Ztest statistic to perform hypothesis testing can lead to biased results. A solution to this problem was put forth in 1908 by William Gossett, a statistician employed by an Irish brewery who went by the pseudonym "Student." Today, the "Student's tdistribution" is routinely used to perform tests of hypothesis.
The Student's tdistribution is not a unique distribution, but rather a family of distributions whose shape is symmetric and determined by the number of sampled observations, or equivalently, the number of degrees of freedom. Like other probability distributions, the total area under the curve of atdistribution is equal to one. The pvalues for tests of hypothesis based on this distribution can typically be extracted from the published tables that appear as an appendix in most statistical texts. As the number of degrees of freedom increases, the shape of the tdistribution converges to that of the standard normal distribution.
The tdistribution can be used to compare the mean of a sampled population to some fixed, known value. This statistical test of hypothesis is referred to as a "onesample ttest." For example, a researcher might be interested in determining whether the average family income among Chicago residents was higher or lower that the average family income in the entire United States. Suppose that we knew that the average family income in the United States was $35,000 per year. The mean income from a random sample of Chicago residents could be calculated, and a onesample ttest could be used to determine whether their mean income level was significantly different from the national average. This one sample ttest statistic is calculated as follows:
where x represents the mean of the sampled data, µ represents the hypothesized value of this mean, and n represents the total number of sampled measures. In the above example, µ would equal $35,000 while x would be the average income calculated using data supplied by n Chicago residents. This tstatistic has n−1 degrees of freedom.
In practice, the twosample ttest is a more commonly used statistic. This statistic can evaluate whether or not there are significant differences in the means of two independently sampled populations. In addition to the assumption of independence, it is assumed that within each population the variable of interest is normally distributed with equal variances. The mathematical derivation of this test statistic is as follows:
where n _{1} and n _{2} are the number of observations in each of the two groups; x _{1} and x _{2} are the means of the two groups, and s _{p}^{2} is an estimate of the pooled sample variance. The sample variance is calculated using the formula:
where s _{1}^{2} and s _{2}^{2} represent the sample variances in the two groups. The total number of degrees of freedom associated with this ttest is n _{1}+n _{2}2.
To illustrate the application of this test statistic, consider the situation where an investigator would like to determine whether infant birthweight was significantly different between mothers who smoked during pregnancy and those who did not. Suppose that the mean birthweight among ten infants whose mothers smoked was 5 lbs., while the mean birthweight among the same number of infants whose mothers did not smoke was 8 lbs. If the pooled sample variance based on the weight measurements taken on these twenty infants was 3 lbs., then using the above formula, the calculated ttest statistic would be approximately 3.9 with 18 degrees of freedom. The twosided pvalue associated with this test is approximately 0.0006. In other words, there is about a 6 out of 10,000 probability of observing a difference at least as large as 3 lbs. by chance alone if there was truly no association between maternal smoking and birthweight. We would therefore conclude that the observed mean difference of 3 lbs. was unlikely to be explained by chance, and consider the observed difference statistically significant.
When the variances in two groups being compared are not equal, the "modified ttest" should be used to compare the means. Instead of using a common pooled estimate of variance,
the variance for each group is used in the calculation of the ttest statistic. Specifically, where n _{1} and n _{2} are the number of observations in each of the two groups; x _{1} and x _{2} are the means of the two groups and s _{1}^{2} and s _{2}^{2}represent the variances of the two groups. Because the exact distribution of the modified ttest statistic is difficult to derive, it is necessary to approximate the number of degrees of freedom using the following formula:
This value of d is rounded down to the nearest integer. Using the calculated modified ttest statistic and the estimated number of degrees of freedom, the pvalue can then obtained from the appropriate tdistribution to determine whether the two means are significantly different from each other.
Paired data is frequently collected in studies of public health. Here, each observation in the first sample is matched to a unique data point in the second sample. In the technique of selfpairing, measurements are taken on a single subject, or entity, at two distinct points in time. One example of selfpairing is the before and after experiment where each individual is examined both before and after a certain treatment has been applied. Because the data are no longer independent, the twosample ttest can no longer be used to test the before and after means. Instead, the paired ttest can be used to test the hypothesis that the mean difference of the pairs is equal to zero. This test is constructed by taking the mean difference of all observed pairs and dividing this by the standard error of all observed differences. The degrees of freedom associated with this test statistic is equal to the number of pairs less one.
Finally, the tdistribution plays a role in hypothesis tests using results obtained from multivariate regression analysis. Multivariate regression models are used to describe the association between an outcome variable and a series of independent variables. Computer programs have been developed to estimate the value of the model coefficients and their standard errors. Tests of significance about each independent variable can be performed by taking the ratio of these parameter estimates and their associated standard errors; this ratio follows a tdistribution. The number of degrees of freedom for these test statistics are determined by the number of observations and the number of independent variables in the fitted model.
Paul J. Villeneuve
(see also: Normal Distributions; Sampling; Statistics for Public Health )
Cite this article
Pick a style below, and copy the text for your bibliography.

MLA

Chicago

APA
"TTest." Encyclopedia of Public Health. . Encyclopedia.com. 18 Nov. 2018 <https://www.encyclopedia.com>.
"TTest." Encyclopedia of Public Health. . Encyclopedia.com. (November 18, 2018). https://www.encyclopedia.com/education/encyclopediasalmanacstranscriptsandmaps/ttest
"TTest." Encyclopedia of Public Health. . Retrieved November 18, 2018 from Encyclopedia.com: https://www.encyclopedia.com/education/encyclopediasalmanacstranscriptsandmaps/ttest
Citation styles
Encyclopedia.com gives you the ability to cite reference entries and articles according to common styles from the Modern Language Association (MLA), The Chicago Manual of Style, and the American Psychological Association (APA).
Within the “Cite this article” tool, pick a style to see how all available information looks when formatted according to that style. Then, copy and paste the text into your bibliography or works cited list.
Because each style has its own formatting nuances that evolve over time and not all information is available for every reference entry or article, Encyclopedia.com cannot guarantee each citation it generates. Therefore, it’s best to use Encyclopedia.com citations as a starting point before checking the style against your school or publication’s requirements and the mostrecent information available at these sites:
Modern Language Association
The Chicago Manual of Style
http://www.chicagomanualofstyle.org/tools_citationguide.html
American Psychological Association
Notes:
 Most online reference entries and articles do not have page numbers. Therefore, that information is unavailable for most Encyclopedia.com content. However, the date of retrieval is often important. Refer to each style’s convention regarding the best way to format page numbers and retrieval dates.
 In addition to the MLA, Chicago, and APA styles, your school, university, publication, or institution may have its own requirements for citations. Therefore, be sure to refer to those guidelines when editing your bibliography or works cited list.
ttest
ttest A test to calculate the probability that mean values for a particular measurement are significantly different in two sets of data.
Cite this article
Pick a style below, and copy the text for your bibliography.

MLA

Chicago

APA
"ttest." A Dictionary of Earth Sciences. . Encyclopedia.com. 18 Nov. 2018 <https://www.encyclopedia.com>.
"ttest." A Dictionary of Earth Sciences. . Encyclopedia.com. (November 18, 2018). https://www.encyclopedia.com/science/dictionariesthesaurusespicturesandpressreleases/ttest
"ttest." A Dictionary of Earth Sciences. . Retrieved November 18, 2018 from Encyclopedia.com: https://www.encyclopedia.com/science/dictionariesthesaurusespicturesandpressreleases/ttest
Citation styles
Encyclopedia.com gives you the ability to cite reference entries and articles according to common styles from the Modern Language Association (MLA), The Chicago Manual of Style, and the American Psychological Association (APA).
Within the “Cite this article” tool, pick a style to see how all available information looks when formatted according to that style. Then, copy and paste the text into your bibliography or works cited list.
Because each style has its own formatting nuances that evolve over time and not all information is available for every reference entry or article, Encyclopedia.com cannot guarantee each citation it generates. Therefore, it’s best to use Encyclopedia.com citations as a starting point before checking the style against your school or publication’s requirements and the mostrecent information available at these sites:
Modern Language Association
The Chicago Manual of Style
http://www.chicagomanualofstyle.org/tools_citationguide.html
American Psychological Association
Notes:
 Most online reference entries and articles do not have page numbers. Therefore, that information is unavailable for most Encyclopedia.com content. However, the date of retrieval is often important. Refer to each style’s convention regarding the best way to format page numbers and retrieval dates.
 In addition to the MLA, Chicago, and APA styles, your school, university, publication, or institution may have its own requirements for citations. Therefore, be sure to refer to those guidelines when editing your bibliography or works cited list.
ttest
ttest A test to calculate the probability that mean values for a particular measurement are significantly different in two populations.
Cite this article
Pick a style below, and copy the text for your bibliography.

MLA

Chicago

APA
"ttest." A Dictionary of Zoology. . Encyclopedia.com. 18 Nov. 2018 <https://www.encyclopedia.com>.
"ttest." A Dictionary of Zoology. . Encyclopedia.com. (November 18, 2018). https://www.encyclopedia.com/science/dictionariesthesaurusespicturesandpressreleases/ttest0
"ttest." A Dictionary of Zoology. . Retrieved November 18, 2018 from Encyclopedia.com: https://www.encyclopedia.com/science/dictionariesthesaurusespicturesandpressreleases/ttest0
Citation styles
Encyclopedia.com gives you the ability to cite reference entries and articles according to common styles from the Modern Language Association (MLA), The Chicago Manual of Style, and the American Psychological Association (APA).
Within the “Cite this article” tool, pick a style to see how all available information looks when formatted according to that style. Then, copy and paste the text into your bibliography or works cited list.
Because each style has its own formatting nuances that evolve over time and not all information is available for every reference entry or article, Encyclopedia.com cannot guarantee each citation it generates. Therefore, it’s best to use Encyclopedia.com citations as a starting point before checking the style against your school or publication’s requirements and the mostrecent information available at these sites:
Modern Language Association
The Chicago Manual of Style
http://www.chicagomanualofstyle.org/tools_citationguide.html
American Psychological Association
Notes:
 Most online reference entries and articles do not have page numbers. Therefore, that information is unavailable for most Encyclopedia.com content. However, the date of retrieval is often important. Refer to each style’s convention regarding the best way to format page numbers and retrieval dates.
 In addition to the MLA, Chicago, and APA styles, your school, university, publication, or institution may have its own requirements for citations. Therefore, be sure to refer to those guidelines when editing your bibliography or works cited list.