Вы находитесь на странице: 1из 12

Using SPSS to perform statistical

tests:

Using SPSS to perform an independent-means t-test:

Do Waitrose shoppers bump their trollies into


more people than Sainsbury's shoppers?

(a) Independent-measures design: two separate


groups of shoppers.

(b) Looking for differences between conditions.

(c) Ratio data: number of trolley collisions per


participant in a single shopping expedition.

Appropriate test: independent-measures t-test.

1
Independent-measures t-test, using SPSS:

Data are entered in the data editor window, output is


viewed in the output window.
In SPSS, each row is a participant's data; each column
is a condition, or contains codes to say which
condition the score belongs to.

"collide"
contains data
(one score per
participant);

"shop" tells
SPSS which
condition each
score belongs
to (Sainsburys
or Waitrose)

Step 1: enter the data into SPSS:


In the data editor window, you can toggle between
Data view and Variable view.

In Variable view, you can


name variables (8 letters and/or numbers only);
label variables (give them a meaningful longer name -
recommended!)
give labels to values of variables (e.g. "sainsbury" instead
of "1", "Waitrose" instead of "2", etc.)

2
Step 2: perform the analysis:

To run an independent-
means t-test,
Analyze; Compare means;
Independent-Samples T-
Test...

Put the data column


("collide") into Test
Variable(s) and the codes
column ("shop") into
Grouping Variable

Click on "Define Groups..."

Sainsbury was group 1, and


Waitrose was group 2, so
enter "1"and "2" here.
Then click "Continue" and
then "OK".

3
Step 3: SPSS output for an independent-means t-test:

SPSS changes from Data View to Output View.


Shows Descriptive statistics; Levene's test; two versions of the
Independent-means t-test.

Group Statistics

Std. Error
supermarket N Mean Std. Deviation Mean
number of times sainsbury 9 3.7778 1.56347 .52116
shopper's trolly collides
with someone else's waitrose 9 9.8889 2.26078 .75359

Descriptive statistics: DV; IV and its levels; N, mean, SD and


SEM for each group.
Independent Samples Test

Levene's Test for


Equality of Variances t-test for Equality of Means
95% Confidence
Interval of the
Mean Std. Error Difference
F Sig. t df Sig. (2-tailed) Difference Difference Lower Upper
number of times Equal variances
2.136 .163 -6.670 16 .000 -6.1111 .91625 -8.05347 -4.16876
shopper's trolly collides assumed
with someone else's Equal variances
-6.670 14.228 .000 -6.1111 .91625 -8.07332 -4.14891
not assumed

Levene's test:
If sig. > .05, then data have homogeneity of variance - can use the
"equal variances assumed" version of the t-test.
If sig. <=.05, then inhomogeneity of variance - use the "equal
variances not assumed" version of the t-test (or use the Mann-
Whitney test).

4
Group Statistics

Std. Error
supermarket N Mean Std. Deviation Mean
number of times sainsbury 9 3.7778 1.56347 .52116
shopper's trolly collides
with someone else's waitrose 9 9.8889 2.26078 .75359

Independent Samples Test

Levene's Test for


Equality of Variances t-test for Equality of Means
95% Confidence
Interval of the
Mean Std. Error Difference
F Sig. t df Sig. (2-tailed) Difference Difference Lower Upper
number of times Equal variances
2.136 .163 -6.670 16 .000 -6.1111 .91625 -8.05347 -4.16876
shopper's trolly collides assumed
with someone else's Equal variances
-6.670 14.228 .000 -6.1111 .91625 -8.07332 -4.14891
not assumed

We can use the "equal variances assumed" version of the t-test.


t = -6.67, 16 d.f., p<.0005 (anything less than .0005 appears as
".000").
"Mean difference" is average difference between conditions.
"Std. Error Difference" is a measure of the reliability of this
difference.
95% CI shows the range within which the difference would be
expected to lie, on 95% of occasions this experiment was run.

Group Statistics

Std. Error
supermarket N Mean Std. Deviation Mean
number of times sainsbury 9 3.7778 1.56347 .52116
shopper's trolly collides
with someone else's waitrose 9 9.8889 2.26078 .75359

Independent Samples Test

Levene's Test for


