You are on page 1of 39

Daniel S.

Yates

The Practice of Statistics


Third Edition

Chapter 6:
Probability and Simulation:
The Study of Randomness

6.3 General Probability Rules

Copyright © 2008 by W. H. Freeman & Company


Essential Questions
• What is the addition rule for disjoint events?
• What is the general addition rule for union of two
events?
• How do you compute P(A U B)?
• What is a joint event and joint probability?
• What is the general multiplication rule for any
two events?
• What is meant by the conditional probability P(A|
B)?
• How do you define independent events in terms
of conditional probability?
Probability Rules from 6.2
Venn Diagrams: Disjoint Events
P( A or B)  P( A)  P( B)
S

A
B
Union

P(A U B U C) = P(A) + P(B) + P(C)


Venn Diagrams:
Non-disjoint Events

B
A
A and B
Venn Diagram, Non-Disjoint, in set
notation

A  B is the set 6


Suppose set A consists
of the following

3, 4,5, 6 Notice that 6 is


included in both
and set B consists sets.

6, 7,8,9
of:

So, in order to find the set (A U B) you must subtract one 6.

( A  B) is 3, 4,5, 6, 7,8,9


Venn Diagrams:
Non-disjoint Events
P( A or B)  P( A)  P( B)  P( A and B)
S

B
A
A and B
Joint Event
• Joint Event is the simultaneous
occurrence of two events. For example,
the outcome in set of A is six and the
outcome in set of B is also six.
• The joint probability of a joint event is
P(A and B). P(A and B) is the same as
P(A ∩ B).
General Rule for Union of Two
Events
Example 1
• In a certain town, 40% of the people have brown
hair, 25% have brown eyes, and 15% have both
brown hair and brown eyes.
• A person selected at random from the town.
What is the probability that the person will have
brown hair or brown eyes? P( BH or BE)
• P( BH or BE) = P(BH) + P(BE) – P(BH ∩ BE)
= .40 + .25 - .15 = 0.5
• What is the probability that person selected does
not have brown hair or brown eyes?
• 1 – P( BH or BE) = 1 - .5 = 0.5
Two Methods for Picturing
Probabilities
• In a certain town, 40% of the people have brown hair, 25% have brown
eyes, and 15% have both brown hair and brown eyes.

Brown Hair Brown Eyes


Venn Diagram
.25 .15 .10

.5

Brown Hair
Table
Yes No Total
Brown Yes 0.15 0.25
Eyes No
Total 0.40 1.00
Independent events
• The outcome of one trial does not
influence or change the outcome of
another trial.
Multiplication Rule
• For two independent events A and B, the
probability that both A and B occur is the
product of the probabilities of the two
events.
• P(A and B) = P(A) x P(B)
• P(A ∩ B) = P(A) x P(B)
A∩B

A B
Independence
• Please note, that we can use the
multiplication rule for independent events,
to verify if two events are independent.
• If P(A and B) ≠ P(A)·P(B), then the events
are not independent.
Example 1 Continued
•In a certain town, 40% of the people have brown hair, 25% have brown eyes,
and 15% have both brown hair and brown eyes.

Brown Hair
Yes No Total
Brown Yes 0.15 0.25
Eyes No
Total 0.40 1.00

• What is the probability of selecting a person with brown hair? P(A)


What is the probability of selecting a person with brown eyes? P(B)
• P(A) = 0.40 P(B) = 0.25
• What is the probability of selecting a person with brown hair and brown
eyes? P( A and B)
• P(A and B) = 0.15
Conditional Probability

• Lets consider the situation of finding the probability of


one event under the condition that we know the results
of the other event.
• The notation for conditional probability is:
P(A| B)
The bar means “given the information that…”
So, P(A| B) reads, “The probability of event A given event B
occurs.”
Lets Consider Two Events That
May or May Not Be Independent

If we take the equation P(A ∩ B) = P(A)P(B| A) and


solve for P(B| A) we get the equation for calculating
P(B| A).
Example 1 – Independence?
•In a certain town, 40% of the people have brown hair, 25% have brown eyes,
and 15% have both brown hair and brown eyes.

