Download STATISTICAL LABORATORY, March 4th, 2011 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
no text concepts found
Transcript
STATISTICAL LABORATORY, March 4th, 2011
PROBABILITY. AXIOMS AND BASIC LAWS
Manuela Cattelan
1
∗
SIMPLE PROBLEMS
Ex1 Consider two classes C1 and C2 : C1 has 20 children, 5 boys and 15 girls; C2 has 16 children, 8
boys and 8 girls. A child is selected at random and independently from each class. Compute the
probabilities of the following events: 1) A, two boys, 2) B, a boy from C1 and a girl from C2 , 3)
C, at least one girl. Simon is in C1 and Amanda is in C2 . What is the probability that Simon is
selected? What is the probability that neither Simon nor Amanda are selected?
Solution. The outcomes of the experiments are ordered pairs of children, the first item from C1 ,
the other one from C2 . According to the general combinatorial principle, card(Ω) = 20 · 16 = 320,
that is, 320 different pairs of children can be observed. According to the gender of the children,
the pairs can be classified into 4 subsets: (b, b), (b, g), (g, b), (g, g), where b and g denote boy and
girl, respectively. These four subsets form a partition of Ω with respective sizes 40, 40, 120 and 120
pairs.
1. Note that A ≡ (b, b), therefore P (A) = card(A)/card(Ω) = 40/320 = 1/8.
2. Since B ≡ (b, g), P (B) = P (A) = 1/8.
3. At least one girl means either one girl or two girls, that is, C = (b, g)∪(g, b)∪(g, g) is the union
of three disjoint events. Using addivitivity axiom, P (C) = 40/320 + 120/320 + 120/320 = 7/8.
The complement event law can also be used. Clearly, C = AC , therefore P (C) = P (AC ) =
1 − P (A) = 1 − 1/8 = 7/8.
4. The number of pairs including Simon is 1 · 16 = 16, therefore the probability that Simon is in
the selected pair is 16/320 = 1/20. The number of pairs including neither Simon nor Amanda
is 19 · 15 = 285 and the corresponding probability is 285/320 = 57/64.
Ex2 A fair die is thrown twice. Mr Bianchi bets on event A: the result of the first throw is greater than
the result of the second one. Mr Rossi bets on event B: the sum of the two results is lower than or
equal to 6. What is the probability that 1) Mr Bianchi wins? 2) Mr Rossi wins? 3) both players
win? 4) at least one of them wins? 5) neither player wins?
Solution. The possible outcomes of the experiment are 6 · 6 = 36 ordered pairs, with coordinates
corresponding to the result of the first and the second throw, respectively. The table below illustrates
the sample space (sum of pair coordinates in italics).
1. The pairs satisfying A are the 15 cells below the main diagonal of the table, hence P (A) =
15/36 = 5/12.
2. The pairs satisfying B are the 15 cells above the secondary diagonal of the table, hence
P (B) = 15/36 = 5/12 = P (A).
∗ Based
on material prepared by Prof. Mario Romanazzi
1
2
COMBINATORICS
1st Throw
1
2
3
4
5
6
2
1
(1, 1)
(2, 1)
(3, 1)
(4, 1)
(5, 1)
(6, 1)
2
3
4
5
6
7
2
(1, 2)
(2, 2)
(3, 2)
(4, 2)
(5, 2)
(6, 2)
2nd
3
(1, 3) 4
(2, 3) 5
(3, 3) 6
(4, 3) 7
(5, 3) 8
(6, 3) 9
3
4
5
6
7
8
Throw
4
(1, 4) 5
(2, 4) 6
(3, 4) 7
(4, 4) 8
(5, 4) 9
(6, 4) 10
5
(1, 5) 6
(2, 5) 7
(3, 5) 8
(4, 5) 9
(5, 5) 10
(6, 5) 11
6
(1, 6) 7
(2, 6) 8
(3, 6) 9
(4, 6) 10
(5, 6) 11
(6, 6) 12
3. This is the event A∩B which is easily built from the table: A∩B = {(2, 1), (3, 1), (3, 2), (4, 1), (4, 2), (5, 1)},
hence P (A ∩ B) = 6/36 = 1/6.
4. This is the event A ∪ B and
P (A ∪ B) = P (A) + P (B) − P (A ∩ B) = 5/12 + 5/12 − 2/12 = 2/3.
5. This is the event AC ∩ B C ≡ (A ∪ B)C (check!) hence
P (AC ∩ B C ) = P ((A ∪ B)C ) = 1 − P (A ∪ B) = 1/3.
2
COMBINATORICS
Ex1 n > 1 cards with the numbers 1, 2, ..., n are thoroughly shuffled and laid down one after the other.
What is the probability of obtaining an ordered sequence?
Solution. The number of possible sequences is card(Ω) = n!. Only two sequences are ordered, that
is, (1, 2, ..., n − 1, n) and (n, n − 1, ..., 2, 1), hence the required probability is 2/n!.
Ex2 A computer password is a sequence of 6 characters. Allowable characters are the 10 digits 0, 1, ...,
9 and the 26 letters a, b, ..., y, z. The first character must be a letter. 1) How many passwords
are possible? Suppose the password is chosen at random. What is the probability that 2) no digits
are present? 3) the first three characters are letters and the others are digits? 4) letter a is not
present?
Solution.
1. In this problem replication of units is allowed and order of units counts. The first position has
26 possibilities, each of the other positions has 36 possibilities. By the general combinatorial
principle, the number of possible passwords is 26 · 365 = 1572120576.
2. The probability is 266 /(26 · 365 ) = (13/18)5 ' 0.196.
3. 263 · 103 /(26 · 365 ) = 262 · 103 /365 ' 0.011.
4. 25 · 355 /(26 · 365 ) = (25/26) · (35/36)5 ' 0.835.
Ex3 How many different letter arrangements can be obtained from the letters of the word statistically,
using all the letters? (Rice, 1.20)
Solution. Below is the (alphabetically) ordered list of the distinct letters of statistically, with the
number of replications.
Letter
Multiplicity
A
2
C
1
I
2
L
2
S
2
T
3
Y
1
For n distinct elements, the number of arrangements is n!. With repeated elements, we must divide
n! by the product of the factorials of the multiplicities, to get rid of the superfluous permutations
3
REVIEW PROBLEMS
3
of the repeated elements. Thus, the solution is
13!
= 129729600.
4 · 2! · 3!
Ex4 A group of 60 second graders is to be randomly assigned to two classes of 30 each. Five of the second
graders, Marcelle, Sarah, Michelle, Katy and Camerin, are close friends. What is the probability
that 1) they will all be in the same class? 2) exactly four of them will be? 3) Marcelle will be in
one class and her friends in the other? (Rice, 1.30)
60
1. 55
25 / 30 ' 0.0261.
60
2. 54 55
/
' 0.151.
26 60 30
55
3. 26 / 30 ' 0.0301.
Ex5 A standard deck of 52 cards is shuffled thoroughly and n cards are turned up. What is the probability
that a face card (just one) turns up? For what value of n is this probability about .5? (Rice, 1.32)
Solution. There are 12 face cards and 52 − 12 = 40
non-face cards. If n > 40 there will be at least
one face card, so we assume n ≤ 40. There are 12
= 12 ways of choosing a card from the face card
1
40
set and n−1
ways of choosing the remaining n − 1 cards from the non-face card set. The required
probability is a function g(n) given by
40
12 n−1
.
g(n) =
52
n
0.3
0.2
0.1
0.0
Probability of just one face card
0.4
The figure below is the plot of g(n) for 1 ≤ n ≤ 40. The function is increasing for n ≤ 4 and reaches
the maximum value (' 0.438) at n = 4. For 4 < n ≤ 40 it is decreasing.
0
10
20
30
40
Number of cards, n
3
REVIEW PROBLEMS
Ex1 The lotto game uses an urn with 90 identical balls containing the numbers 1, ..., 90, each ball a
different number. Five balls are drawn, one after the other and without replacement. 1) How many
different outcomes can be observed? 2) What is the probability of 5 even numbers? And of 5 odd
numbers? 3) What is the probability of 1 even number? And of at least 1 even number? 4) What
is the probability that the numbers 15 and 71 are drawn, in whatever order? 5) Compute the
probability that the 5-tuple includes 1 even number or 1 odd number. 6) Compute the probability
that the 5-tuple includes at least 1 even number and at least 1 odd number. 7) Compute the
probability that the 5-tuple includes 5 even numbers or 5 numbers less than 50.
3
REVIEW PROBLEMS
4
1. The elementary events are the ordered 5-tuples {x1 , x2 , x3 , x4 , x5 , }, 1 ≤ xi ≤ 90, x1 6= x2 6=
x3 6= x4 6= x5 . The number of outcomes is
90!
= 5, 273, 912, 160.
(90 − 5)!
card(Ω) = 90 · 89 · 88 · 87 · 86 =
2. Put A : 5 even numbers, B : 5 odd numbers. Since in {1, 2, ..., 90} there are 45 even numbers
and 45 odd numbers
45
45 · 44 · 43 · 42 · 41
5
P (A) = P (B) =
= 90 ' .0277993.
90 · 89 · 88 · 87 · 86
5
3. For i = 0, 1, ..., 5, let Ci : i even numbers in the 5-tuple. Thus, C0 : 0 even numbers (i.e., 5 odd
numbers), C1 : 1 even number, etc. C0 , ..., C5 are pairwise disjoint and they form a partition
of the sample space Ω. Observe that
Ci ⇐⇒ i even numbers ∩ 5-i odd numbers
in whatever order. Hence
45
i
45
5−i
90
5
P (Ci ) =
, i = 0, 1, ..., 5.
For instance,
45
1
P (C1 ) =
45
4
90
' .1525571.
5
Define C : at least 1 even number. Then
C=
5
[
Ci
i=1
and an easy application of the additivity axiom gives
P (C) =
5
X
P (Ci ) =
i=1
5
X
45
i
45
5−i
90
5
i=1
.
A much simpler solution is available. Using C C ≡ C0
45
5
90
5
C
P (C) = 1 − P (C ) = 1 − P (C0 ) = 1 −
4.
88
3
90
5
' .9722007.
5
88 · 87 · 86
=2
' .002496879.
2 90 · 89 · 88 · 87 · 86
5. Obviously, 1 odd number is equivalent to 4 even numbers. Using the previous notation, we
need the probability of C1 ∪ C4
45 45
P (C1 ∪ C4 ) = P (C1 ) + P (C4 ) = 2
1
6. The required event D is ∪4i=1 Ci with probability
P (D) =
4
X
i=1
P (Ci ).
4
90
5
' .3051143.
3
REVIEW PROBLEMS
5
A simpler solution can be obtained via the complement event. Observe that
DC = C0 ∪ C5 ,
and therefore
P (D) =
4
X
P (Ci ) = 1 − P (C0 ∪ C5 ) = 1 − P (C0 ) − P (C5 ) ' .9444014.
i=1
7. The two events have a non empty intersection, because we can draw 5 even numbers all less
than 50, i.e., {2, 4, 6, 8, 10}. Using addition law, P (A ∪ B) = P (A) + P (B) − P (A ∩ B),
45
49
24
5 + 5 − 5
' .07022049.
90
5
Ex2 This is a version of the famous birthday problem. In a classroom there are n > 1 students. What is
the probability that at least two of them have the same birthday (leap years neglected)?
Solution. Obviously, if n ≥ 365, the result is trivial, so we suppose n < 365. In the lack of any
information, the birthday of each student has 365 possibilities and the total number of possibilities
is card(Ω) = 365n . It is convenient to attack the problem starting with the complement event: no
two students have the same birthday. The number of possibilities is 365 · 364 · ... · (365 − n + 1) =
365!/(365 − n)!. Hence the required probability is
365!
(365 − n)!365n
g(n) = 1 −
n
g(n)
2
0.003
3
0.008
4
0.016
5
0.027
6
0.040
7
0.056
8
0.074
9
0.095
10
0.117
11
0.141
The table gives the first few values for 2 ≤ n ≤ 10 and the figure shows the behaviour of g(n) for
2 ≤ n ≤ 70. It is clear that for n > 60 it is almost sure that at least two students will have the
same birthday.
●
●
●
●
●
●
●
●●
●●
●●
●●●
●●●●
●●●●●●●●●●
●●●●
0.8
●
●
●
●
●
●
●
●
●
0.6
●
●
●
●
●
●
0.4
●
●
●
●
●
●
●
●
0.2
Prob. of at least two coincident birthdays
1.0
Birthday Problem
●
●
●
●
●
0.0
●
●
●●
0
●
●
●
10
20
30
40
50
60
70
No. of Students
Ex3 So far, only experiments with a finite number of outcomes were considered. Here we discuss an
example were the sample space is a continuous subset of R2 , the set of the pairs of real numbers.
A player throws darts at random at a circular dartboard. Suppose, for simplicity, that the center
of the dartboard is the point with coordinates (0, 0) and the radius of the dartboard is r > 0.
3
REVIEW PROBLEMS
6
The sample space is the set Ω = {(x, y) : x2 + y 2 ≤ r2 }. Let A be a subset of the dartboard. A
continuous version of the (discrete) probability measure P (A) = card(A)/card(Ω) is
P (A) = area(A)/area(Ω).
Let A be the circle centered at the origin with radius r/2. According to the prevoius definition,
the probability of hitting a point of A is just 1/4. Let B be the circle centered at the origin with
radius cr, with 0 < c ≤ 1. Then P (B) = c2 and
limc→0+ P (B) = 0.
This proves that the probability of hitting the center of the dartboard (indeed, any point of the
dartboard) is zero. This is a very important (and somewhat paradoxical) property of continuous
spaces.
Related documents