Equality of Variances t-test for Equality of Means
95% Confidence
Interval of the
Mean Std. Error Difference
F Sig. t df Sig. (2-tailed) Difference Difference Lower Upper
number of times Equal variances
2.136 .163 -6.670 16 .000 -6.1111 .91625 -8.05347 -4.16876
shopper's trolly collides assumed
with someone else's Equal variances
-6.670 14.228 .000 -6.1111 .91625 -8.07332 -4.14891
not assumed

So - highly significant difference between Sainsbury and Waitrose


shoppers.
On average, Waitrose shoppers bump into 6 more people than
Sainsburys shoppers.
95% CI shows that if we ran this study many times, the difference is
likely to vary between 4 and 8 people - but 95% of the time,
Waitrose shoppers will collide with more people than Sainsburys
shoppers.
(If the difference is significant, both figures should be positive or
both negative).

5
Mann-Whitney test using SPSS:

Data entry is exactly the same as for the independent-means t-test.


Analyze; Nonparametric Tests; 2 Independent Samples...

Put the data column


("collide") into Test
Variable(s) and the codes
column ("shop") into
Grouping Variable [all exactly
as before, with the t-test]

"Define Groups" as before.


Click on "Options" if you
want descriptive statistics.
Then click "OK".

6
SPSS output for a Mann-Whitney test:
Descriptive Statistics

N Mean Std. Deviation Minimum Maximum


number of times
shopper's trolly collides 36 6.2500 3.54058 1.00 14.00
with someone else's
supermarket 36 2.5000 1.13389 1.00 4.00

Ranks

supermarket N Mean Rank Sum of Ranks


number of times sainsbury 9 5.00 45.00
shopper's trolly collides waitrose 9 14.00 126.00
with someone else's Total 18

Mann-Whitney U (N1 = 9, N2 = 9) = 0, p<.0005,


b
Test Statistics
two-tailed test.
number of
times
shopper's
trolly collides
with someone
else's Use Analyze > Descriptive statistics >
Mann-Whitney U .000
Wilcoxon W 45.000 Explore... to get useful descriptive statistics.
Z -3.591
Asymp. Sig. (2-tailed)
Exact Sig. [2*(1-tailed
.000
a
Sainsbury's: median = 4.00, range = 5.00.
.000
Sig.)]
a. Not corrected for ties. Waitrose: median = 9, range = 7.00.
b. Grouping Variable: supermarket

Same conclusion as before.

Using SPSS to perform a repeated-measures t-test:

Does shopping in Waitrose make people bump their


trollies into more people than shopping in
Sainsbury's?

(a) Repeated-measures design: one group of


shoppers, shopping in two different places (Waitrose
and Sainsburys).

(b) Looking for differences between conditions.

(c) Ratio data: number of trolley collisions by each


participant in two different shopping expeditions.

Appropriate test: repeated-measures t-test.

7
Step 1: enter the data:
Each row is a participant's data; each column is now a
condition (shopping in Waitrose or Sainsburys).

Step 2: perform the analysis:

Analyze;
Compare means;
Paired-Samples T-Test...

Click on the two variables you want to compare with the t-test (click
on one, then hold down Ctrl or Shift and click on the other). Then click
"OK".

8
Step 3: SPSS output for a repeated-measures t-test:
Paired Samples Statistics

Std. Error Descriptive statistics


Mean N Std. Deviation Mean
Pair number of trolley
3.7778 9 1.56347 .52116
1 collisions in Sainsbury's
number of trolley
9.8889 9 2.26078 .75359
collisions in Waitrose

Paired Samples Correlations


Is there a correlation
N Correlation Sig. between a person's score in
Pair
1
number of trolley
collisions in Sainsbury's
9 .204 .598
one condition and their score
& number of trolley
collisions in Waitrose in the other? (Usually ingore
this).
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 number of trolley
1 collisions in Sainsbury's
-6.1111 2.47207 .82402 -8.0113 -4.2109 -7.416 8 .000
- number of trolley
collisions in Waitrose

Mean difference between conditions = -6.11. t = -7.42, 8 d.f.,


p<.0005.
Type of supermarket affects shopper's trolley behaviour.

Wilcoxon test using SPSS:

Data entry is exactly the same as for the repeated-


measures t-test.

Analyze; Nonparametric Tests; Click on variables you wish to


compare (exactly as for
2 Related Samples...
repeated-measures t-test), then
click "OK":

9
SPSS output for a Wilcoxon test:
Ranks

N Mean Rank Sum of Ranks Ignore this bit of the


