Student's ttest

A ttest is any statistical hypothesis test in which the test statistic has a Student's tdistribution if the null hypothesis is true.
Among the most frequently used ttests are:
 A statistical test of the null hypothesis that the means of two normally distributed populations are equal. All such tests are usually referred to as Student's ttests, though strictly speaking that name should only be used if the variances of the two populations are also assumed to be equal; the form of the test used when this assumption is dropped is sometimes called Welch's ttest. There are different versions of the ttest depending on whether the two samples are
 independent of each other (e.g., individuals randomly assigned into two groups), or
 paired, so that each member of one sample has a unique relationship with a particular member of the other sample (e.g., the same people measured before and after an intervention, or IQ test scores of a husband and wife).
 If the t value that is calculated is greater than the threshold chosen for statistical significance (alpha conventionally equal to 0.05), then the null hypothesis that the two groups do not differ is rejected in favor of the alternative hypothesis, which typically states that the groups do differ.
 A statistical test of whether the mean of a normally distributed population has a value specified in a null hypothesis.
 A statistical test of whether the slope of a regression line differs significantly from 0.
Varieties of ttest in the case of two samples
If we have two data sets, each characterized by its mean, the standard deviation and the number of data points, we can use some kind of ttest to determine whether the means are distinct, provided that the underlying distributions can be assumed to be normal.
 Whether the data points are normally distributed can be assessed by a normality test, such as KolmogorovSmirnov or ShapiroWilk.
 Whether the sample variances are equal can be assessed using Bartlett's test. However, it is probably statistically conservative not to make this assumption: modern statistical packages make the test equally easy to do with or without it.
 For novices, the most difficult issue is often whether the samples are paired (dependent) or independent. Dependent samples are sometimes described as involved "repeated measures", and they do often arise when we make before and after measurements on the same individuals or objects. But this is not the only case where related samples arise. For example, in a comparison of the height of men and women, we might recruit 100 men and 100 women, with no relationship between any particular man and any particular woman; in this case we would use an independent samples test. Alternatively, though, we might recruit 100 married or cohabiting oppositesex couples, and compare the height of each woman with her partner; this would call for a related samples test. There are repeated measures here, but it is the couple that is measured twice  once for the female and once for the male.
Alternatives to the ttest
If a nonparametric alternative to the ttest is wanted, the usual choices are:
 for independent samples, the MannWhitney U test
 for related samples, either the binomial test or the Wilcoxon signedrank test