Wiki Page, Math 13 - Perez Sandbox : ANSWER(S): Module 27 - Chi-Square Test of Independence (2b of 3 discussion 1)

Wiki Page
2026-01-17T21:14:51-08:00

1. A test of independence may be appropriate if we are examining the relationship between two categorical variables in one population. For this situation what is the population? What is the explanatory variable? What is the response variable?

The population is Oklahoma drivers under the age of 21. The explanatory variable is Gender (male/female) and the response variable is “drank alcohol in previous two hours” (yes/no). These are both categorical variables. So we may be able to use this data to conduct a test of independence. (Of course, the data must meet the conditions that allow the use of the chi-square distribution.)

2. What are the hypotheses for the Test of Independence?

The null hypothesis says that gender is not associated with drinking alcohol before driving. (The variables are independent.) The alternative hypothesis says that gender is associated with drinking alcohol before driving. (The variables are dependent.)

3. Use StatCrunch to find expected counts, the Chi-square test statistic and the P-value.
Copy and paste your StatCrunch table into your post.

Rows: Gender
Columns: None

Cell format

Count
(Expected count)

Contingency table results:

| Alcohol Yes | Alcohol No | Total

Male

77
(72.27)

404
(408.73)

481

Female

16
(20.73)

122
(117.27)

138

Total | 93 | 526 | 619

Chi-Square test:

Statistic | DF | Value | P-value
Chi-square | 1 | 1.6365642 | 0.2008

4. How many males in the sample are expected to answer yes to question about alcohol consumption in the last two hours? Show how to calculate this expected count and explain what it means relative to the hypotheses.

We can see in the contingency table that the expected count for males is 72.27.

Here is the calculation:
The percentage drinking alcohol before driving is about 15% (93/619=0.1502). If the null hypothesis is true, then the same percentage of males will report drinking before driving. There are 481 males. 15% of 481 is about 72.15, which differs slightly from the expected value calculated by StatCrunch. This is due to rounding. (To avoid rounding, calculate all in one step (93/619)*481=72.266.)

What does this mean?
The expected count is the number of males that we expect to report drinking before driving if there is no relationship between gender and reported drinking prior to driving (i.e. the null hypothesis is true.

5. Explain how we know that this data meets the conditions for use of a chi-square distribution.

There are two conditions for use of the chi-square distribution:

The sample is randomly selected.

Expected counts are 5 or greater.

Both conditions are met for this data set. In the introduction we are told that the data comes from a “random roadside survey.” The smallest expected count is 20.73.

6. State a conclusion at a 5% level of significance. Do you think that the data supports the Oklahoma law that forbids sale of 3.2% beer to males and permits it to females?

We fail to reject the null hypothesis (P-value 0.20 is greater than the significance level of 0.05). The differences between observed and expected counts in the sample are not statistically significant. There is not enough evidence to support the claim that gender is related to alcohol consumption prior to driving. Therefore, the data does not support the argument that a law that forbids sale of 3.2% beer to males, and permits it to females, improves traffic safety.

An interesting historical note:

The Supreme Court, by a 7-2 majority, struck down the Oklahoma law as discriminatory and unjustified. In the majority opinion Justice Brennan wrote, "Clearly, the protection of public health and safety represents an important function of state and local governments. However, appellees' statistics in our view cannot support the conclusion that the gender-based distinction closely serves to achieve that objective and therefore the distinction cannot under [prior case law] withstand equal protection challenge."(Decision in Craig et al. v. Boren)