Risk

No:1
Chapter 6
Relationships
Between
Categorical
Variables
No:2
Content
1. Displaying relationships between Categorical
Variables
2. Risk, Relative Risk, Odds Ratio, and Increased
Risk
3. Misleading Statistics About Risk
4. The Effect of a Third Variable and Simpson’s
Paradox
5. Assessing the Statistical Significance of a 2*2
Table
No:3
Key Terms
•
•
•
•
•
•
•
•
•
•
•
•
Contingency table列联表
Two-way table二位表
Cell格子
Conditional percents条件百分比
Row percents行百分比
Column percents列百分比
Risk危险
Relative risk相对危险
Baseline risk底线危险
Percent increase in risk危险增加百分比
Odds 几率,
Odds ration 几率比
No:4
Key Terms
•
•
•
•
•
•
•
•
•
•
•
Simpson’s Paradox幸普森谬论
Statistically significant relationship统计上的显著关系
Statistical significance统计显著性
null hypothesis原假设
Alternative hypothesis备择假设
Chi-square statistic卡方统计值
Observed counts观察数
Expected counts预计数
P-value P值
Practical significance实际显著性
Nonsignificant results 非显著结果
No:5
Principal Question:
Is there a relationship between the
two variables, so that the category into
which individuals fall for one variable
seems to depend on the category they
are in for the other variable?
6.1 Displaying Relationships Between
Categorical Variables P172
No:6
• Displays are often called contingency table
because they cover all contingencies for
combination of the two variables. Because the
categories of two variables are used to create the
table, a contingence table is also referred to as a
two-way table. Each row and column
combination of the table is called a cell.
No:7
• First step is to count how many observations
fall into each cell of the contingency table.
• If one variable is explanatory, use it to define
the rows of the table.
• Two types of conditional percents: row
percents and column percents.
• Use row percents if the explanatory variable
is the row variable.
No:8
Example 6.1 Smoking and Divorce Risk p173
Data on smoking habits and divorce history for the
1669 respondents who had ever been married.
Among smokers, 49% have been divorced, 51% have not.
Among nonsmokers, only 32% have been divorced, 68% have not.
The difference between row percents indicates a relationship.
No:9
Example 6.2 Tattoos and Ear Pierces
Responses from n = 565 men to two questions:
1. Do you have a tattoo?
2. How many total ear pierces do you have?
No:10
• row percents
• Among men with no ear pierces, 43/424 = 10%
have a tattoo.
Among men with one ear pierce, 16/70 = 23%
have a tattoo.
Among men with two or more ear pierces, 26/71
= 37% have a tattoo.
• Column percents
43/85, 16/85, 26/85
No:11
Example 6.3 Gender and Reasons for Taking
Care of Your Body p174
1997 poll (random-digit dialing) of 1218 southern CA residents.
Question: What is the most important reason why you try to take
care of your body? Is it mostly to be attractive to others, mostly to
keep healthy, or mostly to help your self-confidence, or what?
No:12
Percent distribution of responses shown for men
and women. Pattern of responses is very similar.
Response does not seem to be related to gender.
6.2 Risk, Relative Risk, Odds
Ratio, and Increased Risk p175
No:13
• When a particular outcome is undesirable,
researcher may describe the risk of that outcome.
The risk that a randomly selected individual
within a group falls into the undesirable category
is simply the proportion in that category.
• It is commonplace to express risk as a percent
rather than as a proportion.
No:14
Number in category
Risk =
Total number in group
Example:
Within a group of 200 individuals,
asthma affects 24 people. In this group
the risk of asthma is 24/200 = 0.12 or 12%.
No:15
• We often want to know how the risk of an
outcome relates to an explanatory variable.
One statistic used for this purpose is
relative risk, which is the ratio of the risks
in two different categories of an
explanatory variable.
• Relative risk describes the risk in one group
as a multiple of the risk in another group.
No:16
Risk in category 1
Relative Risk =
Risk in category 2
Example:
For those who drive under the influence of
alcohol, the relative risk of an accident is 15. =>
The risk of an accident for those who drive
under the influence is 15 times the risk for
those who don’t drive under the influence.
• Relative risk = 1 => two risks are the same.
• Risk in denominator often the baseline risk.
Features:
No:17
• When two risks are the same, the relative risk is
1
• When two risks are different, the relative risk is
different from 1
• When the category in the numerator has higher
risk, the relative risk is greater than 1
• The risk in the denominator( the bottom) of the
ratio is often the baseline risk, which is the risk
for the category in which no additional treatment
or behavior is present.
No:18
Example 6.1
Smoking and
Divorce Risk (cont)
• For smokers:
risk of divorce = 238/485
= 0.491 or 49.1%.
• For nonsmokers:
risk of divorce = 374/1184
= 0.316 or 31.6%. the baseline
risk
49%
Relative Risk of divorce =
32%
= 1.53
In this sample, the risk of divorce for smokers is 1.53 times
the risk of divorce for nonsmokers.
No:19
p176
Percent increase in risk
Difference in risks
=
x 100%
Baseline risk
= (relative risk – 1) x 100%
Note:
When risk is smaller than baseline risk,
relative risk < 1 and the percent “increase”
will actually be negative,
so we say percent decrease in risk.
No:20
Example 6.1
Smoking and
Divorce Risk (cont)
Relative Risk of divorce for smokers = 1.53
Percent increase in risk of divorce for smokers
= (1.53 – 1) x 100% = 53%
Difference in risks
=
x 100% =
Baseline risk
= 53%
(49 – 32)
32
x 100%
The risk of divorce is 53% higher for smokers
than it is for nonsmokers.
No:21
Odds ratio
• Sometimes counts for the outcomes of a
categorical variable are summarized by
comparing the odds of one outcome to another,
rather than by comparing one outcome to the
total.
• Notice that odds are expressed using a phrase
with the structure” a to b”, so a ratio is implied
but not actually computed
• The odds ratio is used to compare the odds of a
certain behavior or event within two different
groups.
No:22
Odds
= Number in category 1 to Number in category 2
= (Number in category 1/Number in category 2) to 1
Odds Ratio
= (Odds for group 1) / (Odds for group 2)
Example:
• Odds of getting a divorce to not getting a divorce
for smokers are 238 to 247 or 0.96 to 1.
• Odds of getting a divorce to not getting a divorce
for nonsmokers are 374 to 810 or 0.46 to 1.
• Odds Ratio = 0.96 / 0.46 = 2.1 => the odds of
divorce for smokers are about double the odds for
nonsmokers.
• A useful characteristic of the odds ratio is that its
value stays the same if the roles of the response
and explanatory variables are reversed.
• In summary p177
No:23
No:24
6.3 Misleading Statistics
About Risk p178
Whenever risk statistics are reported, there is a risk
that they are misreported
Questions to Ask:
• What are the actual risks? What is the baseline risk?
• What is the population for which the reported risk or
relative risk applies?
• What is the time period for this risk?
No:25
Example 6.4
Disaster in the Skies?
Case Study 1.2 Revisited
“Errors by air traffic controllers climbed
from 746 in fiscal 1997 to 878 in fiscal 1998,
an 18% increase.” USA Today
Look at risk of controller error per flight:
In 1998: 5.5 errors per million flights
In 1997: 4.8 errors per million flights
Risk of error increased but the actual risk is very small.
No:26
Example 6.5
Dietary Fat and Breast Cancer
“Italian scientists report that a diet rich in animal
protein and fat – cheeseburgers, french fries, and
ice cream, for example – increases a woman’s risk
of breast cancer threefold.” Prevention Magazine’s
Giant Book of Health Facts (1991, p. 122).
Two reasons info is useless:
1. Don’t know how data collected nor what
population the women represent.
2. Don’t know ages of women studied, so don’t
know baseline rate.
No:27
Example 6.5
Dietary Fat
and Breast Cancer (cont)
Age is a critical factor.
Accumulated lifetime risk of woman developing
breast cancer by certain ages:
By age 50: 1 in 50
By age 60: 1 in 23
By age 85: 1 in 9
Annual risk 1 in 3700 for women in early 30’s.
If Italian study was on very young women, the threefold
increase in risk represents a small increase.
6.4 The Effect of a Third Variable
No:28
and Simpson’s Paradox p181
• In previous chapters, you have seen several
examples in which a confounding or lurking
variable may have affected the relationship
between a explanatory variable and a response
variable.
• In observational studies, a confounding variable
might explain an apparent relationship between
two variables or, in some instances, it can mask a
relationship.
No:29
Example 6.7 Educational Status and
Driving after Substance Use
1996 nationwide survey of 11,847 individuals
16 or over.
Response was Driving Status with 3 categories:
• Unimpaired = never drove while impaired
• Alcohol = drove within 2 hours of alcohol use,
but never after drug use
• Drug = drove within 2 hours of drug use
and possibly after alcohol use.
No:30
No:31
The bar chart clearly show that: As amount
of education increases, the proportion who
drove within two hours of alcohol use also
increases
What’s going on here?
One difference between the educ. groups is
age. Not enough information on age so age
is a lurking variable.
.
Simpson’s Paradox
No:32
• Occasionally, the effect of a confounding factor
is strong enough to produce a paradox known as
Simpson’s Paradox. The paradox is that the
relationship appears to be in a different direction
when the confounding variable is not considered
than when the data are separated into the
categories of the confounding variable.
No:33
Example 6.8
Blood Pressure and Oral
Contraceptive Use
Hypothetical data on 2400 women. Recorded oral
contraceptive use and if had high blood pressure.
Percent with high blood pressure is about the same among oral
contraceptive users and nonusers.
No:34
Example 6.8
Blood Pressure and
Oral Contraceptive Use (cont)
Many factors affect blood pressure. If users and nonusers differ with respect
to such a factor, the factor confounds the results. Blood pressure increases
with age and users tend to be younger.
In each age group, the percentage with high blood pressure is higher for
users than for nonusers => Simpson’s Paradox.
No:35
6.5 Assessing the Statistical
Significance of a 2x2 Table p183
Question: Can
a relationship observed in the
sample data be inferred to hold in the
population represented by the data?
p184 A statistically significant relationship or
difference is one that is large enough to be unlikely to
have occurred in the observed sample if there is no
relationship or difference in the population.
No:36
Five Steps to Determining
Statistical Significance:
1. Determine the null and alternative hypotheses.
2. Verify necessary data conditions, and if met,
summarize the data into an appropriate test statistic.
3. Assuming the null hypothesis is true,
find the p-value.
4. Decide whether or not the result is statistically
significant based on the p-value.
5. Report the conclusion in the context of the situation.
No:37
Step 1:
Null and
Alternative Hypotheses p185
null hypothesis:
The two variables are not related.
alternative hypotheses:
The two variables are related.
No:38
Step 2:
The Chi-square Statistic p185
Chi-square statistic measures the difference between the
observed counts and the counts that would be expected if
there were no relationship.
Large difference => evidence of a relationship.
• Compute expected count for each cell:
Expected count = (Row total)(Column total)
Total n for table
• Compute for each cell: (Obs count – Exp count)2
Exp count
• Compute test statistic by totaling over all cells:
(Obs count – Exp count)2
2
Exp count
 
