Agriculture Reference
In-Depth Information
Table 9.3
“
r s
” contingency table
B
A
A
B
B
...
B
j
...
B
s
Total
1
2
(
A
B
1
)
(
A
B
2
)
(
A
B
j
)
(
A
B
s
)
(
A
1
)
1
1
1
1
1
A
(
A
B
1
)
(
A
B
2
)
(
A
B
j
)
(
A
B
s
)
(
A
2
)
2
2
2
2
2
...
A
i
(
A
i
B
1
)
(
A
i
B
2
)
(
A
i
B
j
)
(
A
i
B
s
)
(
A
i
)
...
A
r
(
A
r
B
1
)
(
A
r
B
2
)
(
A
r
B
j
)
(
A
r
B
s
)
(
A
r
)
Total
(
B
1
)
(
B
2
)
(
B
j
)
(
B
s
)
N
s
B
s
). The various cell
frequencies are expressed according to the
following table format known as “
classes (
B
1
,
B
2
,
...
,
both the
attributes
A
i
and
B
j
with
P
i¼
1
ðA
i
Þ¼
P
j¼
1
ðB
j
Þ¼N
, where
N
is
r s
”
the total frequency.
1. Table
9.3
The problem is to test if the two
attributes
A
and
B
under consideration
are independent or not. Under the null
hypothesis
manifold contingency table where (
A
i
)is
the frequency of the individual units
possessing the attribute
A
i
,(
i ¼
1, 2, 3,
...
B
j
) is the frequency of the individ-
ual units possessing the attribute
r
,
), (
B
j
H
0
: The attributes are inde-
pendent, the theoretical cell frequen-
cies are calculated as follows:
(
A
i
B
j
) is the fre-
quency of the individual units possessing
j ¼
1, 2, 3,
...
,
s
), and (
A
i
¼
ðA
i
Þ
N
PA½¼
probability that an individual unit possesses the attribute
; i ¼
1
;
2
; ...; r;
PB
j
¼
B
j
¼
ðB
j
Þ
N
; j ¼
;
; ...; s:
probability that an individual unit possesses the attribute
1
2
Since the attributes
A
i
and
B
j
are inde-
pendent, under null hypothesis, using
the theorem of compound probability
(Chap.
6
), we get
¼
PA
i
B
j
probability that an individual unit possesses both the attributes
A
i
and
B
j
¼ PA½PB
j
¼
ðA
i
Þ
N
ðB
j
Þ
N
; i ¼
1
;
2
;
3
; ...; r; j ¼
1
;
2
;
3
; ...; s
and
e
¼
A
i
B
j
expected number of individual units possessing both the attributes
A
i
and
B
j
¼
ðA
i
ÞðB
j
Þ
N
¼ N: PA
i
B
j
e
¼
ðA
i
ÞðB
j
Þ
A
i
B
j
;
ð
i ¼
1
;
2
;
3
; ...; r; j ¼
1
;
2
;
3
; ...; s
Þ
N
By using this formula, we can find out
the expected frequencies for each of
the cell frequencies (
the null hypothesis of independence
of attributes. The approximate test
statistic for the test of independence
of attributes
A
i
B
j
)(
i ¼
1, 2,
3,
...
,
r
;
j ¼
1, 2, 3,
...
..,
s
), under
is derived from the