Notes
Data
Applets
Examples

OnLine Help
New User
User's Guide
References

Notes on Topic 10:
Two Sample T-Tests

    T-Test for Two Related (Dependent) Samples of Interval Data

    Generic T-Statistic Formula

    Note that for all situations in which the T-Statistic is used, the formula involves the same generic structure:


    T-Tests for 2 Related Samples

    Chapter 11 presents T-Tests for the situation where there are two related samples of scores. This situation commonly occurs in the repeated-measures experimental study. It can also occur in the matched-subject experimental study. These designs are sometimes called dependent sample studies or within-subject designs.

    Repeated-Measures Study
    A repeated-measures study is one in which a single sample of subjects is used to compare two (or more) different treatment conditions. Each individual is measured in one treatment, and then the same individual is measured again in the second treatment. Thus, a repeated-measures study produces two (or more) samples of scores, but each sample of scores is obtained from the same sample of subjects. (Note we have an ambiguous usage of the word "sample" here).

    Matched-Subject Study
    A matched-subject study is one in which each individual in one sample is matched with a a subject in another sample. The matching is done so that the two individuals are as equivalent as possible with respect to a specific variable (or variables) that the researcher would like to control.

    Dependent Samples
    Related samples are sometimes called "dependent samples" because the values observed in one sample of scores "depend" on those observed in the other sample of scores.

    Within Subject Design
    Related samples are sometimes called "within subject designs" because the values observed "within subjects" (for the same subject) across conditions.


    T-Statistic for Related Samples

    The T-Statistic for two related samples uses the generic T-Statistic formula:

    The specific T-Statistic for two related samples is identical to the T-Statistic for a single sample, except that the statistic is defined on the differences between the scores for the two related samples. Thus:

    Sample Statistic:
    The difference score for the subjects is simply the second score minus the first:

    Population Parameter:
    The hypothesized difference between the two population means:

    Estimated Standard Error:
    The estimated standard error of the difference scores is defined exactly as for the single sample T-Statistic, except that everything (mean, standard deviation, n, etc.) is defined on the differences:

    T-Statistic:
    T is defined just as with a single sample, except that is defined on difference scores. It becomes:

    Hypothesis Testing:
    Hypotheses are constructed just as before, except that they are about the differences (usually involving hypotheses about zero differences). The possible pairs of one-tail and two-tail alternative and null hypotheses are:

    One Tail, Less Than 0
    Two Tail
    One Tail, Greater Than 0

    Degrees-of-Freedom:
    The T-value is then evaluated just as before, using degrees-of-freedom of


    Independent Samples T-Test Example:
    Asthma Attacks

    A researcher in behavioral medicine believes that stress often makes asthma symptoms worse for people who suffer from this respiratory disorder. Therefore, the researcher decides to study the effect of relaxation training on the severity of their symptoms.

    A sample of 5 patients is selected. During the week before treatment, the investigator records the severity of their symptoms by measuring how many doses of medication are needed for asthma attacks. Then the patients receive relaxation training. For the week following the training the research once again records the number of doses used by each patient.

    • Hand Calculations:

      The classical hypothesis testing steps are:
      1. State the hypothesis: We test the hypothesis that there will be fewer medication doses used after relaxation than before (before minus after will be positive). Note that this differs from the book, where they use a non-directional test. Thus we have:

      2. Set the decision criteria: We use alpha=.05, one tail, for df=4. We find the critical T-value is 2.132.
      3. Gather the data: Here is ViSta's datasheet for the Asthma data:
      4. Evaluate the hypothesis: The mean difference is 3.2 (3.2 fewer doses after relaxation). The variance of the differences is 3.7. The estimate of the standard error of the difference scores is .86. We now calculate T=3.72. Since T is in the critical region we reject the null hypothesis that there is no reduction in the number of medication doses after relaxation.

    • Computer Calculations:

      ViSta can be used to analyze these data, as specified in the ViSta Applet. We specified a directional T-Test: There will be fewer medication doses used after relaxation than before. Note that this differs from the book, where they use a non-directional test. We selected the "before" variable as the first variable and the "after" variable as the second one (the second variable is subtracted from the first).

      We obtained the following workmap:

      Report-Model: The analysis produces the following report, which corresponds with the hand calculations. In particular, p=.0102, which suggest we can safely reject the null hypothesis that there is no reduction in the number of medication doses after relaxation. The homogeneity of variance test indicates that the two conditions have about the same variance, an assumption required for the T-Test to be valid.

      Visualize-Model: The visualization shown below suggests that the data are not symmetrically distributed, since the jagged lines don't follow the straight lines in the quantile plots and in the quantile-quantile plot, and since the boxes in the box and diamond plot are not symmetric. The quantile-quantile plot indicates that the two conditions have about the same variance. The normal-probability plots suggest that the data may not be normal.

      This implies that the assumption of normality underlying the T-Test may be violated. Consequently, the p value (p=.0102) may be to optimistic. This value may be misleading, particularly with a small sample size.



    Back | Up | Next