Nothing Special   »   [go: up one dir, main page]

1.2 Conditional Probability

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

Statistics 213 – 1.

2: Conditional
Probability
© Scott Robison, Claudia Mahler 2019 all rights reserved.

Objectives:
Be familiar with the concept of conditional probability and be able to apply and manipulate the conditional
probability formula

Create and use a contingency table to find specific probabilities

Create and use a tree diagram to find specific probabilities

Prove independence/dependence using probability

Motivation:
In the 1.1 notes, we looked at some basic probability problems where no conditions were assumed apart from
those conditions that defined the experiment.

Examples (from Unit 1)

If I flip a fair coin three times in a row, what is the chance that I will get three heads?

How likely are the Dodgers to win the World Series this year?

While problems such as these might be interesting to us in many situations, there are other situations where we
may be interested in calculating the probability of something occurring given some certain conditions.

Examples

If I flip a fair coin three times in a row and the first coin comes up heads, what is the chance that I will get
three heads in total?

Assuming that the Dodgers win the National League Championship Series (NLCS) this year, how likely are
they to win the World Series?

These probabilities rely in part on additional information or conditions (the first coin being a “heads,” the Dodgers
winning the NLCS) and are what we call conditional probabilities. In this set of notes, we’ll discuss rules for
calculating conditional probabilities and some techniques that can help make these calculations more intuitive!
1
Introducing Conditional Probability
A conditional probability is a probability that reflects additional knowledge that affects the outcome of an
experiment. This knowledge can be thought of as information that we’re “given.”

Suppose we had two events, A and B, in a sample space S. P(A|B) is read as “the probability of A given B” and is
calculated as:

With a conditional probability, the probability of event A is conditional upon another event occurring (event B).
Because of this, we actually “restrict” our sample space…it is no longer all of S, but now just B, the “given”
information we have. So now, P(A|B) is the ratio of n(A ∩ B) over n(B).

Example 1.2.1
Suppose we were to toss two fair coins. Define A as “observing exactly two heads”
and B as “observing at least one head.” The following Venn diagram shows the
samples space and the events A and B .

1. What is P(A)?

2. What is P(A|B)?

Notice that the condition B “restricts our sample space” from S to B.

2
Example 1.2.2
In a survey of 100 people, 57 people said that they owned a cat. Of those 57 people,
40 were female (that is, 40 people owned a cat and were female). We select one
person at random from this survey. Given that the selected person owns a cat, what is
the probability that they are female?

“Given” vs. “And” (Conditional vs. Intersection)


When first learning about conditional probability, it might be tough to distinguish between a conditional probability
(such as P(A|B)) versus an intersection (such as P(A ∩ B) ). It is important to note that they have different
meanings!

P(A ∩ B) is the probability of an element belonging to both A and B without restricting our overall sample
space to either A or B.

P(A|B) is the probability of an element belonging to A after restricting our sample space to B.

P(B|A) is the probability of an element belonging to B after restricting our sample space to A.

Examples

“The probability of a college student owning both a laptop computer and a desktop computer is estimated to
be 0.24.” This is telling us: P(laptop ∩ desktop) = 0.24

“If a college student owns a laptop computer, the probability that they also own a desktop computer is 0.32.”
This is telling us: P(desktop|laptop) = 0.32

“Knowing that a college student owns a desktop computer, the probability that they also own a laptop
computer is 0.20.” This is telling us: P(laptop|desktop) = 0.20

Some common conditional probability keywords include if, given, assuming, knowing…

3
Strategies for Conditional Probability Problems
Before we do some more examples with conditional probability, let’s first discuss two different but related
techniques that can help us organize our thoughts when solving a conditional probability-related problem.
Depending on what probabilities you know in a given problem, constructing a contingency table or drawing a tree
diagram (or both!) can help you understand the problem and make it easier to make the correct calculations.

Contingency Tables
A contingency table is useful if you have two events, A and B, and want to organize the probability relationships
between the two events. A common way to construct a contingency table for events A and B is as follows:

