Independent Samples T test (Two-samples T test)
Independent-samples t test (two-sample t test)
This is used to compare the means of one variable for two groups of cases. As an example, a practical application would be to find out the effect of a new drug on blood pressure. Patients with high blood pressure would be randomly assigned into two groups, a placebo group and a treatment group. The placebo group would receive conventional treatment while the treatment group would receive a new drug that is expected to lower blood pressure. After treatment for a couple of months, the two-sample t test is used to compare the average blood pressure of the two groups. Note that each patient is measured once and belongs to one group.
Assumptions underlying the use of t test
Before we look at the details of how to perform and interpret a t test, it is good idea for you to understand the assumptions underlying the use of t test. The assumptions are:
- your data is normally distributed
- the variances between the groups are equal
- the sample size is adequate (at least 30 cases per group)
Exercise
Perform an independent-samples t test (two-sample t test) on the data on Table 1. This data file is stored in this location \\campus\software\dept\spss and is called high blood pressure.sav.
Table 1: Patients with high blood pressure
You need to first check the two assumptions: i) whether blood pressure is normally distributed and ii) whether the variance is equal between the two groups (Homogeneity of variance test). Write down the null and alternative hypotheses for the normality test:
Null Hypothesis (Ho): Blood pressure is normally distribution.
Alternative Hypothesis (H1): Blood pressure is not normally distribution.
Normality Test
Follow these steps to perform the normality test:
- From the menu bar select Analyze -> Descriptives Statistics -> Explore….
- Transfer blood pressure [bloodpres] to Dependent List:.
- Transfer Group Membership [group] to Factor List:.
- From Display click on Plots. Then click on Plots….
- Under Descriptive deselect Stem-and –leaf.
- Select Normality plots with tests.
- Click on Continue. Click on OK.
Examine the result on the table Tests of Normality. For a small sample size (n≤50) use the Shapiro-Wilk statistic. For large sample size (n>50) use the Kolmogorov-Smirnov statistic.
Is blood pressure from the placebo group normally distributed? Why?
Is blood pressure from the new drug group normally distributed? Why?
Overall, what would you conclude?
Notice that as part of the output some graphs (charts) are also produced. The Normal Q-Q plots and Detrented Normal Q-Q plots. The Normal Q-Q plots also helps you decide if the data is normally distributed or not. For a normal distribution, all the dots should be closed to (or be on) the straight line of the Normal Q-Q plots. Ignore the Detrented Normal Q-Q plots.
Write down the null and alternative hypotheses for the Homogeneity of variance test:
Null Hypothesis (Ho): The variance is equal between the two groups.
Alternative Hypothesis (H1): The variance is not equal between the two groups.
Homogeneity of variance test
Follow these steps to perform the homogeneity of variance test:
- Select Analyze -> Compare Means -> One-Way ANOVA….
- Transfer blood pressure [bloodpres] to Dependent List:.
- Transfer Group Membership [group] to Factor.
- Click on Options and select Homogeneity of variance test.
- Click Continue and click OK.
Examine the table Test of Homogeneity of variance. What would you conclude? Ignore the table ANOVA which is also produced as part of this procedure.
Independent Samples T Tests
Since blood pressure passed the two assumptions, that is, blood pressure was normally distributed and the variances between the two groups are equal, we have to perform a parametric t test.
Write down the null and alternative hypotheses for the Independent Samples T Tests:
Null Hypothesis (Ho): The average blood pressure is the same between the placebo group and new drug group.
Alternative Hypothesis (H1): The average blood pressure is different between the placebo group and new drug group.
Follow these steps to perform the test:
- Select Analyze -> Compare Means -> Independent-Samples T Test….
- Transfer blood pressure [bloodpres] to Test Variable(s):.
- Transfer Group Membership [group] to Grouping Variable:.
- Click on Define Groups. Beside Group 1: type 1. Beside Group 2: type 2.
- Click on Continue and click on OK.
Examine the output. Notice that two tables are produced. Using the table Group Statistics answer these questions.
What is the average blood pressure for the placebo group?
What is the average blood pressure for the new drug group?
Which of these two averages is more variable and why?
Using the table Independent Sample Test, answer these questions. Notice that in this table two rows of figures are given, use the first row.
What is the difference in the averages between the two groups?
Is this difference statistically significant and why?
What is the 95% Confidence Interval of the average difference between the two groups? How is this related to the p-value?
Will you accept or reject the null hypothesis? Why?