Download 1 Axioms of probability, disjoint and independent events 2

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

Birthday problem wikipedia , lookup

Ars Conjectandi wikipedia , lookup

Probability interpretations wikipedia , lookup

Probability wikipedia , lookup

Transcript
Practice for Exam 1
1 Axioms of probability, disjoint and independent
events
1. Suppose P (A) = 0.4, P (B) = 0.5.
(a) If A and B are independent, what is P (A ∩ B)? What is P (A ∪ B)?
(b) If A and B are disjoint, what is P (A ∩ B)? What is P (A ∪ B)?
2
Permutations and Combinations
2. Roll a die ten times. What the probability of getting exactly four 6’s? (For example,
this occurs if you roll 1623645626).
3. In tossing 4 fair dice, what’s the probability of tossing at most one 3?
4. How many anagrams of MISSISSIPPI are there?
11
Answer. 1,4,4,2
.
5. The price of a certain stock changes each day at random: it goes up $1 with probability
0.6 and down $1 with probability 0.4. Assuming that changes on different days are
independent,
(a) what’s the probability that it will be back to its starting price after 10 days?
Solution. The stockmust go up 5 times and down 5 times for this to happen.
The probability is 10
(0.6)5 (0.4)5 .
5
(b) what’s the probability that it will be up by at least $1 after 4 days?
6. What is the coefficient on x4 y 6 in the product (2x + 3y)10 ?
Solution. This uses the binomial formula. The answer is
10
4
24 36 .
3 The multiplication rule/miscellaneous counting problems
7. A hand of poker consists of 5 cards randomly drawn from a deck of 52 cards. What’s
the probability of getting 4-of-a-kind? (There are 13 kinds and 4 suits. Each card has
a suit and a kind for a total of 4x13=52 cards).
8. A 5-card hand is dealt from a well-shuffled deck of 52 playing cards. What is the
probability that the hand contains at least one card from each of the four suits?
9. You are dealt 6 cards from a standard deck of 52 cards. What is the probability that
you get a four-of-a-kind and two cards that don’t match. For example, you could get 4
Kings, a 10 and a 3. But you couldn’t get 4 Kings and two 10s.
10. A licence plate consists of 3 letters followed by 3 numbers (for example XTY438). If
no letter can be used more than once how many licence plates are there? The numbers
can be repeated. For example XTY004 is valid.
Answer. 26 · 25 · 24 · 103 .
11. In a bridge game, each of 4 players gets 13 cards drawn at random from an ordinary
deck of 52 cards. What is the probability that two players each have 2 aces? There are
4 aces in the deck.
12. A certain group of 20 people consists of 7 doctors, 3 lawyers and 10 bankers. They are
all seated at random around a round table.
(a) What is the probability that the 3 lawyers sit next to each other?
Solution. 19! is the number of ways to seat 20 people around a round table (we
consider two seatings to be the same if they only differ by a rotation). There are
16! ways to seat the non-lawyers (up to rotation), 17 ways to pick a spot for the
three lawyers and 3! ways to order the lawyers. So the answer is:
17! ∗ 3!
.
19!
(b) What is the probability that no doctor sits next to another doctor?
Solution. There are 12! ways to seat the non-doctors (up to rotation). We choose
7 positions
(out of 13) to seat the doctors so that no two of them sit together (there
are 13
choices). Then we have to decide which doctor sits where. There are 7!
7
choices. So the answer is:
12! 13
7!
12!13!
7
=
.
19!
6!19!
13. A school play has 4 distinct male roles and 5 distinct female roles. If 7 men and 8
women audition for the play, how many possible casts are there? What if Bob and
Alice refuse to be in the play together?
Solution. The number of possible casts is 74 4! 85 5! (choose 4 men, then assign them
roles, choose 5 women, then assign them
roles).7 The number of ways that Alice and
6
Bob can both be in the play is 4 ∗ 3 3! ∗ 5 ∗ 4 4! (choose a role for Bob, then roles
for the other males, then a role for Alice, then a role for the other females). So if Alice
and Bob refuse to be in the play together the number of possible casts is
7
8
6
7
4!
5! − 4 ∗
3! ∗ 5 ∗
4!.
4
5
3
4
4
Urn problems
14. Urn #1 contains 3 black and 4 red balls. Urn #2 contains 5 black and 2 red balls. A
ball is chosen at random from urn #1. A ball is also chosen at random from urn #2.
What’s the probability the two balls have the same color?
15. An urn contains 100 balls: 25 red, 25 blue, 50 green. Select 12 balls at random from
the urn.
(a) Assume that the selection is done without replacement. Compute the probability
that 3 red, 4 blue ball and 5 green balls are selected.
Solution.
25 25 50
3
4
5
100
12
.
(b) Assume the same question if the selection is done with replacement.
Solution.
3 4 5
12
25
25
50
.
3, 4, 5
100
100
100
(c) An urn contains 10 red balls and 5 blue balls. You grab 4 balls at random (without
replacement). What is the probability that you grabbed 2 red balls and 2 black
balls?
Solution.
10 5
2
2
15
4
5
.
Inclusion/Exclusion and union problems
16. Suppose you draw 8 cards out of a regular deck of 52 cards. What is the probability
that you will have at least 6 cards of the same suit?
Solution. There are four suits. Let us number them 1,2,3,4. Let Ei be the event that
we get at least 6 cards of suit i. These sets are disjoint, have the same probability, and
the question asks for the probability of their union. So
P (∪4i=1 Ei ) = 4P (E1 ).
Now P (E1 ) = P (F6 ) + P (F7 ) + P (F8 ) where Fi is the event of getting exactly i cards
of suit 1. Also
39 13
P (Fi ) =
So the answer is
13
6
4
39
2
+
i
13
7
52
8
8−i
52
8
39 +
.
13
8
.
17. In a certain city, 50% of the people speak Spanish, 45% speak English, 40% speak
French, 15% speak Spanish and English, 15% speak English and French, 10% speak
Spanish and French. If everyone speaks at least one of these three languages then what
percentage of people speak all three?
Solution. By inclusion-exclusion
1 = 0.5 + 0.45 + 0.4 − 0.15 − 0.15 − 0.10 + x
(where x is the percentage that speak all three. Solving for x, we obtain
x = 1 − 0.5 − 0.45 − 0.4 + 0.15 + 0.15 + 0.10.
18. Suppose you are dealt 5 cards at random from an ordinary deck of 52 cards. What’s
the probability of getting exactly four face cards? A face card is a king, queen or jack.
There are 12 face cards in the deck.
(12)(40)
Solution. 4 52 1
(5)
19. Suppose that E1 , E2 , E3 , E4 are four events such that P (Ei ) = 0.4 (for all i), P (Ei ∩
Ej ) = 0.3 (for all i 6= j), P (Ei ∩Ej ∩Ek ) = 0.1 if i, j, k are distinct and P (E1 ∩E2 ∩E3 ∩
E4 ) = 0. What is P (E1 ∪ E2 ∪ E3 ∪ E4 )? Answer. 4 · (0.4) − 6(0.3) + 4 · 0.1 − 0 = 0.2.
20. Suppose you draw 9 cards out of a regular deck of 52 cards. What is the probability
that you will have at least 7 cards of one suit? For example, you could get 7 hearts and
one diamond or 6 spades, 1 club and 1 heart. (There are 4 suits: hearts, diamonds,
clubs and spades. There are 13 cards of each suit.)
39
4(13)(39)+4(13
+4(13
8 )( 1 )
9)
.
Answer. 7 2
52
(9)
21. Suppose you draw 8 cards out a regular deck of 52 cards. What is the probability that
you get at least one 4-of-a-kind? (For example, this event occurs if you draw 4 Jacks
and 4 Kings or if you draw 4 Jacks, a 2, a 3, a 4 and a 5.) Hint: Let Ei be the event
that you get 4 cards of kind i (i ∈ {1, . . . , 13} since there are 13 kinds). Compute
P (∪13
i=1 Ei ) using inclusion-exclusion.
Solution. Let Ei be the event that you get 4 cards of kind i (i ∈ {1, . . . , 13} since
there are 13 kinds). Then
X
X
P (∪i Ei ) =
P (Ei ) −
P (Ei ∩ Ej )
i
i<j
by the inclusion-exclusion formula (note that Ei ∩Ej ∩Ek is empty if i, j, k are distinct).
Now
P (Ei ) =
48
4
52
8
and
P (Ei ∩ Ej ) =
1
.
52
8
So the answer is
13
P (∪i Ei ) =
1
48
4
52
8
13 1
−
52 .
2
8
Alternative solution. You can answer this problem without using inclusion-exclusion.
To do so, let A be the event of getting exactly one 4-of-a-kind and B the event of getting
exactly two 4-of-a-kinds. Then P (∪i Ei ) = P (A ∪ B) = P (A) + P (B) since A and B
are disjoint. Now
P (B) =
13
2
52 .
8
To see this, observe that the sample space consists of all ways of selecting 8 cards
from 52 (this explains the 52
in the denominator) and the number of ways to get 2
8
4-of-a-kinds is the number of ways to choose 2 kinds amongst 13 or 13
. Also,
2
13 48
− 12
4
P (A) =
.
52
8
Why? Well, there are 13 ways to choose the kind that will be the 4-of-a-kind. Then
you have to choose 4 more cards from amongst the 48 that are left (and there are 48
4
to do that). However, you should not choose 4 cards of a kind again; so we have to
subtract the 12 ways that you can select another 4-of-a-kind. So the final answer is
13 48
− 12 + 13
4
2
.
P (A ∪ B) =
52
8
6
Conditional expectation
22. Of the patients in a hospital, 20% of those with, and 35% of those without myocardial
infarction have had strokes. If 40% of the patients have had myocardial infarction,
what percent of the patients have had strokes?
Solution. Let M denote the set of patients with myocardial infarction and S the set
of patients who have had a stroke. Then P (S|M ) = 0.2, P (S|M c ) = 0.35, P (M ) = 0.4.
The question asks for P (S) =?. Well
P (S) = P (S∩M )+P (S∩M c ) = P (S|M )P (M )+P (S|M c )P (M c ) = 0.2∗0.4+0.35∗0.6 = 0.08+0.21 =
23. If 7% of the population are women who own dogs and 28% of the population own dogs,
then what percentage of all dog-owners are women?
Solution. Let W stand for women and D for dogowners.
0.07, P (D) = 0.28. We want to know P (W |D).
P (W |D) =
P (W ∩ D)
= 0.7/0.28 = 1/4.
P (D)
Then P (W ∩ D) =
24. There are 3 cards in a hat. One is black on both sides, one is red on both sides and one
is black on one side and red on the other side. A card chosen at random and placed
(at random) on a table so that only one side is showing. Given that the side showing
is red, what is the probability that the other side is also red?
Solution. Let F denote the event that the side showing is red, RR the event of getting
the red-red card, RB the event of getting the red-black card and BB the event of
getting the black-black card. Then
P (RR|F ) =
1/3
1/3
2
P (RR ∩ F )
=
=
= .
P (F )
P (RR) + 1/2P (RB)
1/3 + 1/6
3
25. John takes the bus with probability 0.2, the subway with probability 0.3, and catches
a ride with probability 0.5. He is late 20% of the time when he takes the bus, 30% of
the time when we takes the subway and 50% of the time when we gets a ride from his
neighbor. What is the probability that he is late for work?
Solution. (0.2)(0.2) + (0.3)(0.3) + (0.5)(0.5) = 0.04 + 0.09 + 0.25 = 0.38.
26. Consider the following game. Roll a 6-sided die. If it lands on six, you win outright. If
it lands on one, you lose. If it lands on 2, 3, 4, or 5 then you roll the die an additional
2, 3, 4, or 5 times respectively. If it lands on a 6 at least one time, then you win.
Otherwise you lose.
(a) What are your chances of losing given that you rolled a 3 on the first roll?
(b) What are your chances of winning?
7
Recursive conditional probability problems
27. Alice and Bob are playing a game in which they take turns flipping a coin. The coin
lands on heads with probability 1/3. Alice goes first. Alice wins if she flips heads before
Bob flips tails. What’s the probability that Alice wins?
Answer.
∞
X
k=0
8
(2/3)k (1/3)k (1/3) = (1/3)
1
= (3/7).
1 − 2/9
Bayes
28. There are 2 coins in a box. The first lands on heads with probability 1/2. The second
lands on heads with probability 1/3. You choose a coin at random (each possibility
being equally likely) and flip it once. It comes up heads.
(a) What is the probability that it was the first coin?
Solution. Let F denote the first coin, S the second coin, and H landing on heads.
We want to know P (F |H).
P (F ∩ H)
P (H|F )P (F )
=
P (H)
P (H|F )P (F ) + P (H|S)P (S)
1/2 ∗ 1/2
1/2
3
=
=
= .
1/2 ∗ 1/2 + 1/3 ∗ 1/2
1/2 + 1/3
5
P (F |H) =
(b) What is the probability that it will land on heads on the next flip?
Solution.
P (HH|H) = P (HH|F, H)P (F |H) + P (HH|S, H)P (S|H) = 1/2 ∗ 3/5 + 1/3 ∗ 2/5.
29. The police hold 10 people for questioning in burglary. They know there are 2 burglars
among the 10 people. So they give each person a lie detector test. The test is accurate
with probability 0.9. This means that if the test is administered to a guilty person,
it will say they are guilty with probability 0.9. If it is administered to an innocent
person, it says they are innocent with probability 0.9. Suppose that a person, selected
at random from amongst the 10, takes the test and it says “guilty”. What is the
probability that he or she truly is guilty?
Solution. Let G be the event that the person is guilty and T the event that the test
says ‘guilty’. Then
P (G|T ) =
0.9 · 0.2
0.18
18
P (T |G)P (G)
=
=
=
≈ 2/3.
c
c
P (T |G)P (G) + P (T |G )P (G )
0.9 · 0.2 + 0.1 · 0.8
0.26
26
30. There are 3 coins in a box; one lands on heads with probability 1 (it has heads on
both sides), one lands on heads with probability 1/2 and one lands one heads with
probability 1/3. You choose a coin at random (each possibility being equally likely)
and flip it 3 times.
(a) What is the probability that it lands on heads all 3 times?
Solution. Let Ei be the event that the i-th coin is chosen. Let HHH be the
event of 3 heads. Then
P (HHH) =
3
X
P (HHH|Ei )P (Ei ) = (1/3) 1 + (1/2)3 + (1/3)3 .
i=1
(b) What is the probability that you chose the double-headed coin AND it landed on
heads all three times?
Solution. P (HHH ∩ E1 ) = P (HHH|E1 )P (E1 ) = 1/3.
(c) Given that it lands on heads all three times, what is the probability that you chose
the double-headed coin?
Solution.
P (E1 |HHH) =
P (HHH ∩ E1 )
1/3
1
=
=
.
3
3
P (HHH)
(1/3) (1 + (1/2) + (1/3) )
1 + (1/2)3 + (1/3)3
(d) Given that it lands on heads all three times, what is the probability that it will
land on heads on the next flip?
Solution. Let HHHH be the event that it lands on heads 4 times in a row. So
P3
P (HHHH|Ei )P (Ei )
P (HHHH)
P (HHHH|HHH) =
= Pi=1
3
P (HHH)
i=1 P (HHH|Ei )P (Ei )
4
(1/3) (1 + (1/2) + (1/3)4 )
.
=
(1/3) (1 + (1/2)3 + (1/3)3 )
31. Suppose that there is a test for a certain disease with the following properties. If the
subject has the disease the test results are positive with probability 0.9 and negative
with probability 0.1. If the subject does not have the disease the rest results are positive
with probability 0.1 and negative with probability 0.9. Assume 20% of the population
has the disease.
What is the probability that a randomly chosen person has the disease given that she
tests positive?
Solution. Let D be the event of having the disease and T the event of testing positive.
Then
P (D|T ) =
P (T |D)P (D)
0.9 · 0.2
=
.
c
c
P (T |D)P (D) + P (T |D )P (D )
0.9 · 0.2 + 0.1 · 0.8
32. There are 3 urns. Urn #1 contains 3 red balls and 4 blue balls. Urn #2 contains 4 red
balls and 5 blue balls. Urn #3 contains 5 red balls and 6 red balls. An urn is chosen
at random and a ball is selected from the urn.
(a) What is the probability that a red ball is selected?
Solution. Let Ei be the event that the ith urn is selected and R the event that
a red ball is selected. Then
P (R) =
3
X
P (R|Ei )P (Ei ) = (1/3) (3/7 + 4/9 + 5/11) .
i=1
(b) Given that a red ball is selected, what is the probability that Urn #1 was chosen?
Solution.
P (E1 |R) =
(3/7)(1/3)
P (R|E1 )P (E1 )
=
.
P (R)
(1/3) (3/7 + 4/9 + 5/11)
(c) Given that a red ball is selected, what is the probability that a second ball selected
at random from the same urn (without replacement) is red?
Solution. Let RR be the event that two red balls are selected. Then
P3
P (RR|Ei )P (Ei )
P (RR)
P (RR|R) =
= Pi=1
3
P (R)
i=1 P (R|Ei )P (Ei )
(1/3) (3/7 · 2/6 + 4/9 · 3/8 + 5/11 · 4/10)
=
.
(1/3) (3/7 + 4/9 + 5/11)
(d) There are two coins in a box. One is fair and the other is 2-headed. (The fair coin
lands on heads 50% of the time). You choose a coin at random and flip it 10 times.
It comes up heads each time. What’s the probability that it is the 2-headed coin?
Solution. Let H denote the event of flipping heads 10 times, F of picking the
fair coin.
P (F c |H) =
9
1 ∗ (1/2)
1
P (H|F c )P (F c )
1024
=
=
.
=
c
c
−10
−10
P (H|F )P (F ) + P (H|F )P (F )
1/2 + 2 (1/2)
1+2
1025
Independence
33. A coin lands on heads with probability 0.1. It is flipped 100 times. What is the
probability that it lands on heads exactly 50 out of the 100 times?
34. A coin is tossed twice. Consider the events:
• A = heads on the first toss.
• B = heads on the second toss.
• C = the two tosses come out the same.
(a) Are A, B independent? Solution. yes
(b) Are B, C independent? Solution. yes
(c) Are A, C independent? Solution. yes
(d) Are A, B, C jointly independent? Justify your answer. Solution. no because
P (C|A ∩ B) = 1 6= 1/2 = P (C).
35. Suppose P (A) = 0.2, P (B) = 0.3.
(a) If A and B are independent, what is P (A ∩ B)? What is P (A ∪ B)?
(b) If A and B are disjoint, what is P (A ∩ B)? What is P (A ∪ B)?
36. The price of a certain stock changes each day at random: it goes up $1 with probability
0.6 and down $1 with probability 0.4. Assuming that changes on different days are
independent, what’s the probability that it will be back to its starting price after 10
days?
Solution. The stock
must go up 5 times and down 5 times for this to happen. The
10
probability is 5 (0.6)5 (0.4)5 .