You are on page 1of 7

SPSS: Chi Squared Tests

So, lets say you count some (1851) plain M Ms, and heres !hat you "ind# $lso, notice that the in"ormation "rom the M M%Mars Corp# is that &'( o" plain M Ms are )ro!n, *'( each yello! and red, and 1'( each o" )lue, oran+e, and +reen# ,n -.cel, it is not too hard to type in the "ormulas "or the Chi/ Squared tests, )ut you can also do it in SPSS# 0irst, !e need to enter our data into SPSS# 1otice that , la)eled the columns, and ar)itrarily assi+ned num)ers to the colors (, could2e used any num)ers, )ut +oin+ in order ma3es the most sense)# , also typed in the 2alue la)els on the 2aria)le 2ie! screen (so, 14)ro!n, *4yello!, etc# on any printouts)# 5o!e2er, SPSS typically thin3s o" each ro! as an indi2idual# There"ore, i" !e ran our analysis no!, it !ould thin3 !e had 6 M Ms, not 1851# To run our test the 7normal8 !ay, !e !ould need to enter 1851 ro!s o" data9 To +et around this, !e use a command called :ei+ht Cases# :ei+ht Cases This "eature is a !ay o" tellin+ SPSS to pretend that a sin+le ro! o" data is, in "act, a !hole )unch o" ro!s# ,n our "irst ro!, !e !ant to tell SPSS that !e ha2e 51; )ro!n M Ms# So, loo3 "or the menu item: <ata: :ei+ht Cases :hen you do, you +et this pop/up !indo!:
The <e"ault settin+ is 7<o not !ei+ht cases8

Puttin+ a =aria)le in here means, 7Consider each ro! to really mean this many ro!s#8

1o!, SPSS !ill pretend that the 2aria)le 7color8 has 51; ro!s !ith a 71,8 &6> !ith a *, etc#

This !ill )e in the )ottom ri+ht corner o" your screen, i" you did it ri+ht#

?ou can then do the Chi/Square (or any) test li3e you !ould2e )e"ore# -.cept no!, the si. ro!s !ill act li3e it is 1851 ro!s#

Pa+e 1 o" >

SPSS: Chi Squared Tests


Chi/Squared Test o" @oodness o" 0it So, our 1ull 5ypothesis !ill )e that the pro)a)ilities +i2en to us )y the corporation are correct: 5': Plain M Ms are &'( )ro!n, *'( each yello! and red, and 1'( each )lue, oran+e, and +reen# 51: Plain M Ms ha2e a di""erent distri)ution than that# This is not a 2ery speci"ic 5ypothesis# ,n particular, notice that i" you reAect the null hypothesis, you ha2e no idea !hat distri)ution you do ha2e (e.cept that it isnt the one listed in 5 ')# 1o!, you clic3 on $nalyBe: 1on/Parametric: Chi/Square 1o!, your test 2aria)le is color# Ce sure to 1DT use Count (that !ould )e sayin+ that you had 51; M MS o" type 51; E Dops)# Then, you need to enter in your e.pect 2alues# This is actually easier than -.cel, )ecause you only need the pro)a)ilities, not the computed e.pected 2alues# So, clic3 on the radio )utton "or -.pected =alues: =alues# Then, enter in your si. relati2e pro)a)ilities "rom the null hypothesis, clic3in+ on $dd a"ter you type each one# :hen "inished it should loo3 li3e this:
Color is our Test =aria)le

These correspond to our 5' pro)a)ilities# ?ou can lea2e out the decimal, or include it#

Clic3 DF, and you +et the "ollo!in+ output:


COLOR Test Statistics Chi-Square a df Asy mp. Sig. COLOR 8.063 5 .153 brown y ellow red blue orange green Total Observ ed N 519 364 363 !! 1 193 1"51 #$%ected N 555&3 3'!& 3'!& 1"5&1 1"5&1 1"5&1 Residual (36&3 (6& ('& 14&9 6&9 '&9

a. 0 cells .0!" ha# e e$pec%ed f reque&cies less %ha& 5. 'he mi&imum e$pec%ed cell f reque&cy is 185.1.

Since the p/2alue is not less than #'5, !e "ail to reAect# Dur M Ms do "ollo! the distri)ution !e speci"ied# 1otice that it +i2es the sum, the de+rees o" "reedom, and it also has a little "ootnote a)out the assumptions you made#

Pa+e * o" >

SPSS: Chi Squared Tests


Crossta)s and the Chi/Squared Test o" ,ndependence The other Chi/squared test deals !ith t!o cate+orical 2aria)les# The hypotheses are: 5': 5ometo!n and @ender are independent# 51: 5ometo!n and @ender are related# 1otice these are also not 2ery speci"ic hypotheses Gets say !e ha2e the "ollo!in+ data, detailin+ the +ender and hometo!n o" a +roup o" students: Dther StG FC Hr)an Iural Sum M*5*&111>J& 0>1*'18685 Sum66>&*;*'158 To enter it into SPSS, you ha2e to really s!itch it around# ,t should loo3 li3e this# ?ou can see that, rather than loo3in+ li3e a t!o/!ay ta)le, it +i2es a 2aria)le description o" each cell# $+ain, you mi+ht !ant to +o into the 2aria)le 2ie!, so you can la)el the 2alues o" each 2aria)le (0or +ender, ma3e 14 male and * 4 "emaleK "or hometo!n, 14St# Gouis, * 4 Fansas City, &4Dther Hr)an, and >4Iural)# $+ain, youll !ant to :ei+ht Cases, this time, )y 7people#8 The Command youll !ant "or this 3ind o" Chi/Square is a little )it hidden, so +o to the menu "or: $nalyBe: <escripti2e Statistics: Crossta)s

The purpose o" Crossta)s is to ma3e a t!o/!ay contin+ency ta)le out o" )i+ hun3s o" data# ?ou could ima+ine that i" you hadnt !ei+hted cases, )ut entered the data in the lon+ !ay, youd li3e to +et such a t!o/!ay ta)le# To +et these, put your data in ho! youd li3e it in the chart, li3e this:

@ender and hometo!n are the t!o 2aria)les to e.amine# They can +o either place#

Clic3in+ on this is !here you !ill "ind Chi/Square

Pa+e & o" >

SPSS: Chi Squared Tests


Dnce you clic3 on Statistics, you can chec3 the )o. "or Chi/Square# ,ts that easy#

)#N*#R + ,O-#TO.N Crosstabul ation C(u&% 1.00 )*+,*R '(%al 1.00 -.00 -5 .1 66 /O0*'O1+ -.003.00 -311 -018 .3-2 ..00 1. 6 -0 '(%al 33 85 158

C/i(S0uare Tests 4alue 8.113a 8.-13 3.636 158 a. 0 cells .0!" ha# e e$pec%ed c(u&% less %ha& 5. 'he mi&imum e$pec%ed c(u&% is 2.-.. df 3 3 1 Asy mp. Sig. --sided" .0.. .0..053

5ears(& Chi-Square Li6elih((d Ra%i( Li&ear-7y -Li&ear Ass(cia%i(& + (f 4alid Cases

?ou +et output that loo3s li3e this:


This loo3s li3e your ori+inal data chart#

5ere is the p/2alue#

Since the p/2alue is less than #'5 ()arely), !e can reAect the null hypothesis, and say that +ender and hometo!n are related#

Pa+e > o" >

You might also like