No:39
Step 3:
The p-value of the
Chi-square Test p186
Large test statistic => evidence of a relationship.
So how large is enough to declare significance?
Q:
If there is actually no relationship in the
population, what is the likelihood that the chisquare statistic could be as large as it is or larger?
A:
The p-value
or: DF=(n-1)(m-1)
Note: The p-value is generally reported in computer output.
No:40
Steps 4 and 5: Making and
Reporting a Decision
Large test statistic => small p-value
=> evidence a real relationship exists in the population.
Common rule:
• p-value  0.05 => say relationship is statistically significant and
we reject the null hypothesis
• p-value > 0.05 => cannot say relationship is statistically
significant and we cannot reject the null hypothesis
Note: For 22 tables, a test statistic of 3.84 or larger is significant.
No:41
Example 6.10
Randomly Pick S or Q
Of 92 college students asked: “Randomly choose one of
the letters S or Q”, 66% (61/92) picked S. Of another 98
students asked: “Randomly choose one of the letters Q or S”,
46% (45/98) picked S.
Can we conclude order
of letters on the form
and the response are
related?
The p-value = 0.005
which is less than 0.05,
so the relationship is
statistically significant.
No:42
An Example
Problem : Researchers in a California community
have asked a sample of 175 automobile owners to
select their favorite from three popular automotive
magazines. Of the 111 import owners in the sample,
54 selected Car and Driver, 25 selected Motor Trend,
and 32 selected Road & Track. Of the 64 domesticmake owners in the sample, 19 selected Car and
Driver, 22 selected Motor Trend, and 23 selected
Road & Track. At the 0.05 level, is import/domestic
ownership independent of magazine preference?
Based on the chi-square table, what is the most
accurate statement that can be made about the p-value
for the test?
No:43
Chi-Square Tests of Independence
• First, arrange the data in a table.
Car and
Driver (1)
Import (Imp)
54
Domestic (Dom)
19
Totals
73
Motor
Trend (2)
25
22
47
Road &
Track (3)
32
23
55
Totals
111
64
175
© 2002 The Wadsworth Group
No:44
Chi-Square Tests of Independence
Car and
Motor
Driver (1)
Trend (2)
Import (Imp): O 54
25
E46.3029
29.8114
2 contribution 1.2795
0.7765
Domestic (Dom) :
OE2 contribution -
19
26.6971
2.2192
22
17.1886
1.3468
Road &
Track (3)
32
34.8857
0.2387
23
20.1143
0.4140
S 2 contributions = 6.2747
No:45
• I. Hypotheses:
H0:
Type of magazine
and auto ownership are
independent.
H1:
Type of magazine
and auto ownership are not
independent.
• II. Rejection Region:
a = 0.05
df = (r – 1) (k – 1)
= (2 – 1)• (3 – 1)
=1•2=2
If 2 > 5.991, reject H0.
Do Not Reject H0
0.95
Reject H 0
0.05
 2 =5.991