Brown Hair
Yes No Total Event A = Brown Hair
Brown Yes 0.15 0.10 0.25 Event B = Brown Eyes
Eyes No 0.25 0.50 0.75
Total 0.40 0.60 1.00
• Are Events A and B independent?
• P(A)●P(B) = (0.40)(0.25) = 0.10 Since P(A and B) ≠
P(A)●P(B), Events A and B are not independent.
• Second Method – Test P(B| A) = P(B)
P( A  B) 0.15
P( B | A)    0.375 Since P(A| B) ≠ 0.40, then Events
P( A) 0.40
are not independent.
Example 1 – Conditional Probability
•In a certain town, 40% of the people have brown hair, 25% have brown eyes,
and 15% have both brown hair and brown eyes.

Brown Hair
Yes No Total Event A = Brown Hair
Brown Yes 0.15 0.10 0.25 Event B = Brown Eyes
Eyes No 0.25 0.50 0.75
Total 0.40 0.60 1.00

What is the P(A ∩ B) ?


Ans: P(A ∩ B) = 0.15
What is the probability that the randomly selected person has brown hair
given that he has brown eyes?
Ans: P(A| B) = P(A ∩ B) / P(B) = 0.15/0.25 = 0.6
Example 1 – Conditional Probability
Continued
Brown Hair
Yes No Total Event A = Brown Hair
Brown Yes 0.15 0.10 0.25 Event B = Brown Eyes
Eyes No 0.25 0.50 0.75
Total 0.40 0.60 1.00

What is the probability of the randomly selected person has brown eyes given
the person has brown hair?
Ans: P(B| A) = P(A ∩ B) / P(A) = 0.15/0.40 = 0.375
What is the probability that the randomly selected person has neither brown hair
nor brown eyes?
Ans: P( Ac ∩ Bc ) = 0.50
Example 2
Age

18-29 30-64 65 and over Total

Married 7,842 43,808 8,270 59,920

Never
13,930 7,184 751 21,865
Married

Widowed 36 2,523 8,385 10,944

Divorced 704 9,174 1,263 11,141

Total 22,512 62,689 18,669 103,870


Example – Question 1
Age
18-29 30-64 65 and over Total
Married 7,842 43,808 8,270 59,920
Never
13,930 7,184 751 21,865
Married
Widowed 36 2,523 8,385 10,944
Divorced 704 9,174 1,263 11,141
Total 22,512 62,689 18,669 103,870

• A= young (between 18 and 29)


• P(A)=?
– 22512/103870
Example 2 – Question 2
Age
18-29 30-64 65 and over Total
Married 7,842 43,808 8,270 59,920
Never
13,930 7,184 751 21,865
Married
Widowed 36 2,523 8,385 10,944
Divorced 704 9,174 1,263 11,141
Total 22,512 62,689 18,669 103,870

• B=married
• P(B)=?
– 59920/103870
Example 2 – Question 3
Age
18-29 30-64 65 and over Total
Married 7,842 43,808 8,270 59,920
Never
13,930 7,184 751 21,865
Married
Widowed 36 2,523 8,385 10,944
Divorced 704 9,174 1,263 11,141
Total 22,512 62,689 18,669 103,870

• A=is young (between 18 and 29)


• B=married
• P(A and B)=?
– 7842/103870
Example 2 – Question 4
Age
18-29 30-64 65 and over Total
Married 7,842 43,808 8,270 59,920
Never
13,930 7,184 751 21,865
Married
Widowed 36 2,523 8,385 10,944
Divorced 704 9,174 1,263 11,141
Total 22,512 62,689 18,669 103,870
• A=is young (between 18 and 29)
• B=married
• P(A | B)= (Read as “the probability of A given B”)
– 7842/59920
• This is known as a “conditional probability”
Example 2 – Question 5
Age
18-29 30-64 65 and over Total
Married 7,842 43,808 8,270 59,920
Never
13,930 7,184 751 21,865
Married
Widowed 36 2,523 8,385 10,944
Divorced 704 9,174 1,263 11,141
Total 22,512 62,689 18,669 103,870

• A=is young (between 18 and 29)


• B=married
• P(B | A)= (Read as “the probability of B given A”)
– 7842/22512
Example 2 Question 6
Age
18-29 30-64 65 and over Total
Married 7,842 43,808 8,270 59,920
Never
13,930 7,184 751 21,865
Married
Widowed 36 2,523 8,385 10,944
Divorced 704 9,174 1,263 11,141
Total 22,512 62,689 18,669 103,870

• P(A and B)= 7842/103870


