138 Chapter 6
Exercise and Answer
Exercise
Company X runs a casual dining restaurant. Its financial status was declining recently.
Thus, Company X decided to study its customers’ needs and conducted a survey of
randomly chosen people, age 20 or older, residing in Japan. The table below shows the
results of this survey.
Below is a cross tabulation made using the table above.
Calculate the Cramers coefficient for the food often ordered in casual dining
restaurants and the preferred free drink of either coffee or tea.
What food do you
often have in a casual
dining restaurant?
Chinese
European
Japanese
...
If a free drink is to be
served after a meal,
which would you
prefer? Coffee or tea?
Coffee
Coffee
Tea
...
1
2
250
...
Respondent
Type of food
often ordered
Sum
Japanese
European
Chinese
Preference for coffee or tea
Coffee
43
51
29
123
Tea
33
53
41
127
Sum
76
104
70
250
Let's Lk at the Relationship betwn Two Variables 139
Answer
Step 1
Prepare a cross tabulation.
Step 2
Calculate the expected frequency.
Type of food
often ordered
Sum
Japanese
European
Chinese
Preference for coffee or tea
Coffee
43
51
29
123
Tea
33
53
41
127
Sum
76
104
70
250
Type of food
often ordered
Sum
Japanese
European
Chinese
Preference for coffee or tea
Coffee
123
Tea
127
Sum
76
104
70
250
76 × 123
250
104 × 123
250
104 × 127
250
76 × 127
250
70 × 123
250
70 × 127
250
140 Chapter 6
Step 3
Calculate
for each square.
(actual measurement frequency − expected frequency)²
expected frequency
Type of food
often ordered
Sum
Japanese
European
Chinese
Preference for coffee or tea
Coffee
123
Tea
127
Sum
76
104
70
250
76 × 123
250
43 −
²
76 × 123
250
76 × 127
250
33 −
²
76 × 127
250
104 × 123
250
51 −
²
104 × 123
250
104 × 127
250
53 −
²
104 × 127
250
70 × 123
250
29 −
²
70 × 123
250
70 × 127
250
41 −
²
70 × 127
250
Let's Lk at the Relationship betwn Two Variables 141
Step 4
Calculate the sum of the value inside the bold frame in the table in step 3, which is
the value of Pearson’s chi-square test statistic (χ
0
2
).
Step 5
Calculate the Cramers coefficient.
76 × 123
250
43 −
²
76 × 123
250
76 × 127
250
33 −
²
76 × 127
250
+
104 × 123
250
51 −
²
104 × 123
250
104 × 127
250
53 −
²
104 × 127
250
+ +
70 × 123
250
29 −
²
70 × 123
250
70 × 127
250
41 −
²
70 × 127
250
+ +
= 3.3483
χ
0
² =
χ
0
²
the total
number of values
the number of lines
in the cross tabulation
the number of rows
in the cross tabulation
× (min
{
,
}
− 1)
250 × (min{3,2} − 1)
3.3483
=
250 × (2 − 1)
3.3483
=
250
3.3483
= 0.1157

Get The Manga Guide to Statistics now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.