Sei sulla pagina 1di 7

International University IU

TA [SWC]
S
t
a
t
i
s
t
i
c
s

f
o
r

B
u
s
i
n
e
s
s

|

C
h
a
p
t
e
r

1
4
:

C
h
i

-

S
q
u
a
r
e

T
e
s
t
s

1

STATISTICS FOR BUSINESS
CHAPTER 14
CHI - SQUARE TESTS

CHI SQUARE TESTING PROCESS
STEP 01: Determine the null and alternative hypotheses
STEP 02: Determine the expected counts and observed counts of data points in
different cells.
STEP 03: Compute the test statistic value (based on the difference between the
observed and the expected; Hint: Establishing a table) and the critical value
(based on the level of significance and chi square distribution).
STEP 04: Compare the test statistic value with the critical value and make a decision.

PART I
A CHI SQUARE TEST FOR GOODNESS OF FIT

CHI-SQUARE TESTING PROCESS
STEP 01: Determine the null and alternative hypotheses
E
0
: The probabilities of occurrence of events E
1
, E
2
,,E
k
are given by
the specified probabilities p
1
,p
2
,,p
k

E
1
: The probabilities of the k events not the p

stated in the null


hypothesis

International University IU

TA [SWC]
S
t
a
t
i
s
t
i
c
s

f
o
r

B
u
s
i
n
e
s
s

|

C
h
a
p
t
e
r

1
4
:

C
h
i

-

S
q
u
a
r
e

T
e
s
t
s

2

STEP 02: Determine the observed counts and the expected counts (E

=np

) of data
points in different cells.
STEP 03: Compute the test statistic value and the critical value
The test statistic value (based on the difference between the observed and
the expected):
X
Text
2
=
(O
|
F
|
)
2
F
|
k
|=1

Hint: Establishing a table
The critical value (based on the level of significance (o)):
X
Cr|t|ca|
2
=X
u,k-1
2

STEP 04: Compare the test statistic value with the critical value and make a decision.

Sample
PROBLEM
In a biology laboratory the mating of two red-eyed fruit flies yielded n = 576 offspring,
among which 338 were red-eyed, 102 were brown-eyed, 112 were scarlet-eyed, and 24
were white-eyed. Use these data to test, with o = 0.05, the hypothesis that the ratio
among the offspring would be 9:3: 3:1, respectively.
SOLUTION
k =4, J =k 1 =41 =3
Let E
R
be the event that off-springs are red-eyed.
E
B
be the event that off-springs are brown-eyed.
E
S
be the event that off-springs are scarlet-eyed.
E
w
be the event that off-springs are white-eyed.
International University IU

TA [SWC]
S
t
a
t
i
s
t
i
c
s

f
o
r

B
u
s
i
n
e
s
s

|

C
h
a
p
t
e
r

1
4
:

C
h
i

-

S
q
u
a
r
e

T
e
s
t
s

3

E
0
: The four off-springs are equally preferred; that is, the probabilities of choosing any of
the off-springs are equal 9:3:3: 1
E
1
: Not all four off-springs are equally preferred; that is, the probabilities of choosing any of
the off-springs are not equal 9: 3:3:1
9: 3:3:1 =
9
16
:
3
16
:
3
16
:
1
16


E
R
=np
1
=576
9
16
=324 E
S
=np
3
=576
3
16
=108
E
B
=np
2
=576
3
16
=108 E
w
=np
4
=576
1
16
=36

TABLE: Observed Counts (with the expected counts shown in parentheses)
Red-eyed Brown-eyed Scarlet-eyed White-eyed
(R) (B) (S) (w)
338 102 112 24
(324) (108) (108) (36)

TABLE: Computing the Value of the Chi-Square Statistic
Ccll 0

(0

)
2
(0

)
2
/ E


Red-eyed (R) 338 324 14 196 0.60
Brown-eyed (R) 102 108 -6 36 0.33
Scarlet-eyed (S) 112 108 4 16 0.15
White-eyed (w) 24 36 -12 144 4.00
Total 5.09

The test statistic value: The critical value for o =0.05:
X
1cst
2
=
(0

)
2
E

=
k
=1
5.09 X
CtcuI
2
=X
3,0.05
2
=7.815

Thus, at 0.05 level of significance, we cannot reject E
0
because X
1cst
2
<X
CtcuI
2
(5.086 <
7.815) that means the ratio among the offspring would be 9:3:3:1.
International University IU