No:46
• III. Test Statistic:
2 = 6.2747
• IV. Conclusion:
Since the test statistic of 6.2747 falls beyond the critical value of
5.991, we reject the null hypothesis with at least 95% confidence.
• V. Implications:
There is enough evidence to show that magazine preference is not
independent from import/domestic auto ownership.
• p-value:
In a cell on a Microsoft Excel spreadsheet, type:
=CHIDIST(6.2747,2). The answer is: p-value = 0.043398
No:47
Factors that Affect
Statistical Significance
• The strength of the observed relationship
Example 6.10
Of those with “S or Q”, 66% picked S.
Of those with “Q or S”, 46% picked S.
Difference in percentages (66% - 46%) reflects the strength of
the observed relationship.
No:48
Factors that Affect
Statistical Significance: (cont)
• How many people were studied
Example:
I. Treatment A had 8 of 10 patients improve.
Treatment B had 5 of 10 patients improve.
Strength = 80% - 50% = 30% seems large
but study is too small. The p-value is 0.16.
II. Treatment A had 80 of 100 patients improve.
Treatment B had 50 of 100 patients improve.
Strength = 80% - 50% = 30% is again large.
The p-value is 0.000000087, which is very significant.
No:49
Practical versus Statistical Significance
Statistical Significance does not mean the
relationship is of practical importance.
Example 6.12 Aspirin and Heart Attacks
p-value is 0.000 => relationship
is statistically significant.
Placebo:
189/11034 = 1.71% had attack
Aspirin:
104/11037 = 0.94% had attack
Difference only 1.71 – 0.94 =
0.77%, or less than 1%.
With large sample this important
difference was detected.
No:50
Interpreting a Non-significant
Result
• The sample results are not strong enough
to safely conclude that there is a relationship in
the population.
• The observed relationship could have resulted
by chance, even if there is no relationship in the
population. This is not the same as saying there
is no relationship.
No:51
Case Study 6.1
Drinking, Driving,
and the Supreme Court
“Random Roadside Survey” of drivers under 20 years of
age.
p-value is 0.201 => the
observed association could
easily have occurred even if
there is no relationship in the
population.
This result was used by Supreme Court to overturn a law
that allowed sale of beer to females but not males.
No:52
Key Terms
•
•
•
•
•
•
•
•
•
•
•
•
Contingency table列联表
Two-way table二位表
Cell格子
Conditional percents条件百分比
Row percents行百分比
Column percents列百分比
Risk危险
Relative risk相对危险
Baseline risk底线危险
Percent increase in risk危险增加百分比
Odds
Odds ration
No:53
Key Terms
•
•
•
•
•
•
•
•
•
•
•
Simpson’s Paradox幸普森谬论
Statistically significant relationship统计上的显著关系
Statistical significance统计显著性
Mull hypothesis原假设
Alternative hypothesis备择假设
Chi-square statistic卡方统计值
Observed counts观察数
Expected counts预计数
P-value P值
Practical significance实际显著性
Nonsignificant results 非显著结果