7. chai square
TRANSCRIPT
-
7/27/2019 7. Chai Square
1/14
ASIF HANIF
Analysis with Chi-Square
-
7/27/2019 7. Chai Square
2/14
Pearsons Chi-Square: (2 X 2)
Chi-Square test is employed to determine if there
is an association between qualitative variables.
When the word association is used in the
statistical sense, a comparison is implied. For a 2X 2 table chi-square statistic is calculated as:
2
2 n ad bca b c d a c b d
-
7/27/2019 7. Chai Square
3/14
Example
The following represent mortality data for twogroups of patients receiving different
treatments, A and B.
Outcome
Dead Alive
Treatment A 41 216
B 64 180
-
7/27/2019 7. Chai Square
4/14
Example
Classification Men Women Total
Want T.V 80 120 200
Dont Want T.V 170 130 300
Total 250 250 500
A random sample of 250 men and 250 womenwere pooled as to their desire concerning theownership of television sets. The following data
results
-
7/27/2019 7. Chai Square
5/14
Formation of Hypothesis
Ho: The two variables of classification are
independentH1: The two variables of classification arenot independent
Level of Significance
= 0.05Decision
P-Value = .0000
Hence P- Value is less than , so we reject Ho andwe may conclude that variables of classificationdepends upon each other.
-
7/27/2019 7. Chai Square
6/14
Example
The following data (as above) describe the state of grief of 66
mothers who had suffered a neonatal death. The table relates this to
the amount of support given to these women:
SupportGood Adequate Poor
Grief State
I 17 9 8
II6 5 1
III 3 5 4
IV 1 2 5
-
7/27/2019 7. Chai Square
7/14
Fishers Exact Test:
When expected count is less than 5 we use
this techniques
1 2 1 2! ! ! !
'! ! ! ! !
R R C CFisher s Exact Test
n a b c d
-
7/27/2019 7. Chai Square
8/14
Example
The following data relate to suicidal feelings in
samples of psychotic and neurotic patients:
Psychotics Neurotics Total
Suicidal feelings 2 6 8
No suicidal feelings
18
14
32
Total 20 20 40
-
7/27/2019 7. Chai Square
9/14
Example
The following data compare malocclusion of teethwith method of feeding infants.
Normal teeth Malocclusion
Breast fed 4 16 =20
Bottle fed 15
21 = 2237 = 42
-
7/27/2019 7. Chai Square
10/14
Pearsons Chi-Square: (RXC)
For a R x C table the Chi-Square Statistics can
be calculated as:
And Yates Corrected Chi-Square for R X C
contingency table can be calculated as:
2
2 ij ij
i j ij
O E
E
2
20.5ij ij
ij
O E
E
-
7/27/2019 7. Chai Square
11/14
Co-efficient of Contingency
Contingency coefficient. A measure of association based
on chi-square. The value ranges between zero and 1,
with zero indicating no association between the row and
column variables and values close to 1 indicating a highdegree of association between the variables.
2
2C n
-
7/27/2019 7. Chai Square
12/14
Phi & Cramers V
The Phi coefficient is a degree of association
between two attributes and is calculated as:
2
ad bcPhina b c d a c b d
-
7/27/2019 7. Chai Square
13/14
Kendalls Tau b
Kendall's tau-b: This test is used to measure strength ofcorrelation when we have ordinal data. The sign of thecoefficient indicates the direction of the relationship, and itsabsolute value indicates the strength, with larger absolutevalues indicating stronger relationships. Possible valuesrange from -1 to 1, but a value of -1 or +1 can only beobtained from square tables.
Where S=P-Q P=Concordant pairs of observation Q=Discordant pairs of observation
m=min(r,c)
0 0b
S
P Q X P Q Y
-
7/27/2019 7. Chai Square
14/14
Example An animal epidemiologist tested dairy cows for the presence of a
bacterial disease. The disease is detected by the analysis of
blood samples, and the disease severity for each animal was
classified as None (1), Low (2) and High (2). Moreover, the size
of the herd that each cow belongs to a category is classified as
Large (3), Medium (2) and Small (1). The number of animals ineach of the 9 cells are recorded as:
Size of theherd
None (1) Low (2) High (3) Total
Small (1)9 5 9 23
Medium (2) 18 4 19 41
Large (3) 11 88 136 235
Total 38 97 164 299