TA [SWC]
S
t
a
t
i
s
t
i
c
s

f
o
r

B
u
s
i
n
e
s
s

|

C
h
a
p
t
e
r

1
4
:

C
h
i

-

S
q
u
a
r
e

T
e
s
t
s

4

PART II
A CHI SQUARE TEST FOR INDEPENDENCE

CHI-SQUARE TESTING PROCESS
STEP 01: Determine the null and alternative hypotheses
E
0
: The two classification variables are independent of each other
E
1
: The two classification variables are not independent
STEP 02: Determine the observed counts and the expected counts (E

=np

) of data
points in different cells.
STEP 03: Compute the test statistic value and the critical value
The test statistic value (based on the difference between the observed and
the expected):
X
Text
2
=(D
t|
E
t|
)
2
/ E
t|

|=1
r
t=1

Hint: Establishing a table
The critical value (based on the level of significance (o)):
X
Cr|t|ca|
2
=X
(u,[(r-1)(c-1)])
2

STEP 04: Compare the test statistic value with the critical value and make a decision.





International University IU

TA [SWC]
S
t
a
t
i
s
t
i
c
s

f
o
r

B
u
s
i
n
e
s
s

|

C
h
a
p
t
e
r

1
4
:

C
h
i

-

S
q
u
a
r
e

T
e
s
t
s

5

Sample
PROBLEM
A marketing firm wants to test the dependence between the regions of Vietnam (Northern,
Centre, Southern) and the habit of spending money (<50%, 50-80% and >80% income). They
conducted a survey to 2,000 people in Vietnam:

Regions
Northern Center Southern
Habit of
Spending
<50% income 203 290 155
50-80% income 266 226 215
>80% income 209 154 282

Conduct the test that the habits are independent to region, using a level of significance of 5%.

SOLUTION
H
0
: The regions of Vietnam and the habit of spending money are independent of each
other.
H
1
: The regions of Vietnam and the habit of spending money are not independent.
Table: Contingency Table of the regions of Vietnam versus the habit of spending money
Observed Counts (with the expected counts shown in parentheses).

Regions Total
Northern Center Southern (row)
Habit of
Spending
<50%
Income
203 290 155 648
(219.67) (217.08) (211.25)

50 - 80%
Income
266 226 215 707
(239.67) (236.85) (230.48)

International University IU

TA [SWC]
S
t
a
t
i
s
t
i
c
s

f
o
r

B
u
s
i
n
e
s
s

|

C
h
a
p
t
e
r

1
4
:

C
h
i

-

S
q
u
a
r
e

T
e
s
t
s

6

>80%
Income
209 154 282 645
(218.66) (216.08) (210.27)

Total (column) 678 670 652 2,000

Table: Computing of Value of the Chi Square Statistic
Habit of
Spending
Regions O
Ij
E
Ij
O
Ij
E
Ij

(O
Ij
E
Ij
)
2
(O
Ij
E
Ij
)
2
/ E
Ij

<50%
Income
Northern 203 219.67 -16.67 277.89 1.27
Center 290 217.08 72.92 5,317.33 24.49
Southern 155 211.25 -56.25 3,164.06 14.98
50 - 80%
Income
Northern 266 239.67 26.33 693.27 2.89
Center 226 236.85 -10.85 117.72 0.50
Southern 215 230.48 -15.48 239.63 1.04
>80%
Income
Northern 209 218.66 -9.66 93.32 0.43
Center 154 216.08 -62.08 3,853.93 17.84
Southern 282 210.27 71.73 5,145.19 24.47
Total (column) 2,000 2,000

87.90

The chi square test statistic value for independence is
X
T
2
=(O
Ij
E
Ij
)
2
/ E
Ij
c
j=1
r
I=1
=87.90

International University IU

TA [SWC]
S
t
a
t
i
s
t
i
c
s

f
o
r

B
u
s
i
n
e
s
s

|

C
h
a
p
t
e
r

1
4
:

C
h
i

-

S
q
u
a
r
e

T
e
s
t
s

7

Thus the test statistic value is too large (X
T
2
=87.90), we can strongly reject H
0
at all level
of significance. It means that based on the Chi Square testing for independence, we have
enough evidence to prove that the regions of Vietnam and the habit of spending money are
independent of each other.

Potrebbero piacerti anche