<P> The independent samples t - test is used when two separate sets of independent and identically distributed samples are obtained, one from each of the two populations being compared . For example, suppose we are evaluating the effect of a medical treatment, and we enroll 100 subjects into our study, then randomly assign 50 subjects to the treatment group and 50 subjects to the control group . In this case, we have two independent samples and would use the unpaired form of the t - test . The randomization is not essential here--if we contacted 100 people by phone and obtained each person's age and gender, and then used a two - sample t - test to see whether the mean ages differ by gender, this would also be an independent samples t - test, even though the data are observational . </P> <P> Paired samples t - tests typically consist of a sample of matched pairs of similar units, or one group of units that has been tested twice (a "repeated measures" t - test). </P> <P> A typical example of the repeated measures t - test would be where subjects are tested prior to a treatment, say for high blood pressure, and the same subjects are tested again after treatment with a blood - pressure lowering medication . By comparing the same patient's numbers before and after treatment, we are effectively using each patient as their own control . That way the correct rejection of the null hypothesis (here: of no difference made by the treatment) can become much more likely, with statistical power increasing simply because the random between - patient variation has now been eliminated . Note however that an increase of statistical power comes at a price: more tests are required, each subject having to be tested twice . Because half of the sample now depends on the other half, the paired version of Student's t - test has only n / 2 − 1 degrees of freedom (with n being the total number of observations). Pairs become individual test units, and the sample has to be doubled to achieve the same number of degrees of freedom . Normally, there are n − 1 degrees of freedom (with n being the total number of observations). </P> <P> A paired samples t - test based on a "matched - pairs sample" results from an unpaired sample that is subsequently used to form a paired sample, by using additional variables that were measured along with the variable of interest . The matching is carried out by identifying pairs of values consisting of one observation from each of the two samples, where the pair is similar in terms of other measured variables . This approach is sometimes used in observational studies to reduce or eliminate the effects of confounding factors . </P>

When do you use a 2 sample t test
find me the text answering this question