You are on page 1of 27

T test

used to determine if two sets of data are
significantly different from each other

Determine either different between sample and

One-sample t-test
• Used to compare a sample mean with a known population mean or
some other meaningful, fixed value
Independent samples t-test
• Used to compare two means from independent groups
Paired samples t-test
• Used to compare two means that are repeated measures for the
same participants - scores might be repeated across different
measures or across time.
• Used also to compare paired samples, as in a two treatment
randomized block design.
Dependent variables must be:
• Measured at interval or ratio level level of measurement - i.e., needs
to be continuous.
• Normally distributed in all groups of the independent variable.
– Robust to violations of this assumption if sample sizes are large
and approximately equal (> 15 cases per group)
• Have approximately equal variance across all groups of the IV
(homogeneity of variance e.g., tested by Levene's test ).
– If not the p-values for significance tests are inaccurate.
– If the variances are different SPSS has post-hoc tests to adjust for
• Cases represent random samples from the populations and the scores
of the test variable are independent of each other.
– Inaccurate p-values if the independence assumption is violated.

One Sample T-Test
• compare a sample mean with a known
population mean
• H0: there is no difference in _____between
Review 6 Steps for Significance Testing
1. Set alpha (p level). 4. Find the critical value
2. State hypotheses, Null of the statistic.
and Alternative. 5. State the decision rule.
3. Calculate the test 6. State the conclusion.
statistic (sample
One Sample Exercise (1)
Testing whether light bulbs have a life of 1000 hours

1. Set alpha.  = .05

2. State hypotheses.
– Null hypothesis is H0:  = 10.5.
– Alternative hypothesis is H1:   10.5.
3. Calculate the test statistic
One Sample T-Test
• Open file: one sample
• Go to Analyze 
Compare Means to
open dialog One
Sample T-Test
One Sample T-Test
• Enter the dependent variable withadd to Test
Variable(s) box, then type 10.5 value in Test
Value box and click OK
Computers print p values rather than critical values.
If p (Sig.) is less than .05, it’s significant.

Stating the Conclusion
• State the conclusion. We reject the null hypothesis
that the were drawn from a population in which the
average withadd is 10.5. The difference between our
sample mean (13.86) and the mean of the
population (10.5) is SO different that it is unlikely
that our sample could have been drawn from a
population with an average withadd of 10.5.
paired samples t-test
• Click Analyze, click compare means, and click Paired-
Samples T-Test.

• Click without and withadd, then click ok.

Computers print p values rather than critical values.
If p (Sig.) is less than .05, it’s significant.
Example no 2
Person Painfree Placebo Difference
(time in
1 60 55 5

2 35 20 15

3 70 60 10

4 50 45 5

5 60 60 0

M 55 48 7

SD 13.23 16.81 5.70

Using SPSS for dependent t-test
• Open SPSS
• Open file “SPSS Examples” (same as before)
• Go to:
– “Analyze” then “Compare Means”
– Choose “Paired samples t-test”
– Choose the two IV conditions you are comparing.
Put in “paired variables box.”
Dependent t- SPSS output
Paired Samples Statistics

Std. Error
Mean N Std. Deviation Mean
Pair PAINFREE 55.0000 5 13.2288 5.9161
1 PLACEBO 48.0000 5 16.8077 7.5166

Paired Samples Correlations

N Correlation Sig.
Pair 1 PAINFREE & PLACEBO 5 .956 .011
Paired Samples Test

Paired Differences
95% Confidence
Interval of the
Std. Error Difference
Mean Std. Deviation Mean Lower Upper t df Sig. (2-tailed)
Pair 1 PAINFREE - PLACEBO 7.0000 5.7009 2.5495 -7.86E-02 14.0786 2.746 4 .052
Independent Sample

Ciri Independent Sample
 .

 H0: µ1= µ2 H1: µ1≠ µ2

or µ1< µ2
or µ1> µ2
What we expected
A study was done to compare job stress between two
employee groups. Data were solicited
from a randomly selected sample.
Test for the difference at .05 level of

Test the hypothesis on the difference at

.05 level significance
 Analyze
 Compare Means
 Independent-
Sample T-test
 Select test
variable and
then click
 Select the
variable and
 Click on the
Define Groups
 Group 1: the
lowest value for
the variable,
 Group 2:
 Continue and
 Ok

Levene’s test has a probability

greater than .05, we can assume
The two-tail significant for without
that the population variances are
relatively equal. Therefore, we can Additive indicates that p > .05, is
report using the Equal variances not significant
assumed (first row)

sig-t (.546 > α (.05)

Because of H0 fail to reject and no
significant difference between stress and job
location α = .05