22512 7842
• P(A and B)= P(A)*P(B|A) 
103870 22512
Example 2 – Question 7
Age
18-29 30-64 65 and over Total
Married 7,842 43,808 8,270 59,920
Never
13,930 7,184 751 21,865
Married
Widowed 36 2,523 8,385 10,944
Divorced 704 9,174 1,263 11,141
Total 22,512 62,689 18,669 103,870

• P(A and B)= 7842/103870


59920 7842
• P(A and B)= P(B)*P(A|B) 
103870 59920
Multiplication Rule Extended to
Several Events
Recall the general multiplication rule for the intersection of two events.

Now, consider the intersection of three events. Remember

P( A  B  C )  P(A)  P(B | A )  P(C | A and B )


Example 6.29 page 448
• Only 5% of male high school basketball, and football players go on
to play at the college level. Of these, only 1.7% enter major league
professional sports. About 40% of the athletes who compete in
college and then reach the pros have a career of more than 3 years.
• Define
– A = { competes in college} P(A) = 0.05
– B = { competes professionally} P(B|A) = 0.017
– C = { pro career longer than 3 years} P(C|A and B) = 0.40
• What is the probability that a high school athlete competes in college
and then goes on to have a pro career of more than 3 years? P(A
and B and C)
• P(A and B and C) = P(A)●P(B|A)●P(C|A and B)
= (0.05)(0.017)(0.40) = 0.00034
• SO, only 3 out of 10,000 high school athletes will have a pro-career
of more than 3 years.
Example 3 Using Tree Diagram
• Using the same probabilities from the previous
problem:
– A = { competes in college} P(A) = 0.05
– B = { competes professionally} P(B|A) = 0.017
• Suppose the probability of a few high school
athlete enter the pro’s directly from high school
(does not compete in college) is 0.0001.
P(B| Ac ) = 0.0001
• What is the probability that a high school athlete
will go on to the professional sport?
Example 3
Using the same probabilities from the previous problem:
A = { competes in college} P(A) = 0.05
B = { competes professionally} P(B|A) = 0.017
P(B| Ac ) = 0.0001 P(B|A) = 0.017
B P(A ∩ B|A) =
A 0.00085
0.05
P(A ∩ Bc|A) =
0.983 0.04915
Bc
High School P(B|Ac) = 0.0001 P(Ac ∩ B|Ac) =
B
Athletes 0.95 0.000095
P(Ac ∩ Bc|Ac) =
Ac
0.94991
0.9999
Bc
•What is the probability that a high school athlete will go on to the
professional sport?
• P(B) = P(A ∩ B|A) + P(Ac ∩ B|Ac) = 0.00085 + 0.000095 = 0.000945
Tree Diagrams
• Tree diagrams combine the addition and
multiplication rules.
• The multiplication rule is use to reach the
end of any complete branch
• The probability of any outcome is found by
adding the probabilities of all branches
that are part of the event.
A Simulation Problem
• Run a simulation for throwing two dice and
finding the probability of rolling a sum of
six.
– Step 1: State the Problem or describe the
random event.
– Step 2: State the assumptions.
– Step 3: Assign digits to represent outcomes.
– Step 4: Simulate many repetitions.
– Step 5: State your conclusions.
Assigning Probability to Events
1 2 3 4 5 6
1 2 3 4 5 6 7
2 3 4 5 6 7 8
3 4 5 6 7 8 9
4 5 6 7 8 9 10
5 6 7 8 9 10 11
6 7 8 9 10 11 12

A 2 3 4 5 6 7 8 9 10 11 12
P(A) 1/36 2/36 3/36 4/36 5/36 6/36 5/36 1/9 1/12 1/18 1/36
Solution
– Step 1: State the Problem or describe the random event.
• Find the probability of having a sum of six after a toss of two die.
– Step 2: State the assumptions.
• The toss of the dice are independent.
• The outcome (the sum) are not equally likely.
– Step 3: Assign digits to represent outcomes.
• Use 1-36 for the 36 combinations
• Number correspondence: 1 = sum of 2; 2-3 = sum of 3;
4-6 = sum of 4; 7-10 = sum of 5; 11-15 = sum of 6
– Step 4: Simulate many repetitions.
• Randint(1,36,20)→L1
• L1≥11 and L1≤15→L2
• Sum(L2)
– Step 5: State your conclusions
• The simulation resulted in approximately 30% of the rolls having a
sum of six.

You might also like