Professional Documents
Culture Documents
Yates
Chapter 6:
Probability and Simulation:
The Study of Randomness
A
B
Union
B
A
A and B
Venn Diagram, Non-Disjoint, in set
notation
6, 7,8,9
of:
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.
.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
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 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
Never
13,930 7,184 751 21,865
Married
• 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 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.