188 Chapter 7
Exercise and Answer
Exercise
The table below is the same as the cross tabulation found on page 138.
Using a chi-square test of independence, estimate if the Cramer’s coefficient for type of food often
ordered and preference for coffee or tea in the population “people of age 20 or older residing in Japan” is
greater than 0. This is the same as estimating whether there is a correlation between type of food often
ordered and preference for coffee or tea. Use 0.01 as the significance level.
Answer
Step 1
Define the population. The population in this case is “people of age 20 or older
residing in Japan.”
Step 2
Set up a null hypothesis and an
alternative hypothesis.
The null hypothesis is “type of food often ordered and
preference for coffee or tea are not correlated.” The
alternative hypothesis is “type of food often ordered and
preference for coffee or tea are correlated.”
Step 3
Choose which hypothesis test
to do.
A chi-square test of independence will be applied.
Step 4
Determine the significance level. The significance level is 0.01.
Step 5
Calculate the test statistic from the
sample data.
A chi-square test of independence is being used in this
exercise. Therefore, the test statistic is Pearson’s chi-
square test statistic (χ
0
2
). The value of χ
0
2
in this exercise
has already been calculated on page 141. χ
0
2
= 3.3483
Step 6
Determine whether the test
statistic obtained in step 5 is in the
critical region.
The test statistic χ
0
2
is 3.3483. Because the significance
level (a) is 0.01, the critical region is 9.2104 or above,
according to the table of chi-square distribution on
page 103. The test statistic is not within the critical
region.
Step 7
If the test statistic is in the criti-
cal region in step 6, reject the null
hypothesis. If not, fail to reject the
null hypothesis.
The test statistic was not within the critical region. Thus,
the null hypothesis “type of food often ordered and pref-
erence for coffee or tea are not correlated” cannot be
rejected.
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 Explore the Hypothesis Tests 189
Summary
A hypothesis test is an analysis technique used to estimate whether the analyst’s
hypothesis about the population is correct using the sample data.
The formal name for a hypothesis test is statistical hypothesis testing.
Test statistics are obtained from a function that calculates a single value from the
sample data.
In general, 0.05 or 0.01 is used as the significance level.
The critical region is an area that corresponds to the significance level (also called the
alpha value and expressed by the symbol a).
A chi-square test of independence is an analysis technique used to estimate whether
the Cramer’s coefficient for a population is 0. It can also be said that it is an analysis
technique used to estimate whether the two variables in a cross tabulation are cor-
related.
If the Cramer’s coefficient for a population is 0, Pearson’s chi-square test statistic fol-
lows a chi-square distribution.
The P-value in a test of independence is a probability that gives a Pearson’s chi-square
test statistic equal to or greater than the value earned in the case when the null
hypothesis is true.
When making a conclusion in a hypothesis test, there are two bases of judgment:
1. Whether the test statistic is in the critical region
2. Whether the P-value is smaller than the significance level
The process of analysis in any hypothesis test is the same as the process for the test of
independence or any other kind of test. The actual procedure is:
Step 1
Define the population.
Step 2
Set up a null hypothesis and an alternative hypothesis.
Step 3
Choose which hypothesis test to do.
Step 4
Determine the significance level.
Step 5
Calculate the value of the test statistic from the sample data.
Step 6
Determine whether the test statistic obtained in step 5 is in the critical
region.
Step 7
If the test statistic is in the critical region in step 6, reject the null
hypothesis. If not, fail to reject the null hypothesis.
Step 6p
Determine whether the P-value corresponding to the test statistic
obtained in step 5 is smaller than the significance level.
Step 7p
If the P-value is smaller than the significance level in step 6p, reject the
null hypothesis. If not, fail to reject the null hypothesis.
•
•
•
•
•
•
•
•
•
•
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.