Download Probability

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Statistics wikipedia , lookup

History of statistics wikipedia , lookup

Inductive probability wikipedia , lookup

Birthday problem wikipedia , lookup

Ars Conjectandi wikipedia , lookup

Probability interpretations wikipedia , lookup

Probability wikipedia , lookup

Transcript
PROBABILITY
What does “random” mean? If one shuffles a deck of cards 1 , is there a maximum disorder?
What does order mean? If after drawing (from the top of the deck) the queen of hearts you draw
the king of hearts then the ace of hearts, can you say that the deck was well or badly shuffled?
If you are given a list of numbers, how can you tell if it was radnomly generated?
The question of randomness is crucial in probability. The other fundamental aspect of this
chapter is predictivity: probability is used to predict the outcome of experiments when we don’t
have complete control of the situation.
Part I
Probability
Exercise 1
Flip a coin (do not show your result) If it is a Head, you do part a), if it is a Tail, you do
part b)
a) Flip the coin 100 times and write the sequence of Heads and Tails, like HHT H, . . . .
b) Without flipping the coin, write a random sequence of 100 Heads and Tails, like HHT H, . . . .
Do you think that it is possible for an outside observer to say, by observing the results,
whether a given sequence obtained was truly random tossing or made up?
Exercise 2
The Monty Hall game.
Imagine you are in a TV game. There are three doors. Behind one door is a wonderful
treasure and behind the two other doors is a pile of rubbish. The speaker asks you to guess
and choose one of the doors. You say which one. This door is not opened. Then the speaker,
who knows what is behind each door, opens a door revealing a pile of rubbish. He then asks
you: ”Do you want to change your choice?”.
What should you answer? (assuming you want to win the treasure of course!)
Exercise 3
Mary has a bedspread which is green on one side and orange on the other. Every morning
she throws the bedspread on the balcony without looking on which side it falls.
In the neighbourhood, due to some nuclear hazard, chameleons are colour blind and change
to the correct colour only 3 times out of 5. (When they are wrong, they are green instead of
orange and orange instead of green.)
(1) This morning there were two chameleons on Mary’s bedspread. What is the probability
that they were both green?
(2) If they were both green, what is the probability that the bedspread was with the green
side up? (Is this question the same as the previous one?)
1
a deck is a full collection of playing cards. It usually contains 32, 36 or 52 cards. If not otherwise mentioned,
52 cards (with no jokers) will be considered. A deck is shuffled if the cards are mixed up.
1
(3) If the second chameleon is on the first chameleon.
Exercise 4
Throwing a fair
2
coin, what is the probability of a tossing a Head?
3
(1) What does this probability mean?
(2) Can this result be used to make some kind of prediction on the next toss?
(3) Can this result be used to predict the hundredth toss?
(4) Can this result be used to predict how many Tails will result if the coin is tossed a hundred
times?
Exercise 5
A simple luck game:
Two players, A and B toss a coin. A bets on Heads or Tails. If A wins, B gives him one
franc otherwise each keep their money. Then it is B’s turn. If they play fifty times each, what
are A’s and B’s probable gain? Predict the result!
Take a coin and test this result against experimental data. (No real money! keep the score
on a piece of paper!)
Does this experimental result corroborate your prediction?
Exercise 6
Rolling a dice 4 , what is the probability
(1) of scoring a 6?
(2) of scoring an even number?
5
(3) of scoring a number between 1 and 6?
(4) of scoring 7?
Exercise 7
What is the probability of getting a 5 on the next test?
What is the probability of being struck by lightening?
Exercise 8
Flip a coin 6 times, write down how many Heads and Tails you scored, and the order (written
HHTTHT for instance)
2
A fair coin is a coin which is not for cheating: both results are equally likely.
A coin is tossed or thrown. The two sides are Heads and Tails.
4
A dice is a cube with numbers one to six on its faces. It is rolled or thrown. The number facing upwards is the
score.
5
An even number: multiple of 2. An odd number: not a multiple of 2.
3
2
(1) Does this enable you to say whether your coin is fair?
(2) How many possible scores are there?
(3) What was the probability of your score (the one you actually made)?
(4) Considering only how many Heads (not considering order) what was the probability of
your score?
(5) Does the result depend on how you flip the coin?
(6) What does this mean?
(7) How can one test whether a coin is fair?
Exercise 9
Strange dice!
Three fair dice have specific numbering:
Dice A has two sides numbered 2, two sides numbered 6 and two sides numbered 7.
Dice B has two sides numbered 1, two sides numbered 5 and two sides numbered 9
Dice C has two sides numbered 3, two sides numbered 4 and two sides numbered 8. . In the
game, the first player can choose any one of the three dice. Then the second player chooses one
of the two remaining dice. They both roll and the player with the higher number wins. Which
of the three dice should player one choose? That is, which of the three dice is best?
Exercise 10
Pick a card (any card) in a shuffled deck.
(1) What is the probability of picking an Ace? What are the odds?
(2) What is the probability of picking a King? What are the odds?
(3) What is the probability of not picking a King? What are the odds?
(4) What is the probability of picking a 2? What are the odds?
(5) What is the probability of picking a Heart? What are the odds?
(6) What is the probability of picking a red card? What are the odds?
(7) Can cards be well/badly shuffled? What are the odds?
(8) How does one recognise that a deck is well/badly shuffled? What are the odds?
Definition 1 (Experiment)
An experiment is the situation in which a random event is studied.
An experiment has different outcomes.
The set of all possible outcomes is the sample space of the experiment.
An event is a specific outcome or set of outcomes.
The events of interest are the events of which we want to calculate the probability
3
Definition 2 (Probability)
The probability of an event is the ratio of the number of events of interest divided by
the number of possible events.
Definition 3 (Odds)
The odds of an event is the comparison of number of event of interest to the other
events.
Roll a dice. The event E is a scoring a four. Its probability is 61 . The odds are 1 against 5.
This is written
1
P (E) =
6
If the event E is the score, then the same probability is written
P (E = 4) =
!
1
6
Notice the equal sign in the function notation.
Exercise 11
Roll a dice twice.
(1) How many possible outcomes are there?
(2) What is the probability that the second roll was the same as the first? not the same as
the first?
(3) What is the probability of rolling a 5 then a 4?
(4) What is the probability of rolling a 5 and a 4?
(5) What is the probability of scoring a total of 11?
(6) What is the most probable sum?
(7) What is the probability of scoring a sum of 11 if the first score is 5?
Definition 4 (Independent events.)
Two events are independent if the occurrence of one does not change the probability
of the occurrence of the other.
Definition 5 (Incompatible events.)
Two events are incompatible if they cannot both happen during the same experiment.
Exercise 12
What is the lowest possible result for a probability?
What is the highest possible result for a probability?
If p is the probability that event A occurs, what is the probability that event A does not
occur?
4
If A and B are incompatible events with known probabilities, what is the probability of A or
B, written P(A or B)?
These properties are called the probability axioms. Any function satsifying these properties can be used as a probability function. These axioms will prove useful when considering
probabilities over infinite sets for instance, when counting becomes less obvious...
5
Exercise 13
Take a game like tennis, where the first player to win three sets wins the match. The two
players (A and B) bet 32 francs on the outcome of the match: the one who wins gets 64.- and
the other gets nothing.
At a certain point, A has won 2 sets and B has won 1 set. The weather becomes so stormy
that the match has to be definitely cancelled.
How can the two players share the bets in a fair way (in a way which reflects the game so
far)?
Exercise 14
Six married couples are in a room. Two people are chosen at random. Calculate the probability that:
(1) they are married.
(2) they are married together.
(3) one is a woman and the other is a man.
(4) both are women.
Exercise 15
The 2 hunters problem:
Two hunters aim at a bird. Each hunter has a probability of 0.5 of killing the bird. (This
probability is established by all their previous hunting). A bird appears, and they both shoot.
Draw the tree of all possible outcomes and calculate the probability that the bird is killed.
Add a third hunter with the same personal probability of killing the bird. What is the final
probability if they all shoot?
Exercise 16
Same exercise as above but this time the hunters are slightly less good and have a personal
probability of killing the bird of 13
What is the probability of killing the bird when two hunters shoot?
Exercise 17
At a petrol station 30% of customers buy 4-star petrol 6 , 60% buy unleaded petrol and the
remainder buy diesel. When a customer buys 4-star petrol there is a 25% chance that he/she
will fill the tank. Customers buying unleaded petrol have an 80% chance of not filling the tank.
Of those buying diesel, 70% fill their tank.
(1) What is the probability that when a car leaves the petrol station it does not have a full
tank?
(2) Given that a car leaving the petrol station has a full tank, what is the probability that the
tank contains unleaded petrol?
6
4-star petrol is the higher quality leaded petrol
6
Part II
TOOLS FOR COUNTING:
1
Fundamental principal of combinatorics
If an event can be decomposed into k elementary events, with n1 , n2 . . . nk the number of possible
occurrences of each of these events, then the total number of possible events N will be the product
of the number of possibilities of the elementary events.
N = n1 · n2 · n3 ... · nk
Definition 6 (Factorial)
The product of all consecutive numbers from n down to 1 is noted n! (pronounce ”n
factorial”.)
n · (n − 1) · (n − 2) . . . 2 · 1 = n!
Exercise 18
In how many ways can 4 people sit on 10 chairs?
Exercise 19
Check that:
n · (n − 1) · (n − 2) . . . (n − k) =
n!
(n − k − 1)!
Exercise 20
Explain the formula:
Theorem 1 (Permutations)
The number of permutations of n objects taken r at a time is written as Prn
Prn =
n!
(n − r)!
! Taking n objects r at a time is equivalent – yields the same result – to sitting r people
on n chairs.
Definition 7 (0!)
It is convenient to define
0! = 1
7
With this definition, the formula for the permutation of n objects taken n at a time is consistent
n!
n!
n!
with what we had already found. Pnn =
=
=
= n!
(n − n)!
0!
1
Exercise 21
Exercises with factorial.
Calculate:
• 5!
•
6!
6
•
120!
118!
• 1!
• 5! · 4!
5!
•
4!
Exercise 22
In the word “SCHOOL” the two ‘O’s are identical. An anagram is a permutation of the letters
of a word. Here, we do not consider whether the anagrams have a meaning in English (or in
any other language); but some permutations yield the same anagram: for instance, switch the
two O’s.
How many anagrams of SCHOOL are there?
Exercise 23
Find the number of permutations (the anagrams) of the letters of PARALLEL
Exercise 24
Find the number of three letter codes.
Exercise 25
Find the number of three digit numbers that do not have a zero.
Theorem 2 (Permutations with Repeated Items)
The number of permutations of n different items taken r at a time when each item may
be used repeatedly is
nr
2
Order and Disorder:
Exercise 26
If order counts then the “word” (a, b) is not the same as the “word” (b, a).
Consider the list {a, b, c}. Enumerate the two letter words from this list, for each of the
following conditions:
8
with repeated items
without repeated items
Considering the order
Not considering the order
Same question with the list of letters A, A, B, C
with repeated items
without repeated items
Considering the order
Not considering the order
Sometimes the order does not count. If you are interested in the probability of drawing 4
aces out of five cards, whether you draw the ace of spades first or last is not important.
Definition 8 (Combinations)
The selection of r objects from n distinguishable items, when order is ignored is
the Combination of r from n,
noted
n
n
Cr or
r
Exercise 27
Explain the formula (how do you calculate?)
Theorem 3 (Combinations)
Crn =
n!
(n − r)!r!
Exercise 28
A painter has 20 colours of paint. He mixes 5 colours.
How many different mixtures can he make?
Exercise 29
Six horses start a race. Some people prefer betting over other ways of loosing their money.
Considering that they loose their bet if they don’t give the three winning horses in the correct
order, in how many different ways can they loose money?
9
Exercise 30
From a deck of 36 cards a hand of 5 cards is drawn. In how many ways can this be done?
Example
From a deck of 36 cards a hand of 5 cards is drawn. In how many ways does at least one
king appear?
Exercise 31
(1) In how many ways is it possible to pick a hand of five cards from a deck of fifty two?
(2) In how many ways is it possible to pick a hand of 5 cards out of 52 with exactly one king?
(3) Still 5 cards out of 52. In how many ways is it possible to pick a hand of four aces?
(4) Same as above. In how many ways is it possible to draw three or more aces?
(5) Same as above. In how many ways is it possible to draw one or more aces?
Exercise 32
Drawing 5 cards from a pack of 52, how many possibilities are there of picking:
(1) the ace of spades
(2) 4 kings
(3) at least 3 hearts
(4) no diamonds
Observe that when drawing 5 cards out of 52, with, say 2 kings (and 3 non-kings), we get
· C348 – in general form Cpn · Cqm with n + m = 52 and p + q = 5 The top numbers give you
how many cards there are. The bottom numbers say how many cards are drawn.
C24
Exercise 33
(1) In how many ways is it possible to pick 6 cards from 52 with exactly one club and exactly
two hearts?
(2) In how many ways is it possible to pick 6 cards from 52 with one club or more?
(3) In how many ways is it possible to pick 6 cards from 52 with one club and two hearts?
(Notice the absence of the word “exactly” – this means one club or more and two hearts
or more.)
Exercise 34
A test has 10 questions whose answers are either YES or NO. There are (exactly) 5 questions
that have YES as an answer. How many different ways are there of giving (exactly) 5 YES
answers. (And only one is the correct one...)
10
Exercise 35
Consider the polynomial (a + b)n = (a + b) · (a + b) · (a + b) . . . (a + b)
|
{z
}
n times
Prove the following important identity:
n
(x + a) =
n
X
Cin xn−i ai
i=0
Exercise 36
Prove that Pascal’s triangle is correct. i.e., not just a trick; it really works!
11
Practice Questions
(1) Five cards are drawn from a pack of 52. What is the probability of drawing
(a) exactly 1 King?
(b) exactly 2 Kings?
(c) exactly 3 Kings?
(d) exactly 4 Kings?
(e) exactly 5 Kings?
(f) drawing exactly one pair (any pair)?
(2) There are seven musical notes: A, B, C, D, E, F, G. Five notes are chosen at random for a
(probably very peculiar) melody. A note can be chosen repeatedly.
Calculate the probability that:
(a) the tune is C, D, E, F, G in that order.
(b) the C is chosen exactly once.
(c) the first note is C and the last is G
(d) the notes F and G are not chosen.
(3) Ten cards, bearing the letters P, R, O, P, O, R, T, I, O, N are placed in a box. Three cards
are drawn at random without replacement. Calculate the probability that:
(a) the first two cards bear the same letter.
(b) the third card bears the letter P.
(c) the three cards bear the letters P, O, T in that order.
(d) the three cards bear the letters P, O, T in any order.
12
Answers
Even though the combination formulae work, a direct calculation may show better how the result
occurs.
(1) Here, first (in parentheses) the cards are picked in a specific order, then disorder is taken
into consideration by the combination factor.
The second expression uses the formulae
(a)
(b)
(c)
(d)
4 48 47 46 45
·
·
·
·
52 51 50 49 48
4 3 48 47 46
·
·
·
·
52 51 50 49 48
4 3 2 48 47
·
·
·
·
52 51 50 49 48
4 3 2 1 48
·
·
·
·
52 51 50 49 48
· C15 =
3243
≈ 0.2995
10829
=
C14 C448
C552
· C25 =
2162
≈ 0.0399
54145
=
C24 C348
C552
· C35 =
94
≈ 0.0017
54145
=
C34 C248
C552
· C45 =
1
≈ 0.000018
54145
(e) 0
3 48 44 40
352
(f) 1 ·
·
·
·
· C25 =
≈ 0.422569
51 50 49 48
833
(2)
(3)
=
=
C44 C148
C552
C113 C148 C144 C140
C552
5
1
(a)
≈ 0.0000594
7
4
6
1
≈ 0.386
(b) 5 · ·
7
7
1 1
(c) · ≈ 0.0204
7 7
5
5
(d)
≈ 0.186
7
3 2
1
2 1
1
2 1
1
· =
For the P’s:
· =
For the R’s:
· =
10 9
15
10 9
45
10 9
45
1
1
1
1
P22 + P23 + P22
Mutually exclusive:
+
+
= ≈ 0.1111
=
15 45 45
9
P210
2
(b)
= 0.2
10
2 3 1
1
(c)
· · =
≈ 0.00833
10 9 8
120
C 2 · C13 · C11
1
(d) 1 10
=
= 0.05
20
C3
Or, putting order back in: there are 3! = 6 more with order; so from question 3d to
1
1
question 3c there is a factor 6: 120
· 6 = 20
(a) For the O’s:
13
3
Venn Diagrams
Two sets A and B can be represented as follows (the rectangle is the sample space).
A
B
The intersection of two sets A and B can be represented by the following dotted region:
A
B
The union of two sets A and B can be represented by the following dotted region:
A
B
The complement of one set (A) with respect to the whole sample space can be represented
by the following dotted region:
A
B
Then it is easy to see why the following rule holds:
P (A or B) = P (A ∪ B) = P (A) + P (B) − P (A ∩ B)
Exercise 37
What is the probability of drawing a club or an eight from a pack of cards?
Exercise 38
There are 120 students in a school. 60 study English, 50 study Spanish and 20 study both
languages. Choosing a student at random, what is the probability that:
14
(1) he/she studies English or Spanish?
(2) she/he studies neither?
(3) he/she studies only Spanish?
Exercise 39
A factory makes objects in large quantities. These objects can have only two defects (called
A and B). 10% of the objects have defect A, 8% have defect B and 4% of the objects have both
defects.
If you buy one of these objects, what is the probability that:
(1) it has no defect?
(2) it has only defect A?
(3) it has both defects?
A customer buys 10 of these objects. What is the probability that:
(1) none of the objects have any defect?
(2) exactly one object has a defect?
Exercise 40
There are three boxes such that:
• Box 1 contains 10 electric bulbs out of which four are faulty.
• Box 2 contains 6 bulbs out of which one is faulty.
• Box 3 contains 8 bulbs out of which 3 are faulty.
Choosing a box at random and picking a bulb in that box at random, what is the probability
that the bulb is faulty?
15
Heads or Tails
Back to one of the first questions:
• Is the human brain capable of producing a truly random sequence?
• Is it possible to find out which of the 2 sequences was produced by a coin tossing?
• What does “truly random” mean?
A computation of the probability of runs of length at least k in a sequence of N tosses.
For a given (fixed) value of k: (k + indicates “k or more”)
Let Qn be the probability that in n tosses there will be at least one run (of either H or T)
of length at least k
In n + 1 tosses a run of at least length k can occur in either of two mutually exclusive ways:
either in the first n tosses (with probability Qn ) or only involving the (n + 1)st toss, the latter
case indicated by the following diagram (drawn for the case where the tosses end in k + H.
Analogous diagram for T.)
0
1
T
H
H
H
n−k+1
n−k+2
n−k+3
n+1
We obtain
Qn+1
k
k−1
1
1
= Qn + 2(1 − Qn−k+1 )
= Qn + (1 − Qn−k+1 )
2
2
The 2 occurs because the final run is either heads or tails with equal mutually exclusive
probability. Consider a run of heads: The (1 − Qn−k+1 ) is the probability that is has not
k
happened yet at index n − k + 1. The 12 is the probability that the next k are heads.
Let n reach N the final required length.
For n < k Qn is obviously zero.
Using already calculated results and moving up (use a spreadsheet to check this yourself):
n
1
2
3
4
5
6
...
50
...
100
k=5
0
0
0
0
0.0625
0.125
...
0.9794
...
0.9997
16
(1) The same type of question may be answered for any required run length. The situation
is that the longer the run, the more tosses are needed to reach a 50% probability. This
seems to imply that long runs occur only after many tossed. Is this true?
(2) Using a spreadsheet, how many tosses are needed for a 50% probability for
(a) a run of length at least 2?
(b) a run of length at least 3?
(c) a run of length at least 4?
(d) a run of length at least 5?
(e) a run of length at least 10?
(f) a run of length at least 100?
(3) Is your spreadsheet big enough to answer the same question for 99% probability?
17
Part III
Conditional Probabilities
If there is additional information about occurred events, it will be said that a condition is fulfilled.
Examples of such situations are: what is the probability that it rains, given that rain has
been forecast? Or: given the reliability of a medical test (e.g: an HIV 7 test), what is the
probability of being ill if the test is positive?
The probability of A given that B has occurred is noted
P (A | B)
Exercise 41
Find the probability that a family of 2 children has 2 girls – noted P (2 girls)
Exercise 42
If we see a girl, this new information changes the result. The question is now: what is the
probability that a family has 2 girls, knowing that it has one? – P (2 girls | 1 girl)
Exercise 43
If instead of seeing one girl, we are told that this girl is the eldest, what is the probability
that this family has 2 girls – P (2 girls | eldest is a girl)
Exercise 44
In an urn there are 3 white beads and 2 black ones. Two beads are chosen at random.
A is the event: “the first bead picked is black.”
B is the event: “the second bead picked is white.”
Compare P (A | B) and P (B | A)
Exercise 45
Explain and prove
Theorem 4 (Conditional Probability)
P (A | B) =
P (A & B)
P (B)
Exercise 46
Check the formula for the first example.
Check the formula for the second example.
Exercise 47
7
HIV: Human Immuno-deficiency Virus
18
At an international meeting, a survey showed that 60% of the audience understood English,
45% Italian and that 15% understood both languages.
Choosing a person at random, what is the probability that he/she understands Italian if
he/she understands English?
Exercise 48
A weather forecast office has these statistics:
Rain has been announced
Rain has not been announced
It is raining
0.21
0.04
It is not raining
0.09
0.66
How is this table to be read?
Calculate:
(1) the probability that it rains having heard that rain was announced.
(2) the probability that rain was announced if it is raining.
(3) the probability that it is not raining having heard that rain is not announced.
Exercise 49
Mass product ceramic tiles are inspected for defects. The probability that a tile has air
bubbles is 0.0015. If a tile has air bubbles the probability that it is also cracked is 0.55 while
the probability that a tile free from air bubbles is cracked is 0.0055.
What is the probability that a tile selected at random is cracked?
Exercise 50
This exercise is based on true 1998 figures about the HIV test in Geneva.
When infected people (people whom the doctors knows to be infected because of symptoms)
are tested, the result is positive with a probability of 100% – i.e: there are no false negatives.
When randomly chosen people are tested, 5% come out mistakenly as positive – i.e: there are 5%
of false positives In Geneva, 2% of the population sexually of age have HIV. (Assumption made
after large surveys).
(1) Fill in a table (as in the weather forecast exercise) with these figures.
(2) What is the probability of being infected if the test is positive?
(3) What is the probability of not being infected if the test is negative?
(4) Do you think this test is good? Does is give any certainty?
A measure of reliability could be to know
P (postive test|not infected) + P (negative test|infected)
which is information about when the test is wrong.
Given a 50% HIV-infected population, what would the figures be for the same test as above?
Find P (infected|positive test)
19
4
Independence
Definition 9 (Independent Events)
Two events are said to be independent if the occurrence of one of them does not
influence the occurrence of the other. i.e: if the occurrence of one event gives no
information on the other
We have
P (A | B) =
P (A ∩ B)
P (B)
But if the occurrence of B gives no information on A we should have P (A | B) = P (A) and
P (B | A) = P (B) i.e:
P (A ∩ B)
P (A | B) =
= P (A)
P (B)
and
P (B | A) =
P (B ∩ A)
= P (B)
P (A)
This is equivalent to
P (A ∩ B) = P (A) · P (B)
And conversely, if P (A ∩ B) = P (A) · P (B) then P (A | B) = P (A) and P (B | A) = P (B)
So we can state
A and B are independent events iff P (A ∩ B) = P (A) · P (B)
Examples of independent events have already been given (think about the probability of
tossing a Heads if the previous toss was a Tails) and how to deal with this situation was
intuitive. This formula formalises the intuition and gives a tool for proving independence.
Exercise 51
Prove that tossing a head with a coin and rolling a 3 with a dice are independent events.
Exercise 52
Roll a dice and look at the number. If event A is ”score is prime” and event B is ”score is
odd”, are events A and B independent?
Exercise 53
Suppose that we flip two independent, fair coins. Let A be the event that the coins match;
that is, both are heads or both are tails. Let B the event that the first coin is heads. Are these
independent events?
Exercise 54
Now suppose that we alter the preceding experiment so that the coins are independent, but
not fair. That is each coin is heads with probability p and tails with probability 1 − p. Again,
let A be the event that the coins match, and let B the event that the first coin is heads. Are
events A and B independent for all values of p?
20
Exercise 55
Suppose we throw two fair dice. Is the event that the sum is equal to a particular value
independent of the event that the first throw yields a particular value? More specifically, let A
be the event that the first die turns up 3 and B the event that the sum is 6. Are the two events
independent?
5
Bayes’ Theorem
Exercise 56
Prove
n
Theorem 5 (Partition of the sample space)
[
If A1 ; A2 ; . . . An are a partition of the sample space, i.e
Ai = U and ∀i, j Ai ∩Aj =
i=1
∅
then
n
X
P (Ai ) = 1
i=1
Exercise 57
Prove
Theorem 6 (Total Probability Formula)
If {Ak }nk=1 is a partition of the sample space U
then
n
X
P (B) =
P (B | Ak ) · P (Ak )
k=1
The Ak are considered as possible causes and B as a consequence. B having been observed,
what is the probability that its cause is Ak ? In other words: how can we establish P (Ak | B)
knowing P (B | Ak ) (for all k)?
Exercise 58
Another way to interpret this: knowing (for all k) the P (B | Ak ) how can a specific P (Ak | B)
be calculated?
This is
Theorem 7 (Bayes’ Theorem)
If {Ak }nk=1 is a partition of the sample space U
P (Ak | B) =
P (Ak ) · P (B|Ak )
n
X
P (B | Ai ) · P (Ai )
i=1
21
which must be proved.
Exercise 59
In a school there a 3 girls for every 4 boys. It is known that 35% of the boys smoke and only
20% of the girls smoke.
A student is picked at random. Calculate the probability that
(1) they are a smoker,
(2) if they are a smoker, they are a girl.
Exercise 60
At Hogwarts school, the probability that a student succeeds at his/her exams is 95% if he/she
works regularly, 5% if he/she works irregularly and 2% if he/she does not work at all. But also:
50% of the students work regularly, 35% work irregularly and 15% do not work at all. Picking a
student at random, calculate the probability
(1) that they succeeds,
(2) that having succeeded, they did not work at all.
22
Index
anagram, 8
Bayes’ theorem, 21
cards, 1
coin, 2
combinations, 9
combinatorics
fundamental principal, 7
deck, 1
disorder, 8
event, 4
incompatible, 4
independent, 4
factorial, 7
fair coin, 2
(see footnote), 2
heads or tails, 16
incompatible event, 4
independence, 20
independent event, 4
odds, 4
order, 8
outcome, 3
partition, 21
permutations, 7
with repeated items, 8
probability, 4
conditional, 18
theorem, 18
random, 1
sample space, 3
shuffled, 1
total probability, 21
Venn diagram, 14
23