Professional Documents
Culture Documents
Chapter - 16: Categorical Data Field (2005)
Chapter - 16: Categorical Data Field (2005)
Categorical data
Field (2005)
What are categorical variables?
2 Variables
Training: reward through food or affection
deviation = (observed-model)2
'observed' = frequencies of data
= (observedij-modelij)
2 2
'model' = expected frequencies
Modelij
Calculating expected values
How many cats do we expect to be there in each
of the 4 cells?
Training Training
Food Affection Food Affection
Could They Could They
Dance? Yes 14,44 61,56 Dance? Yes 28 48
No 23,56 100,44 No 10 114
2 = (28-14.44)2/14.44 + (10-23.56)2/23.56
+ (48-61.56)2/61.56 + (48-61.56)2/n
= 23.35
Expected frequencies The Likelihood ratio Observed frequencies
Training Training
Food Affection Food Affection
Could They Could They
Dance? Yes 14,44 61,56 Dance? Yes 28 48
No 23,56 100,44 No 10 114
= (13.56-.5)2/14.44 + (13.56-.5)2/23.56
+ (13.56-.5)2/61.56 + (13.56-.5)2/100.44
df = (2-1)(2-1) = 1
Finally, click OK
In total, 38% of the cats (76) danced.
Of these, 36.8% (28) were trained with Output of Crosstabs
food and 63.2% (48) with affection.
62% of the cats did NOT dance.8.1%
(10) of them were trained with food
and 91.9% (114) with affection.
19,0%
162,0
81,0%
200,0
100,0%
used cats would dance
Did they dance?
% within TRAINING
100,0% 100,0% 100,0%
but when affection was
Type of Training
% of Total 19,0% 81,0% 100,0% used they would not.
http://www.cyber-
Checking the assumptions
DANCE Did they dance? * TRAINING Type of Training Crosstabulation
All frequencies
TRAINING Type of Training
,00 Food 1,00 Affection
should be >5.
as Reward as Reward Total
DANCE Did ,00 Yes Count 28 48 76
they dance?
In the row
Expected Count 14,4 61,6 76,0
% within DANCE
36,8% 63,2% 100,0%
Did they dance?
% within TRAINING
Type of Training
73,7% 29,6% 38,0% 'Expected counts'
1,00 No
% of Total
Count
14,0% 24,0% 38,0%
we see that the
smallest count is
10 114 124
Expected Count 23,6 100,4 124,0
Value df
Asymp. Sig.
(2-sided)
Exact Sig.
(2-sided)
Exact Sig.
(1-sided)
2 is *!
Pearson Chi-Square 25,356 b 1 ,000
Continuity Correctiona 23,520 1 ,000 Yates' correction
Likelihood Ratio 24,932 1 ,000
Fisher's Exact Test ,000 ,000
Linear-by-Linear
25,229 1 ,000
Association
N of Valid Cases 200
a. Computed only for a 2x2 table
Interpretation:
b. 0 cells (,0%) have expected count less than 5. The minimum expected count is
14,44.
The pattern of responses in the two
training conditions is * different:
Assumption of Cats dance for food (74%) but not for love (26%)
2 test is fulfilled When they are trained with affection, only 30%
dance but 70% don't.)
Additional statistics
Symmetric Measures
Phi: valid only for 2x2 tables
Value Approx. Sig. Cramer's V: when variables have
Nominal by Phi ,356 ,000 >2 categories. Cramer's V is
Nominal Cramer's V ,356 ,000
already an adequate effect size.
Contingency Coefficient ,335 ,000
N of Valid Cases
Contingency coefficient: ensures
200
a. Not assuming the null hypothesis.
a value between 0 and 1.
b. Using the asymptotic standard error assuming the null
hypothesis.
= 28/10 = 2.8
= 48/114 = 0.421
Calculating effect sizes - the odds ratio
Odds ratio:
(Field, 2005_694)
http://i57.photobucket.com/albums/g231/adresaklumea/funny-cats/dance-
cat.jpg