Use of Statistics in Our Daily Life: Chapter 10 Relationships Between Categorical Variables

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Use of Statistics in Our Daily Life Two-way Tables

„ A two-way table shows the relationship between two


Chapter 10 Relationships between
variables by listing one variable in the rows and the
Categorical Variables other variable in the columns. The entries in the
(p.417-p.428) table’s cells are called frequencies (or counts)

Goal:
Interpret and carry out hypothesis tests for
independence of variables with data organized in
two-way tables

1 2

Example 1 A Two-Way Table for a Finding the Frequencies Expected


Survey (p 419) by Chance
„ Table 10.4 shows the results of pre-election survey „ In a two-way table, the expected frequencies are the
on gun control. Use the table to answer the frequencies we would expect by chance if there were no
following questions relationship between the row and column variables. The
‰ Identify the two variables displayed in the table expected frequency in any cell is calculated in two steps:
1. Calculate the probability for the cell under the assumption of
‰ What percentage of Democrats favored stricter laws?
independence (no relationship) between the variables. That is,
‰ What percentage of voters favored stricter laws? multiply row total × column total
‰ What percentage of those who opposed stricter laws are grand total grand total
Republicans? 2. Multiply the probability from step 1 by the total number of
subjects (the grand total) to get the expected frequency. If the
expected frequencies differ significantly from the observed
frequencies, then we have evidence to reject the assumption of
no relationship

3 4
Example 2 Expected Frequencies for Identifying the Hypotheses for Two-
Biology and Business Degrees Way Tables
„ Find the frequencies expected by chance for all „ The null hypothesis, H0, states that the
cells in Table 10.3. Then, construct a table variables in the table are independent (there
showing both observed frequencies and
is no relationship between them).
frequencies expected by chance
„ The alternative hypothesis, Ha, states that
there is a relationship between the two
variables in the table.

5 6

Hypothesis Testing with Two-Way Hypothesis Testing with Two-Way


Tables Tables
1. Assume the null hypothesis is true; that is, there is no
Tests of significance depend on three factors:
relationship between the two variables in the table.
Determine the frequencies that we would expect by ‰ The size of the differences between the observed
chance under this assumption. frequencies and the expected frequencies
2. Compare the observed frequencies to the expected ‰ The size of the sample
frequencies. ‰ The level of significance
3. If the observed frequencies are significantly different
from the expected frequencies, reject the null hypothesis
and conclude that there is a relationship between the
two variables. Otherwise, continue to assume that the
null hypothesis is true.
7 8
Example – Gender & Major (p 422) Example – Gender & Major (p 422)
„ Finding the Chi-Square Statistic
H0: Within the population, there is no relationship between 1. For each cell in the two-way table, identify O as the
gender and major; the proportions of degrees earned by observed frequency and find the value of E, the
men and women in business and biology are what we expected frequency.(O − E ) 2
would expect by chance. Gender and major are 2. Compute the value for each cell.
E
independent of each other. 3. Sum the values from step 2 to get the chi-square
statistic; that is, χ 2 = sum of all values of (O − E )
2
Ha: Within the population, there is some relationship
E
between gender and major; the proportions of degrees
earned by men and women in business and biology are
not what we would expect by chance.

Problem: How to measure the differences between the „ The larger the χ , the greater the average difference
2

observed frequencies and those expected by chance? between observed and expected frequency in the cells
9 10

Example – Gender & Major (p 422) Example 5 Vitamin C Test (p 424)


„ Making the Decision „ A study seeks to determine whether vitamin C has an
If the calculated value of χ is less than the critical value, the effect in preventing colds. Among a sample of 220
2
‰

differences between the observed and expected values are people, 105 randomly selected people took a vitamin C
small and there is not enough evidence to reject the null pill daily for a period of 10 weeks and the remaining 115
hypothesis at the given level of significance people took a placebo daily for 10 weeks. At the end of
If the calculated value of χ is greater than or equal to the
2
‰
10 weeks, the number of people who got colds was
critical value, then there is enough evidence to reject the null
recorded. Determine whether there is a relationship
hypothesis at the given level of significance
between taking vitamin C and getting colds at 0.01 level.

11 12
Example 6 To Plead or Not to Plead
(p 425)
„ The two-way table in Table 10.11 shows how a plea of
guilty or not guilty affected the sentence in 1028
randomly selected burglary cases in the San Francisco
area. Test the claim that the sentence (prison or no
prison) is independent of the plea at 0.01 level.

13

You might also like