number of trolley Negative Ranks 0a .00 .00
collisions in Waitrose - Positive Ranks 9b 5.00 45.00 output. Use Explore
number of trolley
collisions in Sainsbury's
Ties
Total
0c
9
to generate
a. number of trolley collisions in Waitrose < number of trolley collisions in meaningful
Sainsbury's
b. number of trolley collisions in Waitrose > number of trolley collisions in descriptive statistics.
Sainsbury's
c. number of trolley collisions in Sainsbury's = number of trolley collisions in
Waitrose

b
Test Statistics

number of
SPSS converts W to a z-score.
trolley
collisions in
Waitrose -
z = -2.71, p = .007 (two-tailed test).
number of
trolley
collisions in
Conclusion as before: type of
Z
Sainsbury's
-2.714a
supermarket has an effect on shoppers'
Asymp. Sig. (2-tailed) .007 trolley behaviour.
a. Based on negative ranks.
b. Wilcoxon Signed Ranks Test

Which are more scary - Daleks or Cybermen?


Paired Samples Statistics

Std. Error
Mean N Std. Deviation Mean
Pair number of nightmares
5.0000 10 1.82574 .57735
1 after watching Daleks
number of nightmares
2.2000 10 1.87380 .59255
after watching Cybermen

Interpretation: children have


significantly more nightmares after
watching Daleks than after watching
Cybermen (repeated measures t (9) =
3.38, p = .01, two-tailed test).

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 number of nightmares
1 after watching Daleks -
2.8000 2.61619 .82731 .9285 4.6715 3.384 9 .008
number of nightmares
after watching Cybermen

10
Which Star Trek captain is the best looking - Kirk or Picard?

Descriptive Statistics

N Mean Std. Deviation Minimum Maximum


attractiveness of Kirk (1
10 3.7000 2.05751 1.00 7.00
= ugly, 7 = dishy)
attractiveness of Picard
10 3.7000 1.15950 2.00 5.00
(1 = ugly, 7 = dishy)

Test Statisticsb

attractiveness
of Picard (1 =
ugly, 7 =
dishy) -
attractiveness
of Kirk (1 =
ugly, 7 =
dishy)
Z -.120a
Asymp. Sig. (2-tailed) .905
a. Based on negative ranks.
b. Wilcoxon Signed Ranks Test

Interpretation: there is no significant difference between


the attractiveness ratings for Kirk and those for Picard
(Wilcoxon test, z = -0.12, p = .91, two-tailed test).

Who imagine spiders to be bigger: spider- or bunny-phobics?

Group Statistics

Std. Error
phobic condition N Mean Std. Deviation Mean
imagined size of spider-phobic 9 24.5556 9.40892 3.13631
spiders (mm) bunny phobic 9 26.0000 9.59166 3.19722

Interpretation: there is no significant


difference between spider phobics and
bunny phobics in terms of how big they
imagine spiders to be (independent-
measures t (16) = -0.32, p = .75, two-tailed
test).

Independent Samples Test

Levene's Test for


Equality of Variances t-test for Equality of Means
95% Confidence
Interval of the
Mean Std. Error Difference
F Sig. t df Sig. (2-tailed) Difference Difference Lower Upper
imagined size of Equal variances
.010 .920 -.323 16 .751 -1.4444 4.47869 -10.93884 8.04995
spiders (mm) assumed
Equal variances
-.323 15.994 .751 -1.4444 4.47869 -10.93912 8.05023
not assumed

11
Effects of brush type on lavatory-cleaner job satisfaction:

Ranks

BRUSH N Mean Rank Sum of Ranks


SATISFAC short 8 6.38 51.00
long 8 10.63 85.00
Total 16

Test Statisticsb Short brush: median =


2.50, range = 4.00
SATISFAC
Mann-Whitney U 15.000 Long brush: median =
Wilcoxon W 51.000
4.00, range = 4.00
Z -1.816
Asymp. Sig. (2-tailed) .069
Exact Sig. [2*(1-tailed a
.083
Sig.)]
a. Not corrected for ties.
b. Grouping Variable: BRUSH

Interpretation: Length of brush does not have a significant effect


on job satisfaction (Mann-Whitney U (N1= 8, N2 = 8) = 15.00, p =
0.08, two-tailed test) : people who use long brushes are no more
satisfied than people who use short ones.

12

Вам также может понравиться