5. ONE SAMPLE T-TEST
•Used to test whether the mean
of single variable differs from
a specified constant.
6. ONE SAMPLE T-TEST
Example:
• A researcher wants to test whether the
average IQ score of a group of students
differs from 100.
• A stats professor wants to determine
whether the average grade on Assignment 1
differs significantly from 23 (an A average).
7. Step 1: State the Null and Alternate
Hypotheses
• H₀ = The average grade on
Assignment 1 is equal to 23.
• Hₐ = The average grade on
Assignment 1 is not equal to 23.
ONE SAMPLE T-TEST
8. Step 2: Input each
student’s grade into
SPSS.
ONE SAMPLE T-TEST
9. Step 3: Run the Analysis.
a. Analyze Compare Means
One Sample
T-test Test variable = assign I
b. Test value = 23
c. Click OK
ONE SAMPLE T-TEST
11. ONE SAMPLE T-TEST
ONE SAMPLE TEST
TEST VALUE = 23
t df Sig. (2-
tailed)
Mean
difference
95% Confidence
Interval of the
Difference
Lower Upper
Assign 1 -4.944 14 .000 -1.96667 -2.8199 -1.1134
12. Step 4: Make a decision
regarding the null
M = 21.03, SD = 1.54
t (14*) = -4.944
p < .001
ONE SAMPLE T-TEST
15. • The independent samples t-test is
used to test comparative research
questions.
• That is, it tests for differences in
two group means or compares
means for two groups of cases.
INDEPENDENT T-TEST
16. Step 1: State the Null and Alternate
Hypotheses
a. Ho = There is no difference between
class 1 and class 2 on Assignment 1.
b. Ha = There is a difference between class
1 and class 2 on Assignment 1.
INDEPENDENT T-TEST
17. Step 2: Input each student’s grade into SPSS, along with
which class they are in.
INDEPENDENT T-TEST
Grade Class
20.00 1.00
20.50 1.00
21.00 1.00
20.50 1.00
20.00 1.00
24.50 2.00
23.50 2.00
20.00 2.00
20.00 2.00
18. Step 3: Run the Analysis.
a. Analyze Compare Means
Independent Samples T-test
b. Test variable = assign1
c. Grouping variable = class
INDEPENDENT T-TEST
19. d. Define Groups: Type “1”
next to Group 1
e. Type “2” next to Group 2
f. Click Continue
g. Click OK
INDEPENDENT T-TEST
20. Step 4: Make a decision
regarding the null
Class 1 (M = 21.18, SD = 1.49)
Class 2 (M = 21.90, SD = 1.94)
INDEPENDENT T-TEST
21. Levene’s Test for equal variances
• Ho = The variances of the two variables are equal.
• Ha = The variances of the two variables are not equal.
INDEPENDENT T-TEST
Levene's Test for Equality of Variances
F Sig.
Assign 1- Equal variances
assumed Equal variances
not assumed
4.519 .044
22. Make a decision regarding
the null
•t (22.5) = -1.086
•p = .289
INDEPENDENT T-TEST
25. Used to compare the means of two
variables for a single group.
The procedure computes the
differences between values of the two
variables for each case and tests
whether the average differs from 0.
PAIRED SAMPLES T-TEST
26. Example:
A researcher wanted to know the
effects of a reading program. The
researcher gave the students a pretest,
implemented the reading program,
then gave the students a post test.
PAIRED SAMPLES T-TEST
27. Step 1: State the Null and Alternate Hypotheses
Ho = There is no difference in students’
performance between the pretest and the
posttest.
Ha = Students will perform better on the posttest
than on the pretest.
PAIRED SAMPLES T-TEST
29. SPSS (unless given the choice)
automatically runs a 2 tailed test, IF
you have a directional alternate
hypothesis (and a 2-tailed test was
run), you MUST divide the p-value by
2 to obtain the correct p-value!
PAIRED SAMPLES T-TEST
30. Step 2: Set up data
PAIRED SAMPLES T-TEST
Pre Post
20.00 25.00
21.00 24.00
19.00 23.00
18.00 22.00
20.00 24.00
21.00 25.00
31. Step 3: Analyze the Results
• Analyze Compare Means Paired
Samples t-Test
• Paired variables: pre--post
PAIRED SAMPLES T-TEST
Mean N Std.
Deviation
Std. Error Mean
Pair Pre
1 Post
19.8333
23.8333
6
6
1.16905
1.16905
.47726
.47726
Paired Samples Statistics
32. PAIRED SAMPLES T-TEST
Paired Sample Test
Paired Differences T df Sig. (2-
tailed)
Mean Std.
deviation
Std.
error
mean
95% Confidence Interval of
the Difference
Lower Upper -15.492 5 .000
Pair 1
Pre-Post
-4.00000 .63246 .25820
-4.66372 -4.66372
33. Step 4: Make a decision regarding the null
• Pretest (M = 19.83, SD = 1.17)
• Posttest (M = 23.83, SD = 1.17)
• t (5) = -15.49 – p < .001 (two-tailed)
.000/2 = 0
p < .001
PAIRED SAMPLES T-TEST
34. Step 5: Write up your results.
•The null hypothesis stated that
there is no difference in students’
performance between the pretest
and the posttest.
PAIRED SAMPLES T-TEST
35. • Suppose: – Ha = Class 1 will score
higher on Assignment 3 than Class 2.
• Must be based on literature (or prior
data/test scores).
Directional Hypothesis Example
36. • If Ha = Class 1 will score higher
on Assignment 3 than Class 2.
•SPSS reported a p-value of .08.
Directional Hypothesis Example
38. Solution:
Step 1: Enter the Data.
Enter the Age scores in the first column
(VAR00001) of the SPSS Data Editor,
beginning with the first score listed above
in the first cell of the first column of the
Data Editor.
SPSS ILLUSTRATIVE EXAMPLE
39. Solution:
Step 2: Name the Variables.
1. Click the Variable View tab in the
lower left corner of the Data Editor.
2. Click VAR00001; the type Age in
the highlighted cell and then press
Enter.
SPSS ILLUSTRATIVE EXAMPLE
40. Solution:
Step 3: Analyze the data.
1. Click on Analyze; then select
Compare Means; then click on
One-Sample T-Test…
2. Click the arrow in the middle of
the dialog box.
SPSS ILLUSTRATIVE EXAMPLE
41. 3. In the Test Value: box,
replace 0 with 13.0
4. Click OK.
SPSS ILLUSTRATIVE EXAMPLE
43. One-sample Test
SPSS ILLUSTRATIVE EXAMPLE
Test Value = 13.0
95% Confidence
Interval of the
Difference
t df Sig. (2-
tailed)
Mean
Differenc
e
Lower Upper
Age -2.320 14 .036 -2.00000 -3.8486 -.1514
44. Data:
Before the Campaign After the Campaign
(gal/month) (gal/month)
Family Group 1 Group 2
A 55 48
B 43 38
C 51 53
D 62 58
E 35 36
F 48 42
G 58 55
H 45 40
I 48 49
J 54 50
K 56 58
SPSS ILLUSTRATIVE EXAMPLE
45. Solution:
Step 1: Enter the data.
1. Enter scores of Group 1 in the
first column (VAR00001) of the
Data Editor, beginning with the first
Group 1 score the top cell of the
first column.
SPSS ILLUSTRATIVE EXAMPLE
46. 2. Enter the scores of Group 2 in
the second column (VAR00002) of
the Data Editor, beginning with the
first Group 2 score in the top cell
of the second column.
SPSS ILLUSTRATIVE EXAMPLE
47. Solution:
Step 2: Name the Variables.
1. Click the Variable View tab in the
lower left corner of the Data Editor.
2. Click VAR00001 with Before_C in
the highlighted cell and then press Enter.
SPSS ILLUSTRATIVE EXAMPLE
49. Solution:
Step 3: Analyze the data.
1. Click Analyze; then select
Compare Means; then click
Paired-Samples T-Test…
SPSS ILLUSTRATIVE EXAMPLE
50. 2. Click the arrow in the middle of the
dialog box.
3. Click After_C; then click the arrow
in the middle of the dialog box.
4. Click OK.
SPSS ILLUSTRATIVE EXAMPLE
51. Analysis Results
SPSS ILLUSTRATIVE EXAMPLE
T Df Sig. (2-
tailed)
Mean Std.
Deviation
Std.
Error
Mean
95% Confidence
Interval of the
Difference
Lower Upper
Pair 1
Before_C – After_C
2. 91667 3. 47611 1.00347 .70805 5.12528 2.907 11 .014
Paired Samples Test