Probability with Tables
and Odds Ratios
R
The focus of this chapter is to expand our knowledge of probability to include
I
ideas with contingency tables. Contingency tables (also known as cross
C of qualitative (mostly
tabulations or pivot tables) reflect the distribution
categorical) variables. For example, we might have
A the cross tabulation of
gender (males versus females) cross tabbed against support for a candidate
R
(yes versus no), or the success of a clinical trial (success
or failure) based on
whether the subjects were given a placebo or a treatment.
D
We will begin by walking through an analysis of, a contingency table from
the 2008 General Social Survey (GSS) from the National Opinion Research
Center. I took the data from a web site maintained by the University of
A on whether responCalifornia, Berkeley. The data are based on a question
dents favored or opposed the requirement of gun
D permits. The data are
broken down by males and females to see if the probabilities for each group
Rbelow in Table 6.1. These
are the same. The basic contingency table is given
data will allow us to examine unions, intersections,
I and conditional probabilities from the perspective of a contingency table. As you will see, the
E
probability rules learned in the last chapter will apply to solving various
N if you know how to
problems. But solutions can be derived much easier
percentage a table based on your research questions.
chapter
6
N
respondentsEto
The data in Table 6.1 refer to 1,341
this question in 2008.
Usually we prefer to work with proportions or percentages. The percentages
are simply proportions multiplied by 100. We prefer proportions because the
2 do not always help us
absolute numbers of observations in each category
to see the story in the data. The relative numbers,
4 based on proportions,
provide a perspective to see if one event is more likely for one group versus
7
another.
9
However, it is often difficult to decide which proportion to use. Consider the
T statistical software profollowing table of the same data from JMP. Like any
gram, JMP assumes you will want to report proportions
from the table, so
S
it calculates the total, row, and column percentages for each cell. It is up to
Breakdown of the Support for Gun Permits by Gender, 2008 GSS
table 6.1
Favor or Oppose Gun Permits
Gender
Male
Female
Column Total
K11352_Ilvento_CH06.indd 99
Favor
Oppose
Row Total
439
621
1060
179
102
281
618
723
1341
7/12/13 3:10 PM
100
chapter 6
Probability with Tables and Odds Ratios
the user to decide which percentage is most useful. The JMP table has a
Total Percentage, a Column Percentage, and a Row Percentage. We start by
looking at the first cell, which shows 439 males were in favor of gun permits.
This value is 32.74% of the total respondents (1,341), 41.42% of the total that
favored permits (1,060), and 71.04% of the males (618). The question we will
seek to answer is, which is most useful to summarize the data?
table 6.2
JMP Contingency Table of 2008 GSS Data with Three Kinds of Probabilities
Gender by Gun Permits
Count
Total %
Col %
Row %
Male
Female
Favor
Oppose
R
I
439 C
32.74
A
41.42
71.04R
621 D
46.31,
179
13.35
63.70
28.96
618
46.09
58.58
85.89
102
7.61
36.30
14.11
723
53.91
1060 A
79.05D
281
20.95
1341
R
As I walk you through this Itable, I want you to apply the probability rules to
the data and solve for various probabilities. I will work it through with you,
but the best way to learn itEis to try to solve it by yourself, and then look at
my answer.
N
N the probability rules from Chapter 5 as a referAt this point it is useful to list
ence point. We will be working
E through Rules 3, 4, 5, and 6 as we work with
table data. Keep these rules handy as you go through this chapter.
Rule 1. All sample point probabilities
must lie between 0 and 1.
2
4
Rule 2. Probabilities of all sample
points within a sample space must sum to 1.
Rule 3. The complement of7an Event A is all the sample points not in Event A.
c
It is denoted as A’ or
9A . We solve for the complement by subtracting
the probability of Event A from one. P(A’) = 1 − P(A)
T
Rule 4. To find the probability of a union between events A and B (i.e.,
S
that either A or B happens).
Rule 4 is also known as the additive
rule because the formula adds and subtracts probabilities. The
probability of a union is given as:
P(A ∪ B) = P(A) + P(B) − P(A ∩ B)
In the case that A and B are mutually exclusive events, meaning A and B
c annot occur at the same time, the rule simplifies to the following.
P(A ∪ B) = P(A) + P(B)
K11352_Ilvento_CH06.indd 100
7/12/13 3:10 PM
chapter 6
Probability with Tables and Odds Ratios
101
Rule 5. To find the probability of an intersection between events A and B (i.e.,
that both A and B happen). Rule 5 is also known as the multiplicative rule because the probabilities are multiplied. The probability of
an intersection is given as:
P(A ∩ B) = P(A)P(B|A)
And P(B ∩ A) = P(B)P(A|B)
In the case that A and B are independent events, meaning the probability of
Event A does not influence the probability of Event B, the rule simplifies to
the following.
R
I
C A occurs given Event B
Rule 6. To find the conditional probability that Event
has occurred we use the following formula.
A
P(A|B) = P(A ∩ B)/P(B) R
D
P(B|A) = P(A ∩ B)/P(A)
,
P(A ∩ B) = P(A)P(B) and P(B ∩ A) = P(B)P(A)
The conditional probability is the probability of the intersection of A and B
divided by the probability of B. In essence, it adjusts the probability of the
A space of the condition
intersection of the two events to the reduced sample
(in this case, B).
D
R
I
Examining the Contingency Table in Terms of Row and
E
Column Margins
N in Table 6.1 for the samThroughout this exercise I will be looking at the data
ple of respondents in the General Social Survey inN2008. The data reflect the
breakdown of support for requiring a gun permit (favor versus oppose) by
E
gender (male and female). Let us let Event A be that a subject is a female. We
will express this as A = (female).
2
Part of the contingency table shows the number of males and females. We
will first focus on this part of the table. Table 6.34shows the breakdown of
males and females in the sample. The data show that
7 46.085% of the sample
are males and 53.915% are females, and these percentages sum to 100%.
9
We could also express these as proportions (by dividing
by 100) and as such
they are probabilities for these sample data. The probability
of being a male
T
is .46085.
S
The frequencies in this table are the row margins in Table 6.1. They reflect
the totals and percentages for males and females in the survey sample. In
Breakdown of Gender, 2008 GSS
Gender
Male
Female
Total
K11352_Ilvento_CH06.indd 101
Frequency
Percent
618
723
1341
46.085
53.915
100.000
table 6.3
7/12/13 3:10 PM
102
chapter 6
Probability with Tables and Odds Ratios
a real sense in this survey they are given—we observe the sample proportions for gender and we do not have any sense that the survey (read it as
an experiment) had any influence on a person’s gender. It just happened
that the number of male respondents was 618, and that this was 46.085%
of the total.
If Event A is being a female, then the probability of Event A is:
P(A) = 723/1341 = .53915
We can express this as a percentage (per 100) by multiplying this proportion
by 100 (53.915%). It is important to realize that the proportion and the percentage are essentially the R
same thing. And, based on Rule 3, the probability
of the complement of Event A is:
I
P(A’) = C
1 − P(A) = 1 − .53915 = .46085
A
In this context, the complement of Event A is the probability of being male.
R is given in Figure 6.1. JMP also includes a
The result from JMP for gender
histogram of the data which
D visually shows there are more females in the
sample than males.
,
Next we will look at the column margins, which reflect the breakdown of support for gun permits. Table 6.4 shows that 1060 favor the requirement of gun
Aoppose this requirement (20.955%). These totals
permits (79.045%) while 281
can be seen in Table 6.1 asDthe column margins. In terms of a survey question being an experiment that is repeated for each respondent, the responses
R of the survey process. As a result of asking
to this question are an outcome
whether each subject favored
I or opposed a requirement of gun permits, 1060
favored permits, which was 79.045% of the total. The JMP output for this
variable is given in FigureE6.2. The histogram clearly shows large support
from the public on gun permits.
N
N
E
figure 6.1
table 6.4
2
4
7
9
T
SGSS
JMP Breakdown of Gender, 2008
Breakdown of Support for Gun Permits, 2008 GSS
Support
Favor
Oppose
Total
K11352_Ilvento_CH06.indd 102
Frequency
Percent
1060
281
1341
79.045
20.955
100.000
7/12/13 3:10 PM
chapter 6
Probability with Tables and Odds Ratios
103
figure 6.2
JMP Breakdown of Support for Gun Permits, 2008 GSS
If Event B is to favor gun permits, then the probability of Event B is:
R
I
P(B) = 1060/1341 = .79045
C
The probability of the complement of Event B is the probability of opposing
A
gun permits, given as:
R
P(B’) = 1 − P(B) = 1 − .79045 = .20955
D
,
Looking at the Full Contingency Table: Unions, Intersections,
and Conditional Probabilities
A
Returning to the full contingency table, it is time to
Dunderstand the meaning
of the individual cells in the table. In a 2x2 table (2 rows and 2 columns) the
Rc12 (row 1, column 2), c21
individual cells are noted as c11 (row 1, column 1),
(row 2, column 1) and c22 (row 2 and column 2). Thus
I c11 for Table 6.5 has the
value of 439. This represents the intersection of male and favor.
E
N
Breakdown of Support for Gun Permits by Gender, 2008 GSS
N
Favor or Oppose Gun Permits
E
table 6.5
Gender
Favor
Oppose
Row Total
Male
Female
Column Total
439
621
1060
179
102
281
618
2
723
1341
4
7
Let us start with the union of events A and B. Remember Event A is Female
9
and Event B is Favor. The union of A and B from Rule 4 is expressed as
T
(A ∪ B) = (A) + (B) − (A ∩ B)
S
723
+ 1060
− 621
-----------1162
All Females
All who Favor Gun Permits
All who are both Female and Favor Gun Permits
And the probability of the union of events A and B is:
P(A ∪ B) = P(A) + P(B) − P(A ∩ B)
P(A ∪ B) = 723/1341 + 1060/1341 − 621/1341
K11352_Ilvento_CH06.indd 103
7/12/13 3:10 PM
104
chapter 6
Probability with Tables and Odds Ratios
P(A ∪ B) = .53915 + .79045 − .46309
P(A ∪ B) = .86652
We could have also solved this as 1162/1341 = .86652
The union of two events in a contingency table is not particularly useful and
you will not find a probability reported for unions in statistical output. But
we could easily calculate it if we wanted to. However, the intersection of
two events is useful. In order to solve for the union, we needed to know the
intersection of events A and B. The intersection in a contingency table is the
individual cell value, in our case the value for cell c21, which is 621. This is
everyone who is both female and who favors gun permits. I do not need to
use Rule 5 if I know that c21R
is the intersection of these two events. I can simply calculate the probability of the intersection as:
I
P(AC∩ B) = 621/1341 = .46309
A
Of course Rule 6 does work, as long as we know the conditional probability of
R give you this value and then later show you
B given A. For now I will simply
how to calculate it from a contingency
table.
D
,P(A ∩ B) = P(A)P(B|A)
P(A ∩ B) = .53915 * .85892 = .46309
A
D
Conditional Probability R
in a Contingency Table
The conditional probabilityI of Event B given A can be stated as, the probability of favoring gun permits
E given you are a female. The condition or the
given is being female. The way to think of this is now we look at the probability of favoring gun permitsN
for females, and being female becomes the new
sample space. It is relatively
N easy to calculate a conditional probability from
a contingency table. In order to calculate P(B|A) we simply focus on row 2 of
E this row in Table 6.6. The new sample space is
the table. I have highlighted
all females, 621 of whom favor gun permits. The probability of favoring gun
permits given you are a female is:
table 6.6
2
P(B|A)
4 = 621/723 = .85892
7
Breakdown of Support for Gun9Permits by Gender, 2008 GSS
Favor or Oppose Gun Permits
T
Gender
Favor
Oppose
Row Total
S
Male
Female
Column Total
439
621
1060
179
102
281
618
723
1341
We can solve the conditional probability using Rule 6 as long as we know
the probability of the intersection of A and B, which we calculated from the
previous section as:
P(A ∩ B) = 621/1341 = .46309
K11352_Ilvento_CH06.indd 104
7/12/13 3:10 PM
chapter 6
Probability with Tables and Odds Ratios
105
The formula from Rule 6 is given below, along with the calculations.
P(B|A) = P(A ∩ B)/P(A)
P(B|A) = .46309/.53915 = .85892
So the Rule 6 works, but it is far easier to simply understand that a row
percentage reflects a conditional probability for a contingency table. And if
we think of A’ as the event for males and B’ as the event for oppose, we can
calculate both row conditional probabilities from the table.
P(B|A) = 621/723 = .85892 85.892% of females favor gun permits
P(B|A’) = 439/618 = .71036 71.036% of malesRfavor gun permits
I
C
P(A|B) = 621/1061 = .58530 58.530% of those who favor gun permits
A
are female
P(A|B’) = 102/281 = .36299 36.299% of thoseR
who oppose gun permits
are female
D
If we return to the JMP output for the contingency, table, we can see that the
The column conditional probabilities are:
total percentages, row percentages, and the column percentages are routinely displayed for each cell in the contingency table (Table 6.7). Now we
A an intersection; the row
know that the total percentage is the probability of
percentage is the conditional probability given the
D row attribute (gender);
and the column percentage is the conditional probability given the column
Rrow and column margin
attribute (favor or oppose). JMP also displays the
percentages.Thus, 46.09 percent of the respondents
I are male (618/1341*100),
and 20.95% oppose gun permits (281/1341*100).
E
If you examine Table 6.7 you can see all three percentages
(remember the
N
percentages are probabilities multiplied by 100). The figures in cell c11 are
N
bolded for easy viewing. Let us review each calculation. Remember that the
E
JMP Contingency Table of 2008 GSS Data with Three Kinds
2 of Probabilities
GENDER By GUN PERMITS
Count
Total %
Col %
Row %
Male
Female
K11352_Ilvento_CH06.indd 105
Favor
Oppose
439
32.74
41.42
71.04
179
13.35
63.70
28.96
621
46.31
58.58
85.89
102
7.61
36.30
14.11
1060
79.05
281
20.95
4
7
9
T
S
table 6.7
618
46.09
723
53.91
1341
7/12/13 3:10 PM
106
chapter 6
Probability with Tables and Odds Ratios
cell for row 1, column 1 deals with males so I express that as the Event A’. The
calculations for percentages in c11 (row 1, column 1) are given in Table 6.8.
table 6.8
Explanation of JMP Contingency Table Percentages for Cell 11 of 2008 GSS Data
Table
Percentage Explanation
Total %
Col %
Row %
Probability of the
Intersection of Male
and Favor
Conditional probability
based on the
Rcolumn
margin expressed as Male
given FavorI
ConditionalC
probability
based on the row margin
expressed asAFavor given Male
Expression
Calculation
P(A’ ∩ B)
439/1341*100 = 32.74%
P(A’|B)
439/1060*100 = 41.42%
P(B|A’)
439/618*100 = 71.04%
R
D know which percentage you are interested in,
A program like JMP does not
so it gives all three. It is up,to the user to decide which percentage is useful.
And this begs the next question—how does one interpret these percentages to reflect something useful? In my mind the union is not very useful,
and that is why it is not reported.
The intersection is only slightly useful.
A
However, the conditional probabilities, the row or column percentages, are
very useful. The problem isD
to decide which one to focus on—row or column
probabilities?
R
I
The answer to this question is that it depends. I know; that sounds like
waffling, but it does depend
Eupon:
N
1. Your research question
2. Which variable is linkedNto a row or to a column
E
It is somewhat arbitrary which variable is linked to a row or column when creating the table in the software package. The main variable that is the focus of
the research could be either
2the row or the column. The more critical issue is
which variable is the main focus of the research, and which provides insight
4
into that variable. Let me explain
further.
7
If you can think of the table as representing or modeling how one variable
9 variable, then the variable that does the influcauses or influences the other
encing is referred to as the T
independent variable. The independent variable is
the given in a conditional probability. The variable that is influenced, which is
often the central interest ofS
the research, is referred to as the dependent variable. To the extent that you can identify your variables in this manner, then the
independent variable is the given in the conditional probability. Always percentage in the direction of the independent variable. If the independent variable is the rows, then you are interested in row percentages. If the independent
variable is in the columns, then you are interested in column percentages.
In terms of the GSS data on gun permits, one would tend to think that a
person’s gender might influence how they feel about gun permits. A reasonable question might be if men and women feel differently about the issue.
Favoring or opposing gun permit laws is the dependent variable and the
K11352_Ilvento_CH06.indd 106
7/12/13 3:10 PM
chapter 6
Probability with Tables and Odds Ratios
107
person’s gender is the independent variable. As a result of the way our table
is organized, we would be interested in row percentages. Based on these
percentages, I can report that the percentage of men who favor gun permits
is 71.04% while the percentage of women is 85.89%. Thus, women are more
likely to support the use of permits for guns.
It is possible to calculate column percentages for the data, but these conditional probabilities reflect something quite different. A column percentage
would express the probability of being a male (or a female) given you support (or oppose) gun permits. It stretches the imagination to think how you
feel about gun permits could ever influence your gender. In this example it
is fairly obvious that support for gun permits is the dependent variable and
gender is the independent variable. Not every contingency
table will present
R
such a clear view of the roles of the variables, but most will if you think the
I
problem through.
C
A
A Model of Independence for a Contingency Table
R
Events A and B are considered independent if the occurrence of Event B does
not alter the probability of Event A. IndependenceD
is established if:
,
P(A|B) = P(A)
Likewise, P(B|A) = P(B)
A
In other words, the probability of Event A is notD
influenced by Event B. In
flipping a coin we already have noted that the second
flip is independent
R
of the first flip. No matter what the results of the first flip, the probability
of a heads on the second flip is still .5. Even if Iwe flip ten tails in a row,
the probability of a heads on the next flip is still .5.
E It is independent of the
previous flip.
N
We can also say that if two events are not independent,
they are dependent
N
upon each other. However, some dependence is stronger or more influential
E
than others, so it is a question of degree. Later in this book we will work
with measures of association which provide of measure of how related or
dependent two variables are to one another.
2
4 the probability of their
Furthermore, if events A and B are independent, then
intersection simplifies to:
7
9
T
Why is this so? Well, if we look at the formula for an intersection
S
P(A ∩ B) = P(A)P(B)
P(A ∩ B) = P(A)P(B|A)
And if A and B are independent then, P(B|A) = P(B)
So, with independence, P(A ∩ B) = P(A)P(B)
One strategy in statistics is to hypothesize a model of our data and then see
if what we observe is substantially different from the hypothesized model.
When there are substantial differences, we can make some inferences
about our sample. With contingency tables, a simple model is a model
of independence. If our variables are truly independent of each other, the
K11352_Ilvento_CH06.indd 107
7/12/13 3:10 PM
108
chapter 6
Probability with Tables and Odds Ratios
conditional probabilities, either row or column, would equal the row and
column marginal probabilities.
We can model independence by making the individual cells a function of the
row or column margins. Our model would not change the row or column
margins, but it would (or could) alter the distribution of frequencies within
the table cells. How much the distribution is influenced would depend on
how independent the two variables really are. Let me show you the GSS
table based on a model of independence and then we can see how to calculate the expected cell frequencies (expected based on our model).
A few things you should notice in Table 6.10. First, the expected values will
often have decimal places.R
That is ok! While they are expected frequencies,
they are based on a model and we can allow them to have decimal places.
I
The second thing you will notice is that the row and column margins in the
observed and expected tables
C are identical. The model of independence does
not alter the overall sample size or the marginal distributions—it simply reorA
ders the distribution of the frequencies in the individual cells.
R
How are the expected frequencies
calculated? Remember we wanted:
D
,
P(A|B) = P(A)
Event A was being a female, and Event B was that the subject favored gun
Aprobability of being female given you favored
permits. So we wanted the
gun permits to equal to theDprobability of being female.
R = 723/1341 = .53915
P(A)
I
If I apply this probability to my table, the column proportion of Females in the
Favor Column should be: E
N
Expected c21 = 1060*P(A|B) = 1060*P(A) = 1060*.53915 = 571.49888 which
N
rounds to 571.50
E
table 6.9
Observed Data of Support for Gun Permits by Gender, 2008 GSS
2
4
Favor
7
439
621 9
1060 T
S
Favor or Oppose Gun Permits
Gender
Male
Female
Column Total
table 6.10
Oppose
179
102
281
Row Total
618
723
1341
Expected Data of Support for Gun Permits by Gender, 2008 GSS
Favor or Oppose Gun Permits
Gender
Male
Female
Column Total
K11352_Ilvento_CH06.indd 108
Favor
Oppose
Row Total
488.50
571.50
1060
129.50
151.50
281
618
723
1341
7/12/13 3:10 PM
chapter 6
Probability with Tables and Odds Ratios
109
We can calculate the other expected frequencies in a similar manner. For
example, the probability of being in favor given you are male should equal
the probability of being in favor (remember A’ represents male).
P(B|A’) = P(B)
P(B) = 1060/1341 = .79045
Expected c11 = 618*.79045 = 488.50112 which rounds to 488.50
There is an easier way to calculate the expected frequencies which involves
simple multiplication and division. We simply multiply the column and
row margins for the cell, and divide this numberRby the total sample size.
For example:
I
Expected c11 = (1060*618)/1341C
= 488.50
Expected c12 = (281*618)/1341 = 129.50
A
Expected c21 = (1060*723)/1341 = 571.50
Expected c22 = (281*723)/1341 =R151.50
D
Someone who is clever in algebra can show why solving for expected fre, method I demonstrated
quencies in this way is the same as the previous
earlier. For the rest of us, we can be content to know that multiplying the
row and column margins associated with a respected cell and then dividing
A reflect complete indeby the total will generate expected frequencies that
pendence.
D
R compare it to the actual
Later we will use our model of independence and
cell distributions of the data we observe in the sample
to see if there is a
I
substantial difference. The actual method of determining if the differences
E
are statistically significant involves making an inference
based on a chisquare distribution. We are not ready to do this yet,
N but we will return to it
in Chapter 10.
N
E
Odds
2 Odds are a different way
The next two sections cover odds and odds ratios.
to express probabilities of events by taking the ratio
4 of one to another. They
are often used in research in the health fields and in marketing studies.
7 more likely” to experiWhenever you hear that one group is “3.5 times
ence an event, it is likely to be referring to an odds
9 or odds ratios. They are
particularly useful in certain types of analyses where there are only one or
T
two possible responses—such as success or failure, favor or oppose, part
defective or part good, or the subject lives or dies.
S
Odds are a different way to express the chances of something occurring
compared with probabilities, but the two are related. The odds reflect the
probability of a particular event relative to the probability of not being in the
event, and it is usually reported for a subgroup of the sample. The odds are
the ratio of two probabilities. The first mistake students often make with odds
is working with cell margins, much like we do in a conditional probability. In
contrast, the odds reflect a contrast or ratio of probabilities of individual cells.
As is usual, it is easiest to demonstrate the concept first. I will use the table
data example of support for gun permits (Table 6.11). Remember that Event A
K11352_Ilvento_CH06.indd 109
7/12/13 3:10 PM
110
chapter 6
Probability with Tables and Odds Ratios
table 6.11
Breakdown of Support for Gun Permits by Gender, 2008 GSS
Favor or Oppose Gun Permits
Gender
Favor
Oppose
Row Total
Male
Female
Column Total
439
621
1060
179
102
281
618
723
1341
was being a female, and Event B was that the subject favored gun permits.
Which also means that theREvent A’ represented males and Event B’ represented oppose. The probability
I of the intersection between being male and
in favor of gun permits is:
C
P(A’A∩ B) = 439/1341 = .32737
R
The probability of the intersection
between being male and to oppose gun
permits is:
D
P(A’, ∩ B’) = 179/1341 = .13348
The odds, then, is the ratio of these two probabilities, represented this way:
A
= .32737/.13348 = 2.45251 rounded to 2.45
OddsB to B’ for Males D
R
We express this as, males were 2.45 times more likely to favor gun permits
I
compared to oppose gun permits.
It can also be expressed that the OddsB to B’
for Males is 2.45:1 (stated as 2.45 to one). This clearly shows that males were
E
more likely to be in favor of gun permits (compared to oppose).
N
The conditional probabilityN
also reflects this since it is greater than .5.
E = 439/618 = .71036
P(B|A’)
With conditional probabilities, a natural “tipping point” for us to gauge if
2 the probability is greater than .5. This is not
something is large is whether
always the case, but certainly
4 in any political issue when looking at public
support, we wonder if more than half supports a measure. With odds, the
natural tipping point is 1.0.7
When the odds are greater than 1.0 we know that
the probability of one event9is greater than the other event. So the first thing
we might look for is whether the odds are greater or less than one reflecting
T
whether it is more or less likely compared to the other event.
S
Of course, which event is the numerator is somewhat arbitrary. I could have
just as easily have calculated the odds of oppose to favor for males. These
odds would be the reciprocal of the odds of favor to oppose for males.
OddsB’ to B for Males = .13348/.32737 = .40774 which is:
1/OddsB to B’ for Males = 1/2.45251 = .40774
Let us return to the odds for favor to oppose for males to learn of an easier
way to calculate the odds of two events. Remember, we defined the odds as
the ratio of the probabilities of two events. This time I will show all the calculations of the probabilities and use some algebra to cancel out a common term.
K11352_Ilvento_CH06.indd 110
7/12/13 3:10 PM
chapter 6
Probability with Tables and Odds Ratios
111
OddsB to B’ for Males = (439/1341)/(179/1341)
= (439/1341)/(179/1341) = 2.45251
OddsB to B’ for Males = 439/179 = 2.45251
I do not have to calculate the probabilities in order to calculate the odds since
the probabilities use the same common denominator. This also shows that if
we compare the conditional probabilities for favor versus oppose for males
we would get the same odds. Students often ask me whether we should
compare the probabilities of the intersection or the conditional probabilities
and my answer is that it does not matter! Both will yield the same result for
calculating the odds.
R
OddsB to B’ for Males = (439/618)/(179/618)
I
= (439/618)/(179/618) = 2.45251
C
Next let us calculate the same odds for women. This would be the odds of
A
favor versus oppose for women. While I could calculate the probability of
the intersection and the conditional probability forReach group, I will use the
easier formula of the ratio of the two cell values. You
D can prove it to yourself
that it generates the same result.
,
OddsB to B’ for Females = 621/102 = 6.08824 rounded to 6.09
The odds for favoring versus oppose for femalesA
is 6.09, which means that
females are 6.09 times more likely to favor gun permits
D compared to opposing them. The odds are much greater than one, indicating most females favor
gun permits by a wide margin, wider than that R
for males. Once again we
could compare the odds to the conditional probability
for females favoring
I
gun permits, which is:
E
P(B|A) = 621/723 = .85892
N
N
I want to note a few things about odds before moving onto odds ratios. These
E
are general points on the nature of odds.
• The odds reflect the ratio of two probabilities of an event compared to a
2 to not the event, as in
second event. In most cases we compare the event
success versus failure, favor versus oppose, or4yes versus no.
• Odds work particularly well in a 2 by 2 table, but they also apply to larger
tables. However, larger tables generate many 7
more odds!
• Even in a 2 by 2 table there are 8 different odds
9 we could report depending upon the events in question, the order of the events, and which
T group breaks down. It
variable reflects the event and which how the
requires the researcher to choose which odds
Sare most relevant to the
research question.
• It is somewhat arbitrary which event is expressed as the numerator and
which is the denominator. In particular problems you will find that it
is relatively straightforward to determine which is which, based on the
research question. For our problem, it was natural to express it as favor
versus oppose for males and then for females.
• In general, it is easiest to talk of odds as being greater than one, so choosing the larger probability as the numerator is useful.
• We usually calculate odds for subgroups, such as males and females, and
then seek to compare the two odds.
K11352_Ilvento_CH06.indd 111
7/12/13 3:10 PM
112
chapter 6
Probability with Tables and Odds Ratios
• Unlike a probability, which is bounded between zero and one, an odds
problem has a lower limit that will not reach zero, and an upper limit
that is unbounded. Odds and odds ratios are measures of association
between two variables, and as such they are an unbounded measure of
association (more on this in Chapter 13).
Odds Ratios
An odds ratio is exactly what it sounds like—the ratio of two odds. It is a way
to compare the odds of an event to not an event to two levels of a second
variable. We make this comparison by taking the ratio of two odds—hence
Rcontinue with our example of gun permits, we
the name, odds ratio. If we
would take the ratio of theI odds of favor versus oppose for females compared to the odds of favor versus oppose for males. Of course I could have
C expressed it as males to females. Let us work
reversed this odds ratio and
the problem through and then
A I will tell you why I liked the ratio expressed
as females to males.
R
Let us review what we calculated
earlier. We are expressing the odds of favor
D
(Event B) versus oppose (Event B’) for females and males:
,
OddsB to B’ for Females = 621/102 = 6.08824 rounded to 6.09
A
OddsB to B’ for Males = 439/179
= 2.45251 rounded to 2.45
D
R
Odds RatioFemales to Males =I6.08824/2.45251 = 2.48245 rounded to 2.48 or 2.5
E
One way to express this in words is the following statement:
N
Females were 2.5 times more
N likely to favor gun permits (compared with
oppose) when compared to males.
E
The odds ratio of favor to oppose for females compared to males is:
I chose to express this as females compared to males because I already knew
that females had the higher conditional probability of favoring gun permits,
2 for a better comparison in the odds ratio. Howand thus higher odds. It made
ever, I could have just as easily
4 expressed it as:
7
The odds ratio of favor to oppose
for males compared to females is:
9
T
However, expressing the odds
S ratio as .4 in plain English is a little awkward.
Odds RatioMales to Females = 2.45251/6.08824 = .40283 rounded to .40 or .4
Males were .4 times more likely to favor gun permits (compared with oppose)
when compared to females.
In this case, .4 times more likely really means males are less likely compared
to females. So, whenever possible it is best to express the odds ratio as
something greater than one. However, the research question should always
drive the way we express odds and odds ratios.
Odds and odds ratios are used often in research where the outcome is
categorical. This includes the health fields where we might be looking at
K11352_Ilvento_CH06.indd 112
7/12/13 3:10 PM
chapter 6
Probability with Tables and Odds Ratios
113
probabilities of survival (versus death) for a treatment versus a control
group. It is also used heavily in marketing where they might be interested
in the odds of purchasing a product versus not purchasing and then creating odds ratios for various subgroups—males versus females, young versus old, or married versus single.
Here are general points on the nature of an odds ratio.
• The odds ratio reflects the ratio of two odds.
• Odds ratios work particularly well in a 2 by 2 table, but they also apply to
larger tables. However, larger tables generate many more odds ratios!
• Even in a 2 by 2 table there are 4 different odds ratios we could report
depending upon the odds we express. It requires
R the researcher to choose
which odds ratio is the most relevant to the research question.
I
• The tipping point for an odds ratio is the same for an odds problem
whether is it greater or less than one. An odds
C ratio greater than one
means the odds for the numerator group is greater than the odds for the
A
denominator group.
R a logit . The reference
• Sometimes we take the log of the odds—called
point for a logit is zero, since the log of 1 is zero,
D expressed as: Ln(1) = 0 .
Logits are used in an analysis strategy called logistic regression.
,
Both odds and odds ratios can be very sensitive to extremes! Care should
be taken when interpreting odds and odds ratios and it is always valuable to
A
have some understanding of the underlying probabilities.
I can demonstrate
this with a quick example.
D
R disease in the populaLet us suppose the probability of having a particular
tion is .0054. This means it is a relatively rare event
I and there is a low probability of having the disease. However, for two groups in the population there
Eprobability of having the
is a difference in the probabilities. For Group A, the
disease is .0098. The probability of having the disease
in Group B is even
N
rarer, .0010. Let us express the odds of having the disease for a sample of
N
Group A = 10/1000 = .01, and the odds of having the disease for a sample of
Group B = 1/1000 = .001. In this case the odds ratioEof A to B is:
Odds RatioGroup A to Group B = .01/.001 = 10.0
2
An odds ratio of 10 seems quite large, and we would
4 say Group A is 10 times
more likely to have the disease than Group B. However, it is also true that
7 Having the disease is a
both groups are highly unlikely to have the disease.
rare event! The low overall probability of the disease
9 for both groups would
not be captured in an odds or odds ratio. In fact, the odds ratio sounds quite
Treading the results of the
large and might even alarm a member of the public
research. Whenever dealing with odds and odds S
ratios, it is often useful to
also know the overall probability for each group as a reference point for any
discussion.
A Larger Table Example: Diagnosed Diabetes in 2007
Let us briefly look at all the concepts we learned thus far with a larger table as
an example. The incidence of a disease is defined as the risk of contracting a
condition within a specified period of time. It is a probability relating to contracting a condition relative to the population at risk. It is not the same thing
as the prevalence of a disease, which reflects the total number of persons
K11352_Ilvento_CH06.indd 113
7/12/13 3:10 PM
114
chapter 6
Probability with Tables and Odds Ratios
with a condition relative to the population at risk. The following table (Table
6.12) is mock data set based on reported diagnosed diabetes from the Center for Disease Control and Prevention for 2007 and the age distribution of
the United States from the Census Bureau’s American Community Survey
summary for 2006–2008. I applied the rates and age distribution to a mock
sample of 10,000 adults age 18 to 79. From this table we should be able to
calculate the incidence of diabetes in 2007.
Table 6.12 is a 3x2 table with 6 cells. It is relatively easy to think of diagnosed
diabetes as the dependent variable and age as the independent variable. As a
result, we will percentage in the direction of the independent variable, age. In
other words, we want row probabilities. Make sure this makes sense to you
conceptually and mathematically.
The way we would phrase this is, “What
R
is the probability of being diagnosed with diabetes given you are 18 to 44?”
I
The answer is:
C
A
R 6.3) is JMP output with the row percentages
The following figure (Figure
calculated.
D
,
From the table row percentages
I can see that there is a fairly large difference
P(Yes|18 to 44) = 228/5183 = .04399 or 4.4%
between adults 18 to 44 when compared to the middle age group (45 to 64)
and the senior group (4.4% compared with 11.7% and 12.51%, respectively).
A difference between middle age and seniors in
However, there is very little
relation to new diagnosed D
diabetes cases in 2007 (11.7% versus 12.51%).
table 6.12
R
I
Breakdown of Diagnosed Diabetes by Age in the United States, 2007
E
NDiagnosed Diabetes
Age
Yes
No
Row Total
N
18 to 44
228
4955
5183
E
45 to 64
411
3103
3514
65 to 79
Column Total
figure 6.3
K11352_Ilvento_CH06.indd 114
163
802
2
4
7
9
T
S
1140
9198
1303
10000
JMP Contingency Table of Diagnosed Diabetes by Age, 2007
7/12/13 3:10 PM
chapter 6
Probability with Tables and Odds Ratios
115
I can generate expected values from the table based on a model of independence. The overall rate of diagnosed diabetes is 802/10000 = .0802. If each
age group had the same overall rate for yes, then AGE and DIAGNOSIS
would be independent of each other. If I applied that rate to each age group
by multiplying that proportion to each row margin I would get the following
expected values of yes for each age group under a model of independence.
Expected for 18 to 44 = .0802 * 5183 = 415.6766
Expected for 45 to 64 = .0802 * 3514 = 281.8228
Expected for 65 to 79 = .0802 * 1303 = 104.5006
I can generate the same values by multiplying the respective row and column
margins and dividing by the total.
R
I
Expected for 18 to 44 = (802 * 5183)/10000 = 415.6766
C = 281.8228
Expected for 45 to 64 = (802 * 3514)/10000
Expected for 65 to 79 = (802 * 1303)/10000 = 104.5006
A
R
Either way I calculate it I get the same result—expected
values that insure
that AGE and DIAGNOSIS are independent of each
other.
With
a table larger
D
than 2x2 rows and columns, the expected values are generated in the same
, to four decimal points
manner. The full table of expected values expanded
can be seen in Table 6.13.
A
D
Expected Values from a Model of Independence for Diagnosed Diabetes by Age in the
R
United States, 2007
I
Diagnosed Diabetes
E
Age
Yes
No
Row Total
N
18 to 44
415.6766
4767.3234
5183
45 to 64
281.8228
3232.1772 N
3514
65 to 79
104.5006
1198.4994 E
1303
Column Total
802
9198
table 6.13
10000
2
The last thing we talked about is calculating odds and odds ratios. With more
4
than a 2x2 table, these calculations get more complex.
We could calculate
the odds for yes versus no for each age group and7then calculate three separate odds ratios. In general we are free to choose odds of yes to no or no to
9
yes, and we often prefer the odds to be greater than one—it just is easier to
express them in words when they are greater than
T one. In this case we are
focusing on being diagnosed with diabetes, so I would argue for an expresS
sion of yes to no.
Odds of Yes versus No for 18 to 44 228/4955 = .0460
Odds of Yes versus No for 45 to 64 411/3103 = .1325
Odds of Yes versus No for 65 to 79 163/1140 = .1430
For the odds ratios, I would recommend making it greater than 1, so I will
compare the largest odds, for 65 and over, to the other age groups, and then
the middle age group to the youngest age group. For each odds ratio I will
calculate the odds ratio and then I will express it in words. Please note that all
calculations are done on a calculator which allows for more decimal places
K11352_Ilvento_CH06.indd 115
7/12/13 3:10 PM
116
chapter 6
Probability with Tables and Odds Ratios
than are shown in the equations. This may account for slight rounding errors
if you calculate the same figures.
Odds Ratio65 to 79 to 45 to 64 = .1430/.1325 = 1.0795 or 1.1 Persons aged 65 to 79 are
1.1 times more likely to be diagnosed with diabetes in 2007 compared with
persons aged 45 to 64
Odds Ratio65 to 79 to 18 to 44 = .1430/.0460 = 3.1074 or 3.1 Persons aged 65 to 79 are
3.1 times more likely to be diagnosed with diabetes in 2007 compared with
persons aged 18 to 44
Odds Ratio45 to 64 to 18 to 44 = .1325/.0460 = 2.8785 or 2.9 Persons aged 45 to 64 are
2.9 times more likely to beR
diagnosed with diabetes in 2007 compared with
persons aged 18 to 44
table 6.14
I
C
Odds Ratios of Diagnosed Diabetes by Age in the United States, 2007
A
Odds Ratio65 to 79 to 45 to 64 = .1430/.1325
Persons aged 65 to 79 were 1.1
= 1.0795Ror 1.1
times more likely to be diagnosed
with diabetes in 2007 compared
D
with persons aged 45 to 64
,
Odds Ratio65 to 79 to 18 to 34 = .1430/.0460
= 3.1074 or 3.1
A
Persons aged 65 to 79 were 3.1
times more likely to be diagnosed
with diabetes in 2007 compared
with persons aged 18 to 44
Odds Ratio45 to 64 to 18 to 34 = .1325/.0460
= 2.8785Ror 2.9
I
Persons aged 45 to 64 were 2.9
times more likely to be diagnosed
with diabetes in 2007 compared
with persons aged 18 to 44
D
E
N
From the odds ratios we can see that there is not much of a difference
between persons 65 to 79 N
and those 45 to 64. The conditional probabilities
are very similar (.1251 versus
E .1170) and the odds ratio is nearly one (1.1).
However, there is a large difference in the odds of being diagnosed with
diabetes for older persons compared with younger persons. The odds ratio
is 3.1 which means that persons
aged 65 to 79 are 3.1 times more likely
2
to be diagnosed with diabetes in 2007 compared with persons aged 18 to
44. Before we assess the 4
importance of the odds ratio we have to understand that being newly diagnosed
with diabetes in 2007 was not a common
7
event. Only 8% of the adult population was so diagnosed in 2007, which is
9
an important health concern, but not a large percentage of the population.
However, our analysis shows
T that persons 65 to 79 are much more likely to
be newly diagnosed with diabetes, 3.1 times more likely. The comparison of
S
persons 45 to 64 to younger persons yields a similar result.
Because the odds ratio for persons 65 to 79 compared with persons 45 to
64 is nearly 1, we can conclude that the odds for each group are very similar. One last strategy we can take is to collapse the rows for each older age
group and then compare it to younger adults. Collapsing rows or columns in
a table is one strategy to simplify a larger table. It should only be done when
you have some evidence that it is warranted and will not lose information.
In our case, at least in relation to being newly diagnosed with diabetes in
2007, there was not much difference between those 45 to 64 and 65 to 79.
The collapsed table would look like this (see Table 6.15).
K11352_Ilvento_CH06.indd 116
7/12/13 3:10 PM
chapter 6
Probability with Tables and Odds Ratios
Collapsed Table for Diagnosed Diabetes by Age in the United States, 2007
117
table 6.15
Diagnosed Diabetes
Age
Yes
No
18 to 44
45 to 79
Column Total
228
574
802
4955
4243
9198
Row Total
5183
4817
10000
The conditional probability of being newly diagnosed with diabetes given
you are 45 to 79 is:
R
I
C
And the odds and odds ratio for this table is:
A
R
Odds of Yes versus No for 18 to 44 228/4955 = .0460
Odds of Yes versus No for 45 to 64 574/4243 = .1353
D
Odds Ratio45 to 79 to 18 to 44 = .1353/.0460 =, 2.9400 or 2.9
P(Yes|45 to 79) = 574/4817 = .1192
Persons aged 45 to 79 are 2.9 times more likely to be diagnosed with diabetes
A
in 2007 compared with persons aged 18 to 44.
D
R
Summary
I
The purpose of this chapter is to apply the basic probability rules on a conE
tingency table. The six rules we identified in Chapter 5 certainly apply to
N union, intersection, and
calculating probabilities in a contingency table. A
conditional probabilities are useful notions in a contingency
table, particuN
larly conditional probabilities, which are really row or column percentages.
E
One big point is that if you know how to percentage a table to answer particular research questions, you really do not need the probability rules. Just
2 row total, column total,
percentage the table using individual cells and the
or the overall total to get the answer you are looking
for. There is nothing
4
sacred about the probability rules. Knowing how to percentage a table and
7 methods for calculating
the meaning of each percentage are far more direct
the probabilities.
9
T
We also introduced a model of independence for our contingency table. This
model was a re-expression of the cells’ frequenciesSin the table while keeping
the same row and column margins. This model showed how the data would
look like if the distribution of cases reflected only row and column margins.
In other words, what the distribution of frequencies would be in the cells if
there was independence between the two variables represented in the table.
We will revisit the model of independence in Chapter 13 when we look at a
chi-square test of independence for table data.
The next topic discussed was odds and odds ratios. These are an alternative to probabilities to express the relationship of two variables in a table.
The odds reflect the ratio of the probability of an event relative to another
event, usually the complement of the event (i.e., not in the event). The odds
K11352_Ilvento_CH06.indd 117
7/12/13 3:10 PM
118
chapter 6
Probability with Tables and Odds Ratios
ratio is the ratio of two odds, and generates a familiar statement such as,
“one group is three times more likely to experience an event.” Odds ratios
are used in medical and marketing research, often via a technique known as
logistic regression.
The first example in this chapter was relatively simple, a 2 by 2 table (2 rows
and 2 columns). The strategies and techniques used in the chapter expand
to tables with more rows and columns, but the analysis does get more complex. We demonstrated this with the data on the incidence of diabetes. In
particular, the number of odds and odds ratios in a larger table make the
use of this technique more complicated, and may require more depth and
instruction in the technique.
R
I
Additional Problems C
1. The data in the table below
A compare how Americans view evolution versus creationism by political party identification. The data are based on
R results of a survey from USA Today/Gallup (poll
the published percentage
collected via telephone D
interviews conducted May 10–13, 2012, with a random sample of 1,012 adults aged 18 and older, living in all 50 U.S. states
,
and the District of Columbia).
The data are based on applied numbers to
the percentages with a slight modification: It only includes respondents
who identified themselves as Republican, Democrat, or Independent.
A
Political
BeliefD1
Belief 2
Belief 3
Affil tion
R
Republican
85
14
158
I
Democrat
100
60
129
E
Independent
138
77
158
N
Total
323
151
445
N
Belief 1
Humans evolved,
God guided the process
E
Total
257
289
373
919
Belief 2
Humans evolved, God had no part in the process
Belief 3 God created humans in their present form within the last
10,000 years
2
4
a. Given you are a Republican,
what is the probability that you ascribe to
Belief 3?
7
9 of being an Independent and you ascribe to
b. What is the probability
Belief 2?
T
S
c. What is the probability of being an Independent or you ascribe to Belief 2?
d. What is the probability of being a Democrat?
e. Given you ascribe to Belief 3, what is the probability you are a Republican?
f. The following question asks for your opinion: Between Party Affiliation
and Belief, which do you think is the independent variable and which is
the dependent variable? Why?
K11352_Ilvento_CH06.indd 118
7/12/13 3:10 PM
chapter 6
Probability with Tables and Odds Ratios
119
2. The following data compare how Americans view evolution versus creationism by political party identification. The data are based on the published percentage results of a survey from USA Today/Gallup (poll collected via telephone interviews conducted May 10–13, 2012, with a random
sample of 1,012 adults aged 18 and older, living in all 50 U.S. states and
the District of Columbia). The data are based on applied numbers to the
percentages with a slight modification: It only includes respondents who
identified themselves as Republican, Democrat, or Independent.
Political
Affil tion
Republican
Belief 1
Belief 2
85
Belief 3
Total
14
257
R 158
Democrat
100
60
129
289
I
Independent
138
77
158
373
C
Total
323
151
445
919
A
Humans evolved, God guided the process
Belief 1
R
Belief 2
Humans evolved, God had no part in the process
D form within the last
Belief 3 God created humans in their present
10,000 years
,
a. What are the odds that Republicans ascribe to Belief 3 versus Beliefs
1 and 2?
A
Dto Belief 3 versus Beliefs
b. What are the odds that Independents ascribe
1 and 2?
R
I and describe in words
c. Calculate the odds ratio of parts a and b above,
what it means.
E
N
3. A survey of undergraduate students from a particular college focused
N for an overall rating of
on student advising. One of the questions asked
the student’s advisor. The responses were on a five-point Likert scale of
E
Excellent, Good, Neutral, Poor, and Fair. Since most of the students were
positive about their advisor, the Neutral, Poor, and Fair answers were collapsed into an Other category. The data were broken
2 down by department
(A, E, and F departments) to see if there were differences by department.
4
The table is given below.
7
Department
Overall Advisor Rating9
Excellent
Good
Total
7
T Other
38
S 11
23
11
7
41
323
151
445
919
Dept. A
41
41
Dept. E
17
Dept. F
Total
120
35
a. What is the probability that a student in CANR College rated his or her
advisor as Excellent?
b. Given a student in Dept. E, what is the probability of Other?
c. What is the probability of Excellent and Dept. F?
K11352_Ilvento_CH06.indd 119
7/12/13 3:10 PM
120
chapter 6
Probability with Tables and Odds Ratios
d. What is the probability of Excellent or Dept. F?
e. What is the probability of Dept. A?
f. In your opinion, which variable (Department or Overall Advisor Rating)
is the independent variable and which is the dependent variable?
4. A survey of undergraduate students from a CANR college focused on
advising. One of the questions asked for an overall rating of the advisor.
The responses were on a five-point Likert scale of Excellent, Good, Neutral, Poor, and Fair. Since most of the students were positive about their
advisor, the Neutral, Poor, and Fair answers were collapsed into an Other
category. The data wereRbroken down by department (A, E, and F departments) to see if there were differences by department. The table is given
I
below.
Department
Dept. A
Dept. E
Dept. F
Total
C
A Overall Advisor Rating
Excellent
Good
R
41
41
D
17
7
,
Other
Total
38
120
11
35
23
11
7
41
323
151
445
919
A
a. What are the odds that
D students in Dept. F rate their advisor as Excellent compared to Good or Other?
R
b. What are the odds that
I students in Dept. A rate their advisor as Excellent compared to Good or Other?
E
c. Calculate the odds ratio
N of parts a and b above, and describe in words
what it means.
N
5. The data set below, taken
E from the General Social Survey from a cumulative file in 2006, looks at church attendance (weekly, monthly, rarely, and
never) versus the respondent’s political orientation (Conservative, Moderate, and Liberal).
2
4
Breakdown of Political Orientation by How Often the Subject Attends
7
Church, 2006 GSS
9
T
Conservative
S
Favor or Oppose Gun Permits
Attends
Services
K11352_Ilvento_CH06.indd 120
Moderate
Liberal
Total
Weekly
635
467
254
1,356
Monthly
211
267
181
659
Rarely
388
549
400
1,337
Never
234
395
341
970
Total
1,468
1,678
1,176
4,322
7/12/13 3:10 PM
chapter 6
Probability with Tables and Odds Ratios
121
In this example, which variable influences the other may not be clear.
However, I want to examine whether the degree to which an adult is
religious, measured by how often he or she attends church (the independent variable), might influence his or her political orientation (the
dependent variable).
Calculate the following:
a. The probability of being a Conservative given he or she attends services weekly.
b. The probability of being a Moderate and attending monthly.
R he or she is a Liberal.
c. The probability of never attending services given
I
C
6. This data set, taken from the General Social Survey from a cumulative file
A
in 2006, looks at church attendance (weekly, monthly, rarely, and never)
R
versus the respondent’s political orientation (Conservative,
Moderate, or
Liberal).
D
7. Table. Breakdown of Political Orientation by, How Often the Subject
d. The probability of being a Moderate and rarely attending services.
Attends Church, 2006 GSS
A
DLiberal
R
I 254
E 181
N 400
341
N
1,176
E
Favor or Oppose Gun Permits
Attends
Services
Conservative
Moderate
Weekly
635
467
Monthly
211
267
Rarely
388
549
Never
234
395
Total
1,468
1,678
Total
1,356
659
1,337
970
4,322
In this example, which variable influences the other may not be clear.
However, I want to examine whether the degree to which an adult is
2
religious, measured by how often he or she attends
church services (the
independent variable) might influence his or her
4 political orientation
(the dependent variable).
7
a. The odds of attending weekly for Conservatives
9 versus not Conservative (i.e., Moderate or Liberal).
T
b. The odds of never attending for Conservatives
S versus not Conservative
(i.e., Moderate or Liberal).
c. The odds ratio of attending weekly versus never for Conservatives
compared with not Conservative. Express the odds ratio in words.
K11352_Ilvento_CH06.indd 121
7/12/13 3:10 PM
122
chapter 6
Probability with Tables and Odds Ratios
8. The data below compare how Americans view evolution versus creationism by political party identification. The data are based on the published
percentage results of a survey from USA Today/Gallup (poll collected via
telephone interviews conducted May 10–13, 2012, with a random sample
of 1,012 adults aged 18 and older, living in all 50 U.S. states and the District of Columbia). The data are based on applied numbers to the percentages with a slight modification: It only includes respondents who identified themselves as Republican, Democrat, or Independent.
Political
Affil tion
Republican
Belief 1
Belief 2
Belief 3
Total
85
14
158
257
R
Democrat
100
60
129
289
I
Independent
138
77
158
373
C
Total
323
151
445
919
A
a. Generate the expected
R values for this table based on a model of independence.
D
b. Show that the row and
, column marginals for your expected values
equal the row and column marginals of the original table.
9. A survey of undergraduate
A students from a CANR college focused on
advising. One of the questions asked for an overall rating of the advisor.
The responses were onDa five-point Likert scale of Excellent, Good, Neutral, Poor, and Fair. Since
R most of the students were positive about their
advisor, the Neutral, Poor, and Fair answers were collapsed into an Other
category. The data wereI broken down by department (A, E, and F departments) to see if there were
E differences by department.
Department
Dept. A
N
Overall Advisor Rating
N
Excellent
Good
E
41
41
Other
Total
38
120
Dept. E
17
7
11
35
Dept. F
2
23
11
7
41
Total
81
4
59
56
196
7
a. Generate the expected values for this table based on a model of inde9
pendence.
T
b. Show that the row and column marginals for your expected values
S marginals of the original table.
equal the row and column
K11352_Ilvento_CH06.indd 122
7/12/13 3:10 PM
chapter 6
Probability with Tables and Odds Ratios
123
10. The data set below, taken from the General Social Survey from a cumulative file in 2006, looks at church attendance (weekly, monthly, rarely, and
never) versus the respondent’s political orientation (Conservative, Moderate, and Liberal).
Breakdown of Political Orientation by How Often the Subject Attends
Church, 2006 GSS
Favor or Oppose Gun Permits
Attends
Services
Weekly
Conservative
635
Moderate
Liberal
Total
467
1,356
R 254
Monthly
211
267
181
659
I
Rarely
388
549
400
1,337
C
Never
234
395
341
970
A1,176
Total
1,468
1,678
4,322
R
In this example, which variable influences the other may be unclear.
D to which an adult is
However, I want to examine whether the degree
religious (measured by how often he or she attends
church services as
,
the independent variable) might influence his or her political orientation
(the dependent variable).
A
a. Generate the expected values for this table based on a model of indeD
pendence.
R
b. Show that the row and column marginalsI for your expected values
equal the row and column marginals of the original table.
E
11. The October 26, 2009 Time magazine containedNa major story on the state
of American women. As part of this article, a large survey was conducted
N who takes care of the
to supplement the text. One of the questions asked
children. The exact wording of the question was:
E In your household, who
is primarily responsible for taking care of your children? The responses
(below) were Self, Both of Us, and Spouse/Partner. The question was only
asked of those with children, and the results were
2 broken down by gender.
Females
Self
Both of Us
Spouse/Partner
Total
1,252
472
73
1,797
4
7
208
9
640
T
688
S
1,536
Males
Total
1,460
1,112
761
3,333
a. Which variable can be reasonably thought of as the dependent variable, and which is the independent variable?
b. What is the probability of answering Self, given you are female.
c. What is the probability of answering Self, given you are male?
K11352_Ilvento_CH06.indd 123
7/12/13 3:10 PM
124
chapter 6
Probability with Tables and Odds Ratios
d. The odds of answering Self for females versus males.
e. The odds of answering Both of Us or Spouse/Partner for females versus males.
f. The odds ratio of answering Self versus Both of Us or Spouse/Partner
for females compared with males. Express in words the odds ratio.
g. Generate the expected values for this table based on a model of independence.
R
I
C
A
R
D
,
A
D
R
I
E
N
N
E
2
4
7
9
T
S
K11352_Ilvento_CH06.indd 124
7/12/13 3:10 PM
Introduction to Probability
R
Probability is the study of the likelihood of outcomes that do not happen
I
with certainty. This includes the chance that someone will win the lottery; the
C
probability of winning blackjack in Las Vegas; the chance
of rain the next day;
the probability of a part being defective; or even A
the probability that someone will get the flu during flu season. Probability is important to statistics in
two very important ways. The first is that there areRbranches of statistics that
deal with understanding and estimating the probability
of events in and of
D
themselves. The second is that once we shift toward making inferences from
, be made within a proba sample to a population, all of our statements will
ability framework. Inference is never about being certain, but rather making
conclusions with the probabilities of a correct conclusion overwhelmingly in
A
our favor.
chapter
5
D
For the future parts of this course, we will seek to make an inference from a
R of data and try to make
sample to a population. That is, we collect a sample
good estimates of parameters for a population,I whether they aremeans,
standard deviations, or regression coefficients. In this case the population is
E
unknown, and we want to infer something from a known sample—we want
N
the sample to tell us something about the population.
N
With probability we will often do the reverse. We start with the notion that
the population is known, i.e., the probabilities areEknown to us, such as the
probability of flipping a coin and observing a head is .5. Then we will use
this information to infer something about the chances of obtaining various
samples from the population, such as a head on2 three successive flips of
the coin. In some cases what is known is a mathematical
formula that tells
4
us the outcomes and the probabilities associated with each outcome for an
7 probability is not known
experiment. In other cases, where the mathematical
exactly, we will use empirical data to estimate the9probabilities.
T
In order to do this we need to develop some definitions
of basic terms of
probability, develop some rules to apply probability,
S and then develop some
basic tools and approaches to solve probability problems. This part of the
course is just an introduction to probability, with a focus of using some of
this information in future modules on making inferences in statistics.
Basic Terms of Probability
There is no getting by it—we need a set of common terms when dealing
with probability. The language and jargon of probability may not be well
known to students, but it is important to learn in order to be precise on the
events we are describing and how we solve for probabilities for those events.
K11352_Ilvento_CH05.indd 73
7/12/13 11:28 AM
74
chapter 5
Introduction to Probability
This section will deal with a number of terms and definitions that are
important to know.
If we flip a coin and record the result—for example, a tail, the result we record
is an observation. The process of making an observation is called an experiment. More specifically, an experiment leads to a single outcome which cannot be predicted with certainty.
The basic outcome of an experiment is called a sample point. The collection of outcomes is called the sample space. Outcomes of experiments are
also called events. Events are specific collections of sample points based on
some definition. For example, an experiment can involve flipping a coin three
times. The sample points would
R be: HHH; HHT; HTH; HTT; THH; THT; TTH; TTT.
These observations represent all the sample point outcomes of this experiI
ment. An event could be observing a head on any flip. This event would be
the following sample points:
C HHH; HHT; HTH; HTT; THH; THT; TTH. Part of our
strategy will be to identify all the sample points, or all the possible outcomes
A
of the experiment. That is, to identify the sample space. And then we might
R points reflect a particular event.
seek to identify which sample
D
The probability of a sample point or an event is a proportion between 0 and
, that the outcome will occur when the experi1 that measures the likelihood
ment is performed. For example, if we flip a coin, we expect that the probability of getting a head on the flip is .5. Likewise, the probability of observing
A advance, because there are only two possible
a tail is .5. We know this in
outcomes and each are equally
D likely when using a fair coin.The sum of all
the sample points will always equal 1.0. In some cases we will not know the
probability in advance, andRwe will need to conduct a series of experiments
(in other words, collect some
I data) to estimate the probability.
E with a capital letter, such as A. The probabilWe typically identify an outcome
ity of A is a numerical measure
N of the likelihood that outcome A will occur.
The probability of A is usually expressed as either:
P(A)
Prob(A)
N
E
The probability of an event2ranges from 0 (impossible) to 1 (it happens with
certainty). Thus, probability4is a proportion. The sum of all the probabilities
for the sample points of an experiment must equal one.
7
Let us do a very simple experiment.
Suppose you flip a coin. What is the
9
chance of getting a head? What is the chance of getting a tail? We already
T
stated that we expect the probability
for a head or a tail to be .5. We can easily
write out the sample spaceS
in a table.
table 5.1
Experiment: Flip a Coin and Note If It Is a Head or Tail
Sample Points
Head
Tail
Sum of Probabilities
K11352_Ilvento_CH05.indd 74
Probability
½ = .5
½ = .5
1.0
7/12/13 11:28 AM
chapter 5
Introduction to Probability
75
Now, suppose we flip a coin three times. What are the sample points and the
probabilities associated with three flips of a coin?
Experiment: Flip a Coin Three Times and Note If It Is a Head or Tail for Each Flip
Sample Points
Head, Head, Head
Head, Head, Tail
Head, Tail, Head
Head, Tail, Tail
Tail, Head, Head
Tail, Head, Tail
Tail, Tail, Head
Tail, Tail, Tail
Sum of Probabilities
table 5.2
Probability
.125
.125
.125
.125
.125
.125
.125
.125
1.000
R
I
C
A
What does it mean when we state the probabilityR
of getting a head in a coin
flip is .5? Does it mean that every other time it will be a head? If we flip it
we flip it 1,000 times, will
10 times, will we always get exactly five heads? IfD
we get exactly 500 heads? The answer is, “not exactly.
” Although it is com,
pelling to think it to be so, even after flipping a coin 10 times and all of the
flips result in a head, the chance that a tail will be observed on the next flip
is still .5. Our intuition would be different, because
Awe know the last 10 flips
were all heads. But the coin doesnot know that! The probability for each flip
is the same, regardless of what happened before. D
•
•
•
R
I
Tr y a Simpl e Ex per imen
Et
N
Flip a coin 10 times
Record the number of HEADs
N
Calculate a probability of a HEAD based on your data: # Head/10.
E
Did your simple experiment result in exactly 5 heads and 5 tails? For some it will,
but for many it will not. Even if you repeated this experiment 100 times, or even
2 heads.
1,000 times, it may not result in exactly half of the flips being
4
7
Here is the result of my experiment where I flipped
9 a coin ten times. I used a
U.S. quarter for my coin and my experiment resulted in six heads out of ten
T it is highly likely that
flips of the coin. If I had repeated this experiment again,
the number of heads would have been different because
it is a sample based
S
on a limited number of observations. Based on this empirical result, I would
have guessed that the probability of getting ahead was .6. However, mathematically, I know that the probability is .5. If I conduct an experiment with
a limited sample, the results will not exactly match the probability I expect
based on a mathematical rule. The mathematical rule will be based on an
infinite number of observations, not a limited sample.
K11352_Ilvento_CH05.indd 75
7/12/13 11:28 AM
76
chapter 5
Introduction to Probability
table 5.3
Experiment: Flip a Coin Ten Times and Note If It Is a Head or Tail for Each Flip
Sample Points
Frequency of Heads R elative Frequency
Head
Head
Tail
Head
Head
Tail
Head
Tail
Tail
Head
1
2
2
3
4
4
5
5
5
6
1.00
1.00
.677
.750
.800
.667
.714
.625
.556
.600
R
I
C
The L aw of Averages
A
John Kerrich was a South African mathematician who spent WWII in an
internment camp. While thisRwas an unlucky event for him, he had a lot of time
on his hands, so he carriedD
out experiments in probability theory. One viewpoint about the law of averages was that if you tossed a coin a lot of times, the
,
number of heads and the number
of tails would eventually equal out. Kerrich
did not believe this to be so, and spent time working out his theory.
A fact that regardless of what happened before,
Kerrich based his idea on the
the probability of every toss
Dis still 50/50 for heads and tails. No matter what
happened before, each toss has an equal chance of being a head or tail. In 100
R or 10,000 tosses, the probability of the next toss
tosses of a coin, 1,000 tosses,
is still the same. In other words,
the coin does not have a memory of what
I
happened before. Thus the difference between the number of heads and the
E
number of tails could be quite large in 10,000 tosses. We should expect 5,000
heads and 5,000 tails, but itNcould easily be 4,900 heads and 5,100 tails.
N
But, in relative terms, the difference between heads and tails will get smaller
and smaller as the number E
of tosses gets larger and larger. In other words, as
the number of tosses increases, the percentage of heads will approach 50%.
Our expectation is 50% heads and 50% tails, with some chance error. As we
2 the observed percentage of heads (or tails)
increase the number of tosses,
approaches 50%, but it may
4 never get there. And, the absolute difference
between heads and tails may be large.
7
The law of averages reflects9an expectation of the probabilities, not the absolute number of heads or tails. The following graph shows this relationship
(Figure 5.1). In this exampleTI tossed my quarter 200 times. Amazingly, in the
end the number of heads was
S 101 out of 200, or 50.5 percent. If I did another
sample of 200 flips the number of heads could be very different. If you look
at the graph, the percentage of heads fluctuates around the 50 percent mark
and begins to approach it as the number of flips of the coin increases. This
is precisely what we mean by the law of averages—the observed proportion
will approach the mathematical expectation as the sample size increases.
A Priori versus A Posteriori Probabilities
We will focus on two main strategies of knowing the probability of sample
points or events. The first is an a priori probability—given by a definition and
before the fact. It is generally mathematically defined. For example: rolling
K11352_Ilvento_CH05.indd 76
7/12/13 11:28 AM
chapter 5
R Size Increases from 1 to 200
The Proportion of Heads on a Flip of a Coin as the Sample
Introduction to Probability
77
figure 5.1
I
C know in advance there
a die with equal probabilities for each outcome. We
are 6 outcomes – the probability for rolling a 1 is A
1/6, as is the probability of
rolling a 2, 3, 4, 5, or 6. A priori probabilities are based on the long run and
R
reflect a probability that we know in advance.
D
A second way of knowing the probabilities is after the fact through a series of
, or probability derived
experiments. This is called an a posteriori probability,
empirically through repeated experiments. In this case we cannot determine
the probabilities of sample points or events through a mathematical formula,
A In essence we observe
so we must observe them over many experiments.
the probabilities after the fact from an experimentDor series of experiments.
A survey approach would be an a posteriori probability approach.
R
I
Identifying the Sample Points and Sample Space
E
Let us look at a few experiments to see the sample points and the sample
Non a priori probabilities,
space. These examples will be simple ones, based
but we will develop more complex ones later.
N
E where we flip two coins
Experiment 1. Suppose we conduct an experiment
in succession, then observe the faces of the two coins. The sample points
would be (note, H stands for Heads and T for Tails on the coin flip):
2
1. Observe H H
4
2. Observe H T
7
3. Observe T H
4. Observe T T
9
T
We could denote the sample space as the set S1: [HH, HT, TH, TT].
S
Experiment 2. We conduct an experiment and roll a single die and record
the face.
1.
2.
3.
4.
5.
6.
Observe a 1
Observe a 2
Observe a 3
Observe a 4
Observe a 5
Observe a 6
We could denote the sample space as the set S2: [1, 2, 3, 4, 5, 6]
K11352_Ilvento_CH05.indd 77
7/12/13 11:28 AM
78
chapter 5
Introduction to Probability
Also note that we could define the sample space as particular events. For
example, a single roll of the die could be divided into the events of odd numbers (1, 3, 5) or even numbers (2, 4, 6) and the set could be expressed as:
S: [Even, Odd].
Here are some additional ways to express the sample space of different
experiments:
Regardless of the experiment, we want the outcomes (i.e., sample points) to
be mutually exclusive—two outcomes cannot occur at the same time—and
collectively exhaustive—all possible outcomes are identified and no more
possible outcomes are left out of sample space.
R
Another property we want is that the outcomes reflect random trials. By this
I
we mean that the selection of any outcome is not predetermined; thus each
outcome has a chance to be
C selected. The chances for each outcome need
not be the same, but every outcome has some chance of being selected. A
A
fixed uneven die would not be random, and would lead to outcomes that are
R
biased.
D
Finally, we need to determine if the outcomes reflect independent trials. This
,
means the outcome is not conditioned
upon previous events. In other words,
the outcome of a previous event has no impact on the outcome of a current
event. Flips of a coin are thought to be independent trials—the probability
of a head on a second flip A
is not influenced by the outcome on the first flip.
Probability from event to event
D will not always be independent. If we can
assume independence, the calculation of the probability of multiple events
Rcourse we will have a strategy to test to see if
is much easier. Later in the
events are independent orIdependent by looking at conditional probability.
Our strategy will often be to assume independence, and then see if the data
actually fit by examining a E
model of independence.
N
We will start with two simple rules for the probabilities of the sample points,
N
and then add more rules later. The first rule is that all sample point probabilities must lie between 0Eand 1. A probability of 1 means the sample point
will happen with certainty, and a probability of zero means it is impossible to
occur. The second rule is that the probabilities of all sample points within a
sample space must sum to 2
1. Remember these rules; they can help you check
your work. Throughout this4chapter we will denote a series of rules for probability beginning with the first two.
7
must lie between 0 and 1.
Rule 1. All sample point probabilities
9
Rule 2. Probabilities of all sample
points within a sample space must sum
T
to 1.
S
table 5.4
Examples of Experiments and Their Sample Space
Experiment
Sample Space
Toss a Coin, Note Face
Head, Tail
Toss 2 Coins, Note Faces
HH, HT, TH, TT
Select 1 Card, Note Number
2 Hearts, 5 Diamonds, King
and Suit Clubs, … A Spade (52)
Inspect a Part, Note Quality
Defective, OK
Conduct Face-to-Face Interviews
Male, Female
with People and Observe Gender
K11352_Ilvento_CH05.indd 78
7/12/13 11:28 AM
chapter 5
Introduction to Probability
79
Now let us look at assigning probabilities to a simple experiment—rolling a
single die and noting the number on the face. There are six outcomes of this
experiment, and each is equally likely. We know the probabilities a priori,
assuming a fair die. The outcomes are 1, 2, 3, 4, 5, and 6.
The table below shows the outcomes and the probabilities associated with
each one. Note that the sum of the probabilities equals one.
R epresenting the Sample Space
The following are some of these methods for an experiment where we
R
flip two coins and note the face of the coins. Regardless
of which way you
represent the sample space, the key to many probability
problems is to be
I
able to fully identify the sample points, events, and sample space you are
C
interested in.
A
Suppose we flip two coins and note the face of the coin. Here are several
R a contingency table,
ways to show the sample space using a Venn diagram,
or a tree diagram. All three ways provide a visual D
way to identify the sample
points. Specific probability problems may better lend themselves to one or
,
another approach to represent the sample space.
A
D
The Sample Points and Probabilities Associated with a Single Roll of a Fair Die
R
Sample Points
Probabilities
I
1
1/6 = .1667
2
1/6 = .1667 E
3
1/6 = .1667 N
4
1/6 = .1667
5
1/6 = .1667 N
6
1/6 = .1667 E
Total
6/6 = 1.0
2
4
7
9
T
S
A Venn Diagram of the Sample Points of Flipping Two Coins
K11352_Ilvento_CH05.indd 79
table 5.5
figure 5.2
7/12/13 11:28 AM
80
chapter 5
Introduction to Probability
figure 5.3
figure 5.4
R
I
A Contingency Table of the Sample
C Points of Flipping Two Coins
A
R
D
,
A
D
R
I
E
N
A Tree Diagram of the Sample Points
N of Flipping Two Coins
E
2
4
Let us look at a more complicated probability problem and see how we would
work out the sample space7and then assign probabilities. Suppose I have a
jar containing five marbles,9two of which are blue and three of which are red.
I randomly draw two marbles at the same time. What is the probability of
drawing two blue marbles?T
S
A Probability Problem with Marbles in a Jar
Our strategy for this problem will be:
1.
2.
3.
4.
5.
Define the experiment
List or draw out the sample points
Assign probabilities to the sample points
Determine the collection of sample points contained in an event of interest
Sum the sample point probabilities to get the event probability
The experiment is to draw two marbles from the jar and note the colors. Here
is one way to lay out the sample points. The sample points should be exhaustive of all possible combinations.
K11352_Ilvento_CH05.indd 80
7/12/13 11:28 AM
chapter 5
Introduction to Probability
81
The Sample Points (Note: B for blue, R for red, and I note there are 2 blue
marbles and 3 red marbles)
•
•
•
•
•
•
•
•
•
•
B1 B2
B1 R1
B1 R2
B1 R3
B2 R1
B2 R2
B2 R3
R1 R2
R1 R3
R2 R3
R
I
There are ten different possibilities of drawing two marbles. In this problem the order of the marbles is not important toCus, so there is only one
combination of drawing two blue marbles. Unless otherwise known, each
A
sample point has an equal probability. Thus, each combination has a 1/10
R
chance of being drawn. In other words, we can assume
a priori that each of
these outcomes is equally likely, so the probabilityDof each outcome is 1 over
the number of outcomes, or 1/10 = .1. The counting of how many possible
,
combinations can be found by simply listing the possible
outcomes or using
a combinatorial formula (we will show this later).
A ready to solve the probOnce we assign probabilities to the outcomes we are
abilities of particular events. Note that the probabilities
sum to one, one of
D
our criteria for probability.
R
What is the probability that two blue marbles are drawn?
We see that there is
I
only one outcome that satisfies this event. The probability is 1/10 = .1
E
What is the probability that a blue and a red marble
N are drawn? There are six
different outcomes that satisfy this outcome – B1R1, B1R2, B1R3, B2R1, B2R2,
N
B2R3. The probability is 6/10 = 3/5 = .6.
E
What is the probability that two red marbles are drawn? There are three different outcomes that satisfy this result – R1R2, R1R3, R2R3. The probability
2
is 3/10 = .3.
4
The Sample Points and Probabilities Associated with 7
Drawing Two Colored Marbles
from a Jar
9
Sample Points
Probabilities
T
B1 B2
1/10 = .10
S
B1 R1
B1 R2
B1 R3
B2 R1
B2 R2
B2 R3
R1 R2
R1 R3
R2 R3
1/10 = .10
1/10 = .10
1/10 = .10
1/10 = .10
1/10 = .10
1/10 = .10
1/10 = .10
1/10 = .10
1/10 = .10
Total
10/10 = 1.0
K11352_Ilvento_CH05.indd 81
table 5.6
7/12/13 11:28 AM
82
chapter 5
Introduction to Probability
table 5.7
The Revised Sample Points and Probabilities Associated with Drawing Two Marbles
When Color Combinations Are the Only Consideration
Sample Points
Probabilities
1/10 = .10
6/10 = .60
3/10 = .30
Two Blue
Blue and Red
Two Red
10/10 = 1.0
Total
We can also express the outcomes as events that are mutually exclusive. For
R
example the sample points are either all blue, all red, or a combination of
I probabilities also sum to one.
blue and red. In this case the
C
A
Combinatorial Formula
R
It is relatively easy to list or count all the sample points with simple probD in a jar. However, what happens when there
lems, such as with five marbles
are ten marbles in a jar, four
, of which are blue and six are red? This results
in 45 different outcomes—a number pushing our limits to write the combinations in a table. One way to count combinations of things is through the
combinatorial formula. ThisAis a mathematical formula which calculates the
number of combinations of n things taken r at a time. Most calculators will do
D
this for you. We will see this formula when we work with binomial distributions, so it is worth taking aRlook at this time.
I
To find the number of samples of n things taken r at a time we use the folE of the formula reflects two common ways the
lowing formula. The beginning
combinatorial formula is represented.
In our blue and red marble example
N
we had 5 marbles taken 2 at a time (n = 5 and r = 2):
N
EC
n
r
n
n!
= =
r r !(n − r )!
2
4
n! = n(n - 1)(n - 2)...(1)
7
9 - 2)(5 - 3)(5 - 4) = 5*4*3*2*1 = 120
For example, 5! = 5(5 - 1)(5
T
Also note that: 0! = 1 and 1! = 1
S
To be clear, n! or r! is the factorial representation and means the following:
For our problem we have 5 different marbles (2 blue and 3 red) that are taken
2 at a time. So n = 5 and r = 2. The formula will be:
5
5
5!
120 120
C2 = =
=
=
= 10
2 2!(5 − 2)! 2 * 6 12
The result of this equation is 10. There are ten different combinations of five
marbles taken two at a time. This is what we identified in our sample space
above. Note that this approach does not delineate the different combinations
as we did in Table 5.6, but it does identify the total number of combinations.
K11352_Ilvento_CH05.indd 82
7/12/13 11:28 AM
chapter 5
Introduction to Probability
83
If there are 10 marbles taken 2 at a time the formula would result in:
n
N
10!
10!
3, 628, 800
Cr = =
=
=
= 45
80, 640
n 2!(10 − 2)! 2!* 8!
Most calculators will do this calculation for you. On my $18 calculator I have
a function Cn,r which does this formula. I push 5, ENTER, 2 then the function
and it gives answer of 10. I also have a function that calculates the factorial,
denoted as n! Check your calculator and the manual on whether you have
this feature and how to use it. It provides another way to count the number
of sample points. When n or r for the problem is very large, the number
of sample points can become very large as well. In these cases, a formula
R
approach to counting the sample space is very valuable.
I
There are many other mathematical strategies for
C counting the number of
combinations of things in order to identify the size of the sample space. For
A
example, our combinatorial formula was not concerned
about the order or
position of the marbles—red first or blue first, it did
R not matter. However, if
the order of the marbles did matter we would have needed a different forD
mula, called a permutation. The formula for a permutation
is:
,
n
Pr =
n!
(n − r )!
A
D combinations of things
There are many mathematical formulas for counting
to help identify a sample space for large problems.
R Most of these are well
beyond our purposes in this course. However, if you are curious these would
I you could do an internet
be covered in more detail in a probability course, or
search for “counting rules.” We will see the combination
formula later when
E
we look at binomial probabilities, a form of a discrete random variable.
N
N
A Probability Problem with Survey Data
E
The General Social Survey (GSS) is a large national level survey conducted
at the National Opinion Research Center at the University of Chicago. It is an
2
annual survey that has been conducted since the 1970s and it asks questions
about political and social issues from a national sample.
We will look at some
4
data from the 2006 survey on the political views of the respondents. The
7
question was asked in such a way as to allow fixed responses that reflected
9
an ordinal scale from extremely conservative to extremely
liberal.
T
This is an example of an a posteriori probability because we did not have a
mathematical way to determine the probabilities S
for each sample point. We
need to survey a sample of the population in order to estimate these probabilities.The sample size is quite large and a number of respondents did not
give an answer for the question (177)—these responses are listed as missing.
The JMP output for this question is listed below in Figure 5.5.
Example 1. What is the probability that a respondent considers him or herself
liberal?This is the probability of SL, L, and EL:
P(SL + L + EL) = .1193 + .1209 + .0321 = .2723
K11352_Ilvento_CH05.indd 83
7/12/13 11:28 AM
84
chapter 5
Introduction to Probability
figure 5.5
table 5.8
R
I
C
2006 GSS Survey Results for Political
A Views of Respondents
Political Viewpoint
Percentage
R
Extremely Conservative(EC) D
3.86%
Conservative (C)
15.81%
,
Slightly Conservative (SC)
14.26%
JMP Output for the 2006 GSS Survey Results for Political Views of Respondents
Moderate (M)
Slightly Liberal (SL)
Liberal (L)
Extremely Liberal (EL)
38.84%
11.93%
12.09%
3.21%
A
D
R
Total
100.00%
I
E
Example 2. What is the probability
that a respondent does not consider him
or herself an Extreme Conservative?
This is the probability of NOT EC—in
N
other words, everything else.
N
P(Not EC) = P(C + SC + ME+ SL + L + EL) = .1581 + .1426 + .3884 + .1193
+ .1209 + .0321 = .9614
2 have thought of this as the complement of EC:
For the last answer we could
4
The complement of an event or sample point is everything else not in the
7 ECc. Sometimes it is easier to solve a probabilevent. It is denoted as EC’ or
ity problem by using the complement.
For our example, the probability of
9
not being an Extreme Conservative is the complement of being an Extreme
T
Conservative
S
ECc = 1 - P(EC) = 1 - .0386 = .9614
Rule 3. The Complement of an Event A is all the sample points not in
Event A. It is denoted as A’ or Ac. We solve for the complement by
subtracting the probability of Event A from one. P(A’) = 1 - P(A)
Example 3. What is the probability that the respondent tends to have a
middle-of-the-road approach to politics, defined as Slightly Conservative to
Slightly Liberal? This is the probability of SC, M, and SL:
P(SC + M + SL) = .1426 + .3884 + .1193 = .6503
K11352_Ilvento_CH05.indd 84
7/12/13 11:28 AM
chapter 5
Introduction to Probability
85
For this calculation it is easy to see that most political contests involve
holding on to the base (for example extreme conservative and conservative)
while appealing to the middle.
Example 4. What is the probability that a respondent does not consider him
or herself a moderate?This is the probability of NOT M—in other words,
everything else.
P(Not M) = P(EC + C + SC + SL + L + EL) = .0386 + .1581 + .1426 + .1193
+ .1209 + .0321 = .6116
For the last answer we could have thought of this as the complement of M:
R
I
M’ = 1 - .3884 = .6116
C
A
R
The Union of Two Events
D
The focus of this section is to expand our knowledge of probability to include
,
more ideas that are useful when dealing with the probability
of events. In this
M’ = 1 - P(M)
section we will discuss: Complementary Events; Compound Events; Union
of Events; Intersection of Events; General Additive Rule; Additive Rule for
A
Mutually Exclusive Events; Multiplicative Rule; Conditional
Probability; and
Independent Events.
D
R together, and these are
Events can be comprised of several events joined
called compound events. Compound events canI be the union of several
events or the intersection of several events.
E
The union of two events, A and B, is the event that
N occurs if either A, B, or
both occur on a single performance of the experiment. The key word in the
N
union is “or”—it is the sample points in A or B. We denote the union as:
E
The union of A and B is designated as: (A ∪ B) or we can use (A or B)
2 points that belong to
A union of events A and B consists of all the sample
A or B or both. Either condition can be satisfied,4so we use the word or in
describing the union. When listing the points or determining probabilities for
a union, we must be careful not to double count 7
the sample points that are
contained in both A and B.
9
Rule 4. To find the probability of a union between T
events A and B (i.e., that
either A or B happens). Rule 4 is also known
S as the additive rule
because the formula adds and subtracts probabilities. The probability of a union is given as:
P(A ∪ B) = P(A) + P(B) - P(A ∩ B)
In the case that A and B are mutually exclusive events, meaning A and B cannot occur at the same time, the rule simplifies to the following.
P(A ∪ B) = P(A) + P(B)
K11352_Ilvento_CH05.indd 85
7/12/13 11:28 AM
86
chapter 5
Introduction to Probability
table 5.9
The Sample Points and Probabilities Associated with a Single Roll of a Fair Die
Sample Points
Probabilities
1
2
3
4
5
6
1/6 = .1667
1/6 = .1667
1/6 = .1667
1/6 = .1667
1/6 = .1667
1/6 = .1667
Total
6/6 = 1.0
R
Note the probability of a union
depends upon the presence of the intersecI
tion (see below for the definition of an intersection). Let us return to an earC
lier example of rolling a single die to work out the union of two events. The
A are given in Table 5.9. Let Event A equal an
sample points and probabilities
odd number and let Event B
Requal values greater than 3.
Event A(odd value) = (1, 3, D
5) and the probability of A is P(A) = 3/6 = .5
Event B(values > 3) = (4, 5, ,6) and the probability of B is P(B) = 3/6 = .5
The union of A and B is equal to:
A
D
We subtract out 5 becauseRit is a value common to both events, in other
words an intersection of the two events (see below for the definition of an
I of this union is equal to:
intersection). The probability
E
P(A ∪ B) = 3/6 + 3/6 - 1/6 = 5/6 = .8333
N
N
Intersection of Two Events
E
(A ∪ B) = (1, 3, 5) + (4, 5, 6) - (5) = (1, 3, 4, 5, 6)
The intersection of two events, A and B, is the event that occurs if both A and
B occur on a single performance of the experiment. The key word is “and”—it
2 B. We denote the intersection as:
is the sample points in A and
4
7
An intersection of events A 9
and B consists of all the sample points that belong
to A and B. Both conditions must be satisfied, so we use the word and in
describing the intersection.TWhen listing the points or determining probabilities for anintersection, we must
S be careful to only count the sample points in
The intersection of A and B is designated as: (A ∩ B)
both A and B.
Continuing with the example above of a single roll of a die, we have the following events.
Event A(odd value) = (1, 3, 5) and the probability of A is P(A) = 3/6 = .5
Event B(values > 3) = (4, 5, 6) and the probability of B is P(B) = 3/6 = .5
The intersection of A and B is equal to:
(A ∩ B) = (5)
K11352_Ilvento_CH05.indd 86
7/12/13 11:28 AM
chapter 5
Introduction to Probability
87
Only the sample point 5 is in both Event A and Event B. The probability of the
intersection is given as:
P(A ∩ B) = (1/6) = .1667
When it is easy to see the sample points it is fairly easy to solve for the intersection of two events. The probability rule for an intersection is given below.
Rule 5. To find the probability of an intersection between Events A and B
(i.e., that both A and B happens). Rule 5 is also known as the multiplicative rule because the probabilities are multiplied. The probability of an intersection is given as:
R
I
And P(B ∩ A) = P(B)P(A|B)
C
A
In the case that A and B are independent events, meaning the probability of
R B, the rule simplifies to
Event A does not influence the probability of Event
the following.
D
,
P(A ∩ B) = P(A)P(B) and P(B ∩ A) = P(B)P(A)
P(A ∩ B) = P(A)P(B|A)
Rule 5 is complicated by the later component, the P(B|A). This is referred to
as the conditional probability of B given Event A.AWe read it as, “the probability of B given A.” More will be stated about conditional
probability below.
D
However, if Events A and B are independent of each other, then the formula
R There are many times
simplifies to the multiplication of the two probabilities.
that two events are independent of each other. For
I example, the second flip
of a coin is independent of the first flip—the result of the first flip in no way
E earlier, “the coin does
influences the outcome of the second flip. As we noted
not have a memory of what happened before.” This
Nis another way to say the
two flips are independent of each other.
N
E that Rule 5 (the mulLet us use the example of two flips of a coin to prove
tiplicative rule) works for independent events. Table 5.10 shows the sample
outcomes for two flips of a coin. There are four different outcomes from this
experiment, and each outcome is equally likely. 2
4
We can re-express this table as the result of the first flip and a second flip (see
7of the coin is independent
Table 5.11). We will start with the notion that each flip
of the previous flip, so we multiply the probabilities
9 through to get the probability of both events happening. The results show each combination is equally
likely, and that the sum of the probabilities for eachToutcome equals 1.00.
S
Experiment: Flip a Coin Two Times and Note If It Is a Head or Tail for Each Flip
Sample Points
Head, Head,
Head, Tail
Tail, Head
Tail, Tail
Sum of Probabilities
K11352_Ilvento_CH05.indd 87
table 5.10
Probability
.25
.25
.25
.25
1.000
7/12/13 11:28 AM
88
chapter 5
Introduction to Probability
table 5.11
Experiment: Flip a Coin Two Times and Note If It Is a Head or Tail for Each Flip
First Flip
Second Flip
Head
Head
Head
Tail
Tail
Head
Tail
Tail
Sum of Probabilities
Probability
.5*.5 = .25
.5*.5 = .25
.5*.5 = .25
.5*.5 = .25
1.000
Let Event C equal the first flip is a Head
C = (HH, HT) P(C) = .25 + R
.25 = .5
I
C
D = (HT, TT) P(D) = .25A+ .25 = .5
R
P(C ∩ D) = P(HH, HT ∩ HT, TT) = P(HT) = .25
D
We can also solve this by multiplying the probabilities of the two indepen,
dent events:
Let Event D equal that the second flip is a Tail
P(C ∩ D) = P(C)P(D) = .50A
*.50 = .25
D
Conditional Probability R
If we have knowledge thatIaffects the outcome of an experiment, the probabilities will be altered. WeE
call this a conditional probability and it is a very
important concept in many forms of analysis. Anytime we expect different
N
results based on group membership—males
versus females, treatment
group versus control group,
Nmanagement versus labor—the probabilities are
conditioned on group membership or past events. We are looking to see if
E depending upon some prior condition.
the probabilities are different
We designated the conditional probability of two events as P(A|B), which
2
means the probability of Event A is conditioned on the probability of Event B.
4 when talking about conditional probabilities,
We often use the term “given”
and the given is the second event—in this case B. In other words, P(A|B) can
7
be expressed as, “The probability of A given B.”
9
Suppose we have the roll T
of a die and we define Event A as being an even
number. And Event B is the probability the die is less than or equal to 3. The
S = P[2, 4, 6] = 3/6 = .5. Now what if we ask the
probability of A(even number)
probability of an even number given the die is less than or equal to 3, which
is Event B?
P(A|B) = P[2|(1,2,3)] = 1/3 = .333
This answer comes from the following: It is the probability of rolling a 2 out
the new or given possible space of less than or equal to 3, which is B[1,2,3].
Rule 6. To find the conditional probability that Event A occurs given Event B
has occurred we use the following formula.
K11352_Ilvento_CH05.indd 88
7/12/13 11:28 AM
chapter 5
Introduction to Probability
89
P(A|B) = P(A ∩ B)/P(B)
P(B|A) = P(A ∩ B)/P(A)
The conditional probability is the probability of the intersection of A and
B divided by the probability of B. In essence, it adjusts the probability of
the intersection of the two events to the reduced sample space of the condition (in this case, B). It is interesting to note that we need to know the
intersection to solve the conditional probability, just as we needed to know
the conditional probability to solve the probability of an intersection (see
Rule 5).
Let us look at the last example using this formula.
RIf we let Event A = [even
number on a die] and Event B = [less than or equal to 3], we need to solve
I
for the probability of the intersection of these two events and to solve for the
C
probability of Event B.
A
R
P(B) = P(1) + P(2) + P(3) = 3/6 = .5.
D
,
Using this information, we can now solve for the conditional
probability of A
P(A ∩ B) = P(2) = 1/6 = .1667
given B using the formula in Rule 6.
A
D
Conditional probability and independence are very important concepts in
R men and women, in
research. If we hypothesize salary levels differ between
essence we are saying, “given you are a female, I expect
your salary is differI
ent.” If we hypothesize that the level of response is different between a group
E
of patients taking a drug and the control group, we are saying, “given you
received the drug, your response is higher.” And,Nwe often test conditional
probability by comparing the data we observe to a hypothetical model of
N
independence to see if we can observe differences.
E
P(A|B) = P(A ∩ B)/P(B) = .1667/.5 = .333
A Probability Problem with a Single Die for You
2 to Practice
The following is a simple probability problem for you
4 to practice. The experiment involves rolling a single die and observing the number, either 1, 2, 3, 4,
5, or 6. I will present a question and I want you to7try to solve it before looking at the answer. You can use the probability rules
9 or you can use common
sense or any other method to find the sample space and the corresponding
T
probability.
In this problem we will look a...
Purchase answer to see full
attachment