You can also construct the table so that it contains probabilities rather than numbers (counts) of elements in each
cell/margin.

Contingency tables are a good technique to use if you have information about one or more “and” (intersection)
probabilities and need to find conditional probabilities.

4
Example 1.2.3
A study was done to examine the relationship between peanut (PN ) allergies and
tree nut (T N ) allergies. In a sample of 200 people, the researchers found that 150
people had PN allergies, 26 had T N allergies but not PN allergies, and 78 people
had both.

1. Construct a contingency table for PN and T N allergies.

2. Find P(T N ∩ PN) .

3. Find P(PN C ) .

4. Find P(T N C |PN C ).

5
Example 1.2.4

In a study examining the relationship handedness and eye-dominance, 35% of right-


handers were left-eye dominant and 43% of left-handers were right-eye dominant.
74% of people in the study were right-handed.

1. Construct a contingency table for handedness and eye-dominance.

2. What is the probability that a randomly selected person from this study is left-
handed and left-eye dominant?

3. Suppose a randomly selected person from this study is right-eye dominant.


What is the probability they are left-handed?

6
Tree Diagrams
A tree diagram is another way of organizing the probability relationships between two events. Tree diagrams are a
good technique to use if you have information on one or more “given” (conditional) probabilities and need to find
“and” (intersection) probabilities. If you have two events, A and B, a common method for constructing a tree
diagram is as follows:

Step 1: If B is a condition for A, begin by constructing a branch for B and a branch for BC .

Step 2: For each branch constructed in step 1, construct branches for the conditional probabilities of A and AC .

To find an “and” (intersection) probability for two events (A and B, AC and B, etc.), multiply the probabilities along
the branch of interest. This is actually just a manipulation of the formula for conditional probability!

P(A∩B)
P(A│B) = ...rearrange to get... P(A ∩ B) = P(A│B)P(B)
P(B)

Here is a general picture of the setup for a basic tree diagram:

7
Example 1.2.5

Suppose the probability of carrying a certain disease is 0.012. A particular procedure


has been developed to test for the presence of this disease. The test shows that a
person is either “positive” for the disease or “negative” for the disease. If an individual
has the disease, the test shows “positive” with a probability of 0.98. However, if the
individual does not have the disease, the test shows “positive” with a probability of
0.05.

1. Construct a tree diagram for this scenario.

2. What is the probability that a randomly selected person is carrying the disease
and has a test that shows “negative” for the disease?

3. What is the probability that a randomly selected person will test “negative” for
the disease?

8
Independence
In probability, two events A and B are independent if the occurrence of A does not affect the probability of B
occurring, and vice-versa. There are two different ways we can prove independence using probability. If you ever
need to do so, either one of these methods is fine (one may be easier than the other, depending on what you know
in the situation of interest).

A and B are independent if:

or…

A and B are independent if:

Note that independence cannot necessarily be determined using a picture (such as a Venn diagram). You must
use one of the above calculations in order to prove independence!

Note: if A and B are independent, then so are A and BC ; AC and B; AC and BC .

Example 1.2.6

The following contingency table shows the probabilities for the peanut (PN ) and tree
nut (T N ) allergy study described in Example 1.2.3. Is having peanut allergies
independent of having tree nut allergies? Show why/why not.

PN not PN Totals

TN 0.39 0.13 0.52

not TN 0.36 0.12 0.48

Totals 0.75 0.25 1.00

9
Example 1.2.7

In a certain university, 24% of the students are first-year students (the rest are, of
course, non-first-year students). If a student is in their first year, there is a 75%
chance that they live on campus. If a student is not in their first year, there is only a
34% chance that they live on campus. The following tree diagram displays this
information.

1. Use the tree diagram to construct a contingency table for this scenario.

10
2. If a randomly selected student lives on campus, what is the probability that they
are not in their first year?

3. Is being a first-year student independent of living on campus? Show why/why


not.

11

You might also like