Beruflich Dokumente
Kultur Dokumente
( 6311 ) Introduction
( 6315 ) Trees
ASSIGNMENT
Glossary
AA = { 1, 2, 3, 4 },
set group of elements
BB = { 2, 4, 6 }
if AA = { 1, 2, 3, 4 }
size of set number of elements in a set
then n(A) = 4
A U B can is written as AA or BB
2
EXERCISES
( 6311 ) Probability II
GLOSSARY
Prerequisite Reading: Sets | Probability I
TERMINOLOGY
An eexxppeerriimme
en tt is an activity with a measurable outcome.
The nnuummbbeerr of possible outcomes is the size of the sample space and is
written as nn((SS)).
and n(S) = 6
For example in the tossing of two coins, where each coin can lands either
heads ( H ) or tails ( T )
if HT means the first coin lands heads, second coin tails, then { HH, HT,
if HT means that one coin lands heads and the other tails, then { HH, HT,
ie: for the toss of a die, the event of getting an even number is the
subset { 2, 4, 6 }
The pprroobbaabbiil
li ttyy of an event EE, written as P(E), is defined by
number of ways for the event to occur n(E)
P(E) = =
number of possible outcomes n(S)
3
EXAMPLES
11 21 31 41 51 61
12 22 32 42 52 62
13 23 33 43 53 63
14 24 34 44 54 64
15 25 35 45 55 65
16 26 36 46 56 66
Note: in these outcomes, such "34" the 3 is the first die and the 4 is the
second die and that any of these pairs of numbers, such as 34, or 65, are
equally likely events. Also note that the size of this sample space is n(S) = 36
4
c. What is the probability that the sum of the numbers which appears face up is
less than or equal to 5?
5
( 6311 ) Introduction to Probability
1. Two fair coins are tossed and each coin lands either heads (h) or
tails (t).
a. What is the set of { equally likely outcomes }?
d. What is the set for the event { getting at least one head }?
6
2. Two die are tossed and the numbers which land face up are then
recorded. Determine
a. the sample space, S, of { equally likely outcomes }
7
3. Two dice are tossed and the product of the numbers which land face up
is then recorded.
a. What is the set of possible outcomes?
4. You randomly select a marble from a bag which has 3 Red, 4 Blue and 5
Green marbles and take note of the color of the marble selected.
a. Provide a set of likely outcomes
8
EXERCISES
( 6314 ) Conditional Probabilities
GLOSSARY
the probability of "second card is red" given that the "first card is
26
black" would equal
51
since after drawing the first black card, you would have 26 red cards
in a deck that now has 51 cards
the probability of "second card is red" given that the "first card is
25
red" would equal
51
since after drawing the first red card, only 25 red cards would
remain in a deck that now has 51 cards
P(A ∩ B) P(A ∩ B)
Note that P(A | B) = and that P(B | A) = and they
P(B) P(A)
are not equal.
The relation between P(A | B) and P(B | A) is described by Bayes
Theorem
P(A ∩ B)
The equation P(A | B) = can be rewritten as
P(B)
9
EXAMPLES
SOLUTION:
P(A AND B) 3
a. P(A | B) = =
P(B) 7
P(A AND B) 3
b. P(B | A) = =
P(A) 4
2. A bag has 10 marbles, of which 3 are red and 7 are blue. Two marbles
are randomly selected, without replacement, from the bag.
The phrase "without replacement" means that no marbles are returned
to the bag.
What is the probability of getting a red marble on the first
selection and a red marble on the second selection?
P(R AND R ) = P ( R ) P ( R | R )
11 22 11 22 11
1
P("first marble is red" AND "second marble is red") =
15
10
3. What does A | B mean graphically?
A ∩ B
A | B =
B
A ∩ B
B | A =
A
4. A man and woman have two children. What is the probability that
a. both children are girls?
b. both children are girls, given that one is a girl?
c. both children are girls, given that at least one is a girl?
11
( 6314 ) Conditional Probabilities
b. P(B | A)
c. P(A ∩ B)
d. P(A U B)
4. A medical clinic has 7 men and 3 women waiting to be seen. If 3 patients are
chosen at random, what is the probability that at least one of these is a
woman?
12
EXERCISES
( 6315 ) Trees
13
EXAMPLES
14
2. A new test for Dislexia has a reliability which goes as follows:
for those with dislexia, the test shows positive 85% of the
time
for those without dislexia, the test shows positive ( FALSE
POSITIVE ) 5% of the time
SOLUTION:
a. The tree diagram for this situation is
c. The probability that the test will show positive on a person who
is not dislexic is 4.5%
c
since, P( p AND D ) = 4.5%
15
( 6315 ) Trees
1. In one particular school it is found that 70% students walk to school and
30% drive their car.
Of the students who walk, 40% of them exercise by running and 60% swim.
Of the students who drive, 70% of them exercise by running and 30% swim.
Draw a tree diagram for this, the answer the following ..
If a student were randomly selected from this school,
a. what is the probability that this student drives to school and swims?
ie determine P( Drive AND Swim )
b. what is the probability that this student runs for exercise?
2. At a party, a person has three pennies of which one has two heads.
The three pennies are put in a bag and one is randomly selected then tossed
twice.
Draw a tree diagram that describes the possible outcomes
3. The fastfoods store FASTFOOD! has a hiring policy which runs as follows.
Initially all new employees are given ordinary labour tasks,
but at the end of the first three months
40% of them are put into management training
50% of them are kept on the ordinary labour tasks
10% are fired
At the end of the next three months the policy is,
of the management trainees: 30% are promoted to management, 60% are put
to ordinary labour and 10% are fired.
of the ordinary labourers: 10% are promoted to management, 80% kept at
ordinary labour and 10% are fired.
If a new employee is randomly selected, use a tree to help you determine the
probability that
a. this person will be promoted to management
b. this person will end on in ordinary labour
c. this person will be fired
16
EXERCISES
( i6316 ) Bayes Theorem
GLOSSARY
This theorem describes how you can calculate P( B | Ai ) from P( Ai | B ) and vice-versa.
Here is how it works: if a sample space can be divided up into n mutually exclusive sets, Ai then
Ai ∩ Aj = Ø whenever i ≠ j and
S = A1 + A2 + .. + An and therefore
P(S) = P( A1 ) + P( A2 ) + .. + P( An ) = 1
then P( Ai ) P( B | Ai ) = P( B ) P( Ai | B ) for i = 1, 2, .. n
The TREE allow you to calculate things like P(A1 | B) and P(A2 | B)
The INVERSE TREE allows you to calculate things like P(B | A1)
17
EXAMPLES
1. A small town, called WidgetVille, has two factories which produces widgets.
Every day, Factory 1 produces 7 Red and 8 Blue widgets and Factory 2 produces 5 Red and 4 Blue
widgets.
Suppose you are walking down the street in WidgetVille and come upon a widget.
What is the probability that this widget was produced by Factory 1 given that it is red?
Solution: If we
R = Red widget and F1 = Factory 1 ..
F1 ( 7 R, 8 B ) represent factory 1 with its 7 Red and 8 Blue widgets
F2 ( 5 R, 4 B ) represent factory 1 with its 5 Red and 4 Blue widgets
P( F1 | R ) = probability of it being factory 1 given that the widget is Red
P( R | F1 ) = probability of getting a Red widget given that it was produced by factory 1
We need to determine P( F1 | R )
We know that WidgetVille produces 24 widgets a day and that of these factory I produces 15.
15 7
Hence we know that P( F1 ) = 24 and P( R | F1 ) = 15
The equation P( F1 ) P( R | F1 ) = P( R ) P( F1 | R )
P( F1 )P( R | F1 )
can rearranged to give P( F1 | R ) = P(R)
15 7 7
We know the numerator P( F1 ) P( R | F1 ) = 24 15 = 24
1
We know the denominator P( R ) = 2 , since WidgetVille produces 24 widgets a day and 12 are red.
7 1 7
We conclude that P( F1 | R ) = 24 ÷ 2 = 12
18
1
We could also show that P(R) = 2 in a number of other ways.
1
A. We could use P( R ) = P( F1 ) P( R | F1 ) + P( F2 ) P( R | F2 ) = 2
which we know since
15 7 9 5
P( F1 ) = 24 P( R | F1 ) = 15 P( F2 ) = 24 P( R | F2 ) = 9
15 7 9 5 12
and therefore P( R ) = 24 15 + 24 9 = 24
19
2. In a small school of 30 students, with 18 females and 12 males
of the females: 6 cycle and 12 walk to school
of the males: 9 cycle and 3 walk to school
What is the probability of getting a student who is female given that the student cycles to school?
as well as
to get
20
3. A new test for Dislexia has a reliability which goes as follows.
for those with dislexia, the test shows positive 85% of the time
for those without dislexia, the test shows positive ( FALSE POSITIVE ) 5% of the time
If 10% of the population has dislexia and a person has tested negative for dislexia, what is the
probability that
this person has dislexia?
this person does not have dislexia?
Solution: We are looking for P( has Dislexia | tested negative ) and P ( does not have Dislexia |
tested negative )
We will use the diagram to assist us
P( Dc AND n ) 0.855 57
We could also deduce this from P( Dc | n ) = P( n ) = 0.87 = 58
21
( 6316 ) Bayes Theorem
For each of the following, it is expected you will draw a tree diagram which
supports your work.
3. A factory produces widgets with two machines. Machine A produces 70% of all
the widgets,
and of the factory widgets 30% of machine A widgets and 20% of machine B are
defective.
A widget is found and it turns out to be defective.
a. What is the probability of getting a defective widget?
4. A test reads positive 99% of the time for a disease on a person who actually
has this disease.
However, 98% of the time, the test reads negative when a person does not
have the disease.
If 1% of the population has this disease, and a randomly selected person is
tested positive for this disease
a. what is the probability that the test will read positive?
b. what is the probability that this person actually has this disease?
22
5. You have two coins. One is fair and the other has a probability of 0.8 of
coming up heads.
One of these coins is randomly selected and then tossed.
a. What is the probability that it will come up heads?
b. What is the probability that the fair coin was tossed if it came up
heads?
6. MarblesVille has produced a new marble factory which has three machines, 1,
2 and 3, which produce marbles.
Each day,
machine 1 produces 3 white and 5 blue marbles
machine 2 produces 4 white and 2 blue marbles
machine 3 produces 6 white and 4 blue marbles
a. Draw a Venn diagram which displays the daily marbles produced by each
of the three machines
b. Draw a Tree diagram which displays the daily marbles produced by each
of the three machines
keeping in mind that the probability of what each machine produces is
determined by their daily output, as well as
the conditional probabilities that the marble will be of a specific
color given that it was produced by a certain machine.
c. If a marble, that is produced by this factory, is selected at random,
what is the probability that
i. it will be a White marble
ii. it will be a Blue marble
d. Draw an inverse tree diagram which displays the probability that the
machine
will be produced by certain machine given that it is a specific color.
e. One day, while visiting this marble factory, you come upon a blue
marble.
What is the probability that this marble was produced by machine 2?
7. At a party, a person has three pennies of which one has two heads.
The three pennies are put in a bag and one is randomly selected then tossed
twice.
If this penny comes up heads twice, what is the probability that this penny
is fake?
Draw a tree diagram which supports your answer.
23
( 6318 ) Poker Hands
A ♠ 2 ♠ 3 ♠ 4 ♠ 5 ♠ 6 ♠ 7 ♠ 8 ♠ 9 ♠ 10 ♠ J ♠ Q ♠ K ♠
A ♥ 2 ♥ 3 ♥ 4 ♥ 5 ♥ 6 ♥ 7 ♥ 8 ♥ 9 ♥ 10 ♥ J ♥ Q ♥ K ♥
A ♣ 2 ♣ 3 ♣ 4 ♣ 5 ♣ 6 ♣ 7 ♣ 8 ♣ 9 ♣ 10 ♣ J ♣ Q ♣ K ♣
A ♦ 2 ♦ 3 ♦ 4 ♦ 5 ♦ 6 ♦ 7 ♦ 8 ♦ 9 ♦ 10 ♦ J ♦ Q ♦ K ♦
If a deck of such cards were shuffled and you were dealt five cards,
verify that the probability of being dealt
24
( 6319 ) Open Ended Questions
1. You have two coins. One coin has 2 tails and the other has a heads and a tails.
If you selected one coin at random and flipped it, what is the probability that
it will land heads up?
2. The outside of a solid white cube is painted black and then cut into 64 equal
cubes.
If you scattered these cubes on the floor and randomly selected one of them,
what is the probability that the cube you selected would have a black side
facing up?
3. In a school with 128 students, 45 of the students have a cat, 75 have a dog and
34 have both a cat and a dog.
If a student is randomly selected, what is the probability that
a. the student has a cat or a dog?
b. the student has neither a cat or a dog?
25
5. A school has 200 students of whom 90 are male. It is known that 40% of the
students walk to school.
If a student is selected at random from this school, what is the probability
that this student
a. is a male or a student who walks to school?
b. is a female or a student who does not walk school?
8. Suppose that 15% of the population is left-handed. Find the probability that in
a group of 50 individuals there will be
a. at most 10 left-handers
b. at least 5 left-handers
c. between 3 and 5 left-handers inclusive
d. exactly 5 left-handers
You may want to use a Spread-Sheet to solve this.
26
( 631 ) ASSIGNMENT
27
3. A Lupis test reads positive 100% of the time for those who actually
have Lupis and 5% for those who do not.
If 1% of the population has this disease, and a randomly selected
person is tested positive for Lupis
a. what is the probability that the test will read positive?
b. what is the probability that this person will have Lupis given
that the test reads positive?
c. what is the probability that this person will not have Lupis
given that the test reads positive?
5. A bag has 7 Red and 3 Blue balls. Five are randomly selected without
replacement.
Determine the probability of selecting
a. 2 Red balls
b. 4 Red balls
28