Stats T Tests
Stats T Tests
www.kent.ac.uk/student-learning-advisory-service
1
T-test
Introduction
• We will introduce the t-test method, in particular we
will:
• Learn when we can use a t-test
For example:
• Testing the differences in time taken to recover from a disease
when one group is given a medical treatment and the other is
given a placebo (DV is time to recover and drug treatment group
is the IV).
• Comparing differences in profit made from coffee sales between
Costa Coffee and Café Nero (coffee shop is IV and profit made is
DV).
3
Paired samples t-test
• A paired samples t-test (also known as dependent samples) is
used when you want to compare the mean scores for the same
group of people on two different occasions or if you have
matched pairs (within-subjects design).
• The dependent variable (DV) is numerical and the independent
variable (IV) is categorical.
For example:
• Students’ test results before and after completing a course.
• Comparing blood pressure measurements using two different
methods (e.g., using a stethoscope and a dynamap).
4
One-tailed or two-tailed t-test?
• If you want to know whether the two populations are
different from one another, perform a two-tailed t-test.
Key words in non-directional hypothesis:
Difference
Change
Affect
Impact
6
The T-value
Where:
• t is the t-value
• x1 and x2 are the means of the two groups
being compared
• s2 is the pooled standard error of the two
groups
• n1 and n2 are the number of observations
in each of the groups
9
Independent Samples T-test in
SPSS
Example:
Is there a significant difference in mean self-esteem
scores for males and females?
Variables:
• One categorical IV: Sex (male/female)
• One continuous DV: Self-esteem scores
Independent Samples T-test in
SPSS
1. Click on Analyze, Compare Means, then
Independent-Samples T test.
2. Move the continuous dependent variable (e.g.,
total self-esteem: tslfest) into the box marked
Test Variable.
3. Move the categorical independent variable (e.g.,
sex) into the box labelled Grouping Variable.
Independent Samples T-test in
SPSS
4. Click on Define Groups and type in the numbers
used in the data set to code each group:
• E.g., 1 = males, 2 = females
• In the group 1 box, type 1
• In the group 2 box, type 2
Tip: If you can’t remember the codes used, right click on the variable
name and choose Variable Information from the pop-up box that
appears. This will list the codes and labels.
1.622
Eta squared = According to Cohen (1988):
1.62 + (184 + 252 – 2)
2
Small effect: .01
Medium effect: .06
Eta squared = .006 Large effect: .14
Independent Samples T-test in
SPSS
Example results write-up:
An independent samples t-test was conducted to
compare the self-esteem scores for males and
females. There was no significant difference in scores
for males (M = 34.02, SD = 4.91) and females (M =
33.17, SD = 5.71; t (434) = 1.62, p = .11, two-tailed).
The magnitude of the differences in the means
(mean difference = .85, 95% CI: -1.80 to 1.87) was
very small (eta squared = .006).
Independent Samples T-test in
SPSS
Note: Results are usually rounded to two decimal places
ANOVA
• The T-test is used to compare the means of two
groups.
• ANOVA is used to compare the means of two or
more groups.
Upcoming workshops…
www.kent.ac.uk/student-learning-advisory-service