7 Probability

7
Probability
Discrete Probability
7.1
Multiple Events and Combined Probabilities 1
Determine the probability of each of the following events assuming that the die has equal probability of landing on each one of the six sides marked by 1 to 6 dots and that the coin has equal
probability to land on head (H) and tail (T).
(a) The probability of rolling a 1, followed by a 4, in two consecutive rolls.
(b) The probability of NOT rolling either a 2 or a 3 in one roll.
(c) The probability of tossing a coin 3 times and getting TTH.
(d) The probability of getting any combination other than TT in two consecutive rolls.
(e) The probability of getting a coin landing on H and a die landing on 6 with one toss of coin
and one roll of dice.
Solution
1 1
1
(a) · =
6 6
36
2
1 1
(b) 1 − − =
6 6
3
1
1
(c) ( )3 =
2
8
3
1
(d) 1 − ( )2 =
2
4
1 1
1
(e) · =
2 6
12
7.2
Multiple Events and Combined Probabilities 2
(a) Find the probability of randomly selecting 4 aces from a well-shuffled deck of 52 cards.
(b) Find the probability of randomly selecting 4 hearts (of any value) from a well-shuffled deck
of 52 cards. (Note: a full deck of cards contains 13 hearts.)
(c) What is the probability of randomly selecting the sequence of cards of value “King”, “Queen”
Jack” (of any suit or combination of suits) from a well-shuffled deck of 52 cards.
Solution
(a)
p(4 aces) =
4 3 2 1
·
·
·
= 3.7 × 10−6
52 51 50 49
1
(b)
p(4 hearts) =
(c)
p(KQJ) =
7.3
13 12 11 10
·
·
·
= 0.002641
52 51 50 49
4 4 4
·
·
= 0.0004827
52 51 50
Multiple Events and Combined Probabilities 3
A drawer contains 3 pairs of black socks, 2 pairs of white socks, 1 pair of green socks, and 2 pairs
of blue socks. Two socks are pulled out at random from the drawer. (Assume each sock has the
same probability of being selected).
(a) What is the probability that the pair pulled out consists of two black socks?
(b) What is the probability that the pair pulled out is either black or blue?
(c) What is the probability that a matching pair of any color is obtained?
(d) What is the probability that the pair pulled out of the drawer do not match?
Solution There are a total of 2 · (3 + 2 + 1 + 2) = 16 socks to choose from, and 6 are black, 4
white, 2 green, and 4 are blue.
(a) The probability of pulling out the first black sock is 6/16 and the second black sock 5/15, so
in all
6 5
·
= 0.125
p(2 black) =
16 15
(b) We have the probability that the pair is black (0.125). Now the probability that both socks
turn out to be blue is
4 3
p(2 blue) =
·
= 0.05
16 15
Thus, the probability that the pair is either black or blue is
p({2 black} ∪ {2 blue}) = 0.125 + 0.05 = 0.175
(c) We add together the probabilities of the pair selected being both black (0.125), both blue
(0.05), both white (0.05), or both green (0.0083). (The latter two computed as in parts a and
b). We get
p(matching pair) = 0.125 + 0.05 + 0.05 + 0.0083 = 0.233
(d) We know that
p(pair does not match) = 1 − p(matching pair) = 1 − 0.233 = 0.766
2
7.4
Multiple Events and Combined Probabilities 4
A child’s toy consists of a clear plastic box containing five coloured spheres (red, green, blue,
yellow, and white) and five coloured sockets. After shaking the box, the spheres tend to randomly
settle into the sockets one by one, with equal probability for a given sphere settling into any
unoccupied socket. At the end of “one experiment” each sphere occupies exactly one socket, and
all sockets are occupied.
(a) What is the probability that the red sphere will settle into the red socket?
(b) What is the probability that either the red sphere will settle into the red socket or the blue
sphere will settle into the blue socket?
(c) What is the probability that the red sphere will settle into the red socket and also the blue
sphere will settle into the blue socket?
(d) What is the probability that all the spheres settle into the matching sockets?
Solution
(a) Since there are five spheres, with equal probability of settling into a given socket, the probability is p(red − red) = 1/5 = 0.2.
Another way of doing this is: The total number of ways to put these 5 balls into these 5 sockets
is P(5,5)=5!. Among these, the total number of outcomes in which red is in red is P(4,4)=4!.
Thus, p(red − red) = 4!/5! = 1/5.
(b)Since p(red − red) = 1/5 inlcudes the cases in which red-red and blue-blue both occur and
p(blue − blue) = 1/5 also inlcudes the cases in which red-red and blue-blue both occur, thus
p({red − red}∪{blue − blue}) = p(red − red)+p(blue − blue)−p({red − red}AN D{blue − blue}) =
1/5 + 1/5 − 1/20 = 7/20.
Another way of doing this is: The total number of ways to put these 5 balls into these 5 sockets
is P(5,5)=5! Total number of outcomes in which red is in red is P(4,4)=4! and so is the number
of outcomes in which blue is in blue. In both cases, the outcomes in which red-red and blue-blue
both occur are included. These number is P(3,3)=3! which will be calculated twice if we simply
add twice the number 4!. Thus, p({red − red} ∪ {blue − blue}) = (4! + 4! − 3!)/5! = 7/20.
(c) Once the red sphere is settled into the red socket, there are four spheres left, each one equally
likely to settle into the blue socket. We use the multiplicative principle to get p = (1/5)(1/4) =
1/20 = 0.05. This problem has been dealt with in (b).
(d) The probability that each sphere in turn “chooses” its own matching socket is 1/(number of
empty sockets left), so that p = (1/5)(1/4)(1/3)(1/2) = 1/5! = 1/120 = 0.00833.
7.5
Expected Value and Probability
A coin was tossed 8 times by each person in a group of people. The number of people, N (x),
who got a total of x heads were as follows: (x = 0, N = 0), (x = 1, N = 3), (x = 2, N = 10), (x =
3, N = 16), (x = 4, N = 25), (x = 5, N = 21), (x = 6, N = 6), (x = 7, N = 2), (x = 8, N = 2).
3
(a) Based on this experimental data, determine the (empirical) probability of obtaining x heads
out of 8 coin tosses for x = 0, 1, . . . 8.
(b) Find x̄, the expected number of heads given the above data.
(c) Compare your results with the expected value of heads in a theoretical distribution in which
the probability of H and T are equal.
Solution
(a) The total number of people is 85 (seen by adding up the numbers of people who got any of
the results) so the probabilities are simply p(x) = N (x)/85. These are shown in the table below.
Number of heads x
0
1
2
3
4
5
6
7
8
Number of people N (x)
0
3
10
16
25
21
6
2
2
probability p(x)
0.0000
0.0353
0.1176
0.1882
0.2941
0.2471
0.0706
0.0235
0.0235
(b) To find x̄ we form:
x̄ =
N
X
xi p(xi )
i=0
So
x̄ = 0 · 0 + 1 · 0.0353 + 2 · 0.1176 + 3 · 0.1882 + 4 · 0.2941 + 5 · 0.2471 + 6 · 0.0706 + 7 · 0.0235 + 8 · 0.0235
x̄ = 0.0353 + 0.2352 + 0.5646 + 1.1764 + 1.2355 + 0.4236 + 0.1645 + 0.188 = 4.0231
(c) In 8 tosses, with p(H) = p(T ) = 0.5 the expected value of number of heads is 4.
7.6
Permutation and Combination 1
(a) Write out in full all possible outcomes of tossing 4 coins. How many such outcomes are there?
(b) Determine the probability of tossing 0, 1, 2, 3, 4 heads.
(c) Find the expected number of heads.
Solution
4
(a) 0 heads: TTTT
1 Head: HTTT, THTT, TTHT, TTTH
2 heads HHTT, HTHT, HTTH, THHT, THTH, TTHH
3 Heads: HHHT, HHTH, HTHH, THHH
4 heads: HHHH
There are 16 events.
(b) p(0) =
1
16
= p(4), p(1) =
4
16
=
1
4
= p(3), p(2) =
6
16
(c) x̄ =
P4
7.7
Permutation and combination 2
i=0
= 38 .
1
1
xi p(xi ) = 0( 16
) + 1( 14 ) + 2( 38 ) + 3( 14 ) + 4( 16
)=
1
4
+
3
4
+ 43 +
1
4
= 2.
(a) Four athletes from four different countries compete in the final of 500 m speed skating.
How many possible outcomes are there? (Assume that they all complete the race and that
simultaneous arrival does not occur).
(b) How many ways are there to seat six people at a dining table with six fixed seats?
(c) How many ways are there to get a total of 8 by tossing two dice simultaneously ? (consider
that a 2 for die #1 and a 6 for die #2 is different from a 6 for die #1 and a 2 for die #2)
Solution
(a) 4! = 24
(b) 6! = 720
(c) If the first die is a 1, then there is no way to get a total of 8. If the first die is a 2, the second
one must be a 6. If the first die is a 3, then the second one must be 5, and so on. In total, there
are 5 different ways, (2,6), (3,5), (4,4), (5,3), and (6,2), to get a total of 8.
7.8
Permutation and Combination 3
Suppose you have 6 books and you want to put 3 on the book shelves. how many possible
arrangements are there?
Solution
6 choices for the left position. 5 choices for the middle position. 4 choices for the right position.
6!
6 ∗ 5 ∗ 4 = (6−3)!
= 120
7.9
Permutation and Combination 4
Suppose you have 6 books again. In how many ways can you choose 3 to take on a trip.
Solution
The order of books does not matter here. C(6, 3) = 20
5
7.10
Permutation and Combination 5
How many ways are there to get 3 times H and 2 times T by tossing a coin 5 times? What is
the probability of getting 3 heads in 5 coin tosses?
Solution
The number of ways of getting 3 heads in 5 coin tosses is C(5, 3) = 5!/(3!2!) = 10. The
1
= 0.3125 where C(5, 3) is the
probability of getting 3 Heads in 5 tosses is: C(5, 3)( 21 )5 = 10 32
binomial coefficient.
7.11
Permutation and Combination 6
How many words can be made from the word ”calculus”? (These words do not have to have any
meaning. For examples, ”alcuclus”, ”lcaluscu”.)
Solution
There are 2C, 2L, 2U, 1A and 1S in ”calculus”. C(8, 2)∗C(6, 2)∗C(4, 2)∗C(2, 1)∗C(1, 1) = 5040
7.12
The Binomial Theorem 1
(a) Find terms in Pascal’s triangle down to the level that represents the coefficients C(10, k).
(b) Use this to form the binomial expansion of the product
(p + q)10
(c) What is the probability of getting exactly 7 heads in 10 tosses if the coin is fair?
(d) What is the probability of getting exactly 7 heads in 10 tosses if p(H) = 0.49 ?
Solution
(a)
1
11
121
1331
14641
1 5 10 10 5 1
1 6 15 20 15 6 1
1 7 21 35 35 21 7 1
6
1 8 28 56 70 56 28 8 1
1 9 36 84 126 126 84 36 9 1
1 10 45 120 210 252 210 120 45 10 1
(b)
(p+q)10 = p10 +10p9 q+45p8 q 2 +120p7 q 3 +210p6 q 4 +252p5 q 5 +210p4 q 6 +120p3 q 7 +45p2 q 8 +10pq 9 +q 9
(c) The probability of getting exactly 7 heads is 120p7 q 3 . If the coin is fair, and p(H) = p(T )
then p = q = 0.5 so this is simply
p(7H) = 120(0.5)10 =
120
= 0.117
1024
(d) If the coin is not fair and p(H) = 0.49 = p then q = 0.51 and
p(7H) = 120(0.49)7 (0.51)3 = 120 · 0.0067822 · 0.13265 = 0.1079
7.13
Binomial Theorem 2
A bias coin has non-equal probabilities of tossing H or T. (P(H)= 34 and P(T)= 41 ) What is the
probability of obtaining exactly 6 heads and 4 tails if you toss the coin 10 times.
Solution
C(10, 6)( 43 )6 ( 14 )4 = 0.145998
7.14
Binomial Theorem 3
Suppose a shipment has 5 good items and 2 defective items. Select a sample of 3 and find the
probability of exactly 2 good items and 1 defective item in the sample. Assume that the sampling
is done with replacement.
Solution
C(3, 2)( 75 )2 ( 27 ) = 0.4373
7.15
Binomial Theorem 4
In order to construct a phylogenetic tree, it is necessary to trace evolutionary relationship between organisms. It is important to recognize what characteristics could be used to trace their
evolutions. The most accepted characteristics used today is the structure of one of the RNA
molecules making-up ribosomes. It has been found through nucleotide sequence comparisons of
rRNA from many organisms, that some regions of rRNA are very similar in all organisms while
7
others are quite variable. Evolutionary relationships can be determined using lines with lengths
proportional to the number of differences between nucleotides. Two organisms, A & B, have
been compared. The probability for them to have the same nucleotides is 51 . If 5 nucleotides
have been compared,what is the probability for having (a)3 different nucleotides?
(b)4 different nucleotides?
(c)5 different nucleotides?
(d) at most 2 are different?
Solution
P(same)= 51 , so P(different)=1 −
1
5
=
4
5
(a)C(5, 3)( 15 )2 ( 45 )3 = 0.2048
(b)C(5, 4)( 15 )( 45 )4 = 0.4096
(c)C(5, 5)( 15 )0 ( 45 )5 = 0.32786
(d)P(at most 2)
= P (0) + P (1) + P (2) = 1 − P (5) − P (4) − P (3) = 1 − 0.2048.0.4096 − 0.32786 = 0.05774
7.16
Applications 1
Consider a gene that codes for an essential protein (such as hemoglobin). Let the “normal” allele
for this gene be represented by a and the defective allele by A. Suppose that individuals of type
aa and aA are both healthy, and can mate and have progeny, but that any individual of genotype
AA will not survive beyond birth. Assume that mating is random (with respect to this gene)
and that each allele in a parent is equally likely to be passed to the progeny. If the fraction of
type a alleles in the population is p = 0.9 and the fraction of type A alleles in the population is
q = 0.1, what fraction of the progeny inherit the fatal form AA?
Solution
We see the results of the random mating in the table below. A progeny arises in 1/4 of the
cases when both parents are of type aA. The probability that any individual is of type aA
is pq. The probability that both parents are of this type is (by the multiplicative property)
(pq)(pq) = p2 q 2 = (0.9 · 0.1)2 = 0.0081. Thus the probability of a fatal genotype AA occurring is
p(AA) = p2 q 2 /4 = 0.0081/4 = .00202, i.e in about 0.202% of the pregnancies, this fatal form of
genetic disease will occur.
Mother:
Father
aA pq
aa pp
aA
pq
aa
pp
aa, 2aA, AA
AA, aA
aa, aA
aa
8
Continuous Probability
Normalization Constant, Mean, Median, and Cumulative Distribution Functions
7.17
In Figures 1 and 2 , you are asked to indicate the following by sketching directly on the diagrams.
(a)The probability that the value of x is in the range [2,4] for the probability density p(x). See
figure 1
(b)The location of the median for the cumulative distribution F (x) in figure 2
P(X)
1
2
3
4
5
6
7
X
Figure 1:
F(X)
1
1/2
X
Figure 2:
Solution
(a)
(b)
9
P(X)
The shaded area represents probability that 2 <= X <= 4
1
2
3
4
5
6
7
X
Figure 3:
F(X)
1
1/2
X
Xm
Xm is the location o median
Figure 4:
7.18
Figure 5 are the graphs of a probability density function, p(x) and of a cumulative distribution
function, F(x) corresponding to it. What is the value of the constant K? What is the special
feature of the point marked * (one word answer) ? Is the mean the same as the median in this
case? (Justify !)
K
F(X)
K/2
P(X)
*
Figure 5:
Solution
• K=1
10
• Median is the point labeled (*).
• P (X) is not summetric so mean is not as same as median.
7.19
Use one sentence to explain clearly what a ”cumulative probability distribution” represents.
Solution
The cumulative probability distribution, F(x) represents the probability that the outcome of
measurement is between 0 and x, and corresponds to the area under the graph of probability
density distribution function between 0 and x.
7.20
The probability density distribution of grades on a mid-term test (out of a total score of 10) was
found to be
−x
p(x) = Ce 10 0 ≤ x ≤ 10
C = 0.158 Was the test easy or hard? Explain your answer.
Solution
The probability density is highest at the low end of the grade distribution, so the test was
hard.
7.21
For the following probability density functions, find the constant C and the cumulative distribution function, F (x).
(a) p(x) = C (−b ≤ x ≤ b)
(b) p(x) = −C(x2 − b2 ) (−b ≤ x ≤ b)
Solution
(a) C = 1/(2b), F (x) = (x + b)/(2b).
(b) C=3/(4b3 ), F (x) = 3(x + b)/(4b) − (x3 + b3 )/(4b3 ).
7.22
Consider a function y = f (x) > 0 defined on some interval [a, b]. The median of f is defined to
be the value of the independent variable, x, say x = m, which splits the area under f (x) between
a and b into two equal portions, i.e. such that
Z
m
a
f (x)dx =
Z
b
m
f (x)dx =
1
2
Z
b
a
f (x)dx
11
Use this definition to find the median of the following functions on the indicated interval.
(a) f (x) = 1 − x2 ,
−1<x<1
(b) f (x) = |1 − x|,
−1<x<1
(c) f (x) = 5 − x, 0 < x < 5
(d) f (x) = sin(2x) 0 < x < π/4
[Remark: it may help you to sketch the given function and interval and use considerations of
symmetry for some of these examples.]
Solution
(a)
Z
In particular, we get
m
−1
3
(1 − x2 )dx = (x − x3 /3)|m
−1 = (m − m /3) + 2/3.
Z
1
−1
(1 − x2 )dx = 4/3.
Thus we have to find m such that m − m3 /3 + 2/3 = (1/2)(4/3) = 2/3. Clearly, this holds for
m = 0, a solution we could have found by simple symmetry considerations!
(b) Note that f (x) = |1 − x| = 1 − x in the interval considered, hence
Z
m
−1
2
f (x)dx = (x − x2 /2)|m
−1 = (m − m /2) + 3/2.
1
In particular, −1
(1 − x)dx = 2, hence we have to find m such that (m − m2 /2) + 3/2 = 1.
√ Thus
2
and
we have
√ to solve the quadratic equation m /2 − m − 1/2 = 0, which has the solutions 1 + 2 √
1− 2. Of those, only the latter is in the x-interval considered, hence the solution is m = 1− 2.
R
(c)
Z
In particular,
m
0
2
(5 − x)dx = (5x − x2 /2)|m
0 = (5m − m /2).
Z
5
0
(5 − x)dx = 12.5
Hence we√have to find m such that 5m − m2 /2 = 6.25. Using a similar method to (b), we get
m = 5 − 12.5.
(d)
Z
m
0
f (x)dx =
Z
m
0
Also, we have that
Z
π/4
0
m
1
1
1
sin(2x)dx = − cos(2x) = − cos(2m) + .
2
2
2
0
1
1
1
sin(2x)dx = − cos(π/2) + = .
2
2
2
12
Thus we solve
1
1 1
1
1
− cos(2m) + = ( ) = .
2
2
2 2
4
1
cos(2m) = .
2
We get 2m = π/3, 5π/3..., and m = π/6, 5π/6.... But because we are only concerned with the
interval 0 < x < π/4, we find that m = π/6.
7.23
Figure 6 shows the result of an experiment with three groups of people. In each group, every
person was asked to throw a ball. The distance x was recorded. The probability pi (x) of throwing
a given distance is shown for each of the groups i = 1, 2, 3.
p (x)
p (x)
p (x)
1
3
2
d
x
d
x
d
x
Figure 6: For problem 7.23
(a) Compare the average (mean) distance thrown in the three groups.
(b) Compare the median distances thrown in the three cases. Is the median less than or greater
than the mean distance thrown in these cases?
Solution
(a) The three distributions can be described as linear, concave up, and concave down. We can
think of the probability density distributions p being analogous to a mass density, so that the
mean distance thrown corresponds to the center of mass of the given distribution. For the concave
up distribution, most of the “mass” is concentrated close to the origin, and there is very little
“mass” further along the x axis, so we expect the center of mass to be closest to the origin. The
linear distribution would have its center of mass a little further to the right, and the concave
down distribution would have its center of mass yet further to the right, since more of the mass
is to the right.
(b) The medians are the points at which half of the “mass” is to the right, and half to the left,
or correspondingly, at which the area under the given curve is cut into two equal portions. The
medians would satisfy a relationship similar to the means in this case.
13
7.24
Shown below is the probability density function which describes how much of the Earth’s surface
is at a given elevation (negative elevation means below sea level).
Figure 7: For problem 7.24
(a) Is more of the Earth’s surface above or below sea level? Use the concept of “median” to
explain.
(b) Estimate what fraction of the Earth’s surface is below sea level.
Solution
(a) More of the earth’s surface is below sea level than above since the diagram suggests that the
median is negative.
(b) The fraction below sea level is the amount of area to the left of the origin, and this would
appear to be about 3/4.
7.25
Suppose p(x) is the probability that a student in Math 102 gets a grade x. The median of p(x)
is that value of x for which a typical student is equally likely to score above as below.
(a) Suppose the range of scores is a ≤ x ≤ b and denote the median by m. Explain why
Z
m
a
p(x) dx =
Z
b
m
p(x) dx =
1
2
(b) Suppose that the students’ marks are described by the constant probability density function
1
on the interval 0 ≤ x ≤ 100. Find the average mark and the median mark. What is
p(x) = 100
the chance that a typical student scores better than the average mark? better than the median?
Was the course easy or hard for these students?
(c) Now suppose that the students’ marks are described by p(x) = Cx on the interval 0 ≤ x ≤ 100.
What is the constant C? Find the average mark and the median. What is the chance that a
14
typical student scores better than the average mark? better than the median? In this case was
the course “easier” or “harder” than in part (b). Explain why.
Solution
(a) By definition, the median is the coordinate at which the area under the distribution is cut
into two equal portions, thus
Z
Z
m
a
p(x) dx =
b
m
p(x) dx
Since the total area under a probability distribution is always 1, this area must be equal to 1/2:
Z
(b) For p(x) =
1
,
100
m
a
p(x) dx =
Z
1
p(x) dx = .
2
m
b
0 ≤ x ≤ 100 the distribution is constant and symmetric about x = 50 so
both mean and median are at x = 50. The chance that a student scores better than the mean
or median is
1 Z 100
Px>x̄ =
dx = (100 − 50)/100 = 0.5.
100 50
A mean of 50% is generally considered fairly low, so many students found this class hard.
2
= 5000C = 1
(c) For p(x) = Cx we first note that C 0100 p(x) dx = 1 which tells us that C 100
2
1
so C = 5000 . The mean (average) mark is
R
1 Z 100
x x dx = 200/3 = 66.66
x̄ =
5000 0
To find the median we must find the value of s such that
1 Zs
x dx = 1/2
5000 0
√
1 s2
1
=
.
We
get
s
=
i.e. such that 5000
5000 = 70.71. This is the median since half the class did
2
2
better than 70.71 and half scored below this value. This course was thus “easier” than the one
in part (a). The chance that the student did better than the mean in this course was
Px>x̄ =
Z
100
66.66
p(x)dx = 0.55.
The chance that the student did better than the median is Px>median = 0.5. (Remark: this
follows directly from the definition of median, and no integration needed here to calculate this.)
7.26
Suppose F (x) is the cumulative distribution function for the height, x, of North American adult
males (in cm), and suppose p(x) is the probability density.
15
(a) Interpret the meaning of the following: F (200) = 0.9,
R 160
150
p(x)dx = 0.2.
(b) Suppose that F (200) and F (202) differ by 0.013. Which one is bigger? Use this information
to estimate the value of p(200).
Solution
(a) F (200) = 0.9 means that 90% of all adult males are 200 cm or shorter.
means that 20% of adult males are between 150 and 160 cm in height.
R 160
150
p(x)dx = 0.2
(b) F (202) is bigger since it also includes all those people in F (200), i.e. F (202) = 0.913.
p(200) ≈ (F (202) − F (200))/(202 − 200) = 0.013/2 = 0.0065
7.27
Consider the two probability density functions p1 (x) = c(1 − |x|) and p2 (x) = c(1 − x2 ) on the
interval [−1, 1]. (See Figure 8 for a sketch.)
p1(x)
p2(x)
–1
1
–1
x
1
x
Figure 8: For problem 7.27
(a) Find the value for the constant c in each case so that the probability distribution is normalized (i.e. the total probability is 1).
(b) Find the average value (mean) for both of these functions. (Note: a careful use of symmetry
will simplify your task.)
(c) Find the median for each distribution.
Solution
(a) For p1 (x), the area under the curve on the interval [−1, 1] is just the area of the triangle
with base 2 and height c1 , so A1 = c1 = 1 so we must have the constant c1 = 1 to normalize the
distribution. For p2 (x) we calculate
A2 =
Z
1
−1
p2 (x)dx = c
Z
1
−1
(1 − x2 )dx = 2c(x −
16
x3 1
)| = 2c(1 − (1/3)) = (4/3)c.
3 0
Thus, for this to equal 1 we must set c = 3/4. Thus p1 (x) = (1 − |x|) and p2 (x) = (3/4)(1 − x2 ).
(b) Both shapes are symmetric, with mass equally distributed to the left and the right of the
origin. Thus the mean in both cases is 0.
(c) Half the mass is to the right and half to the left of the origin. Thus the median is also at the
origin for both distributions.
7.28
Consider the uniform probability distribution p(x) = C, a ≤ x ≤ b.
c
a
b
Figure 9: For problem 7.28
(a) Find the value of the constant C.
(b) Compute the mean and the median of the distribution.
Solution
(a) The constant C =
1
.
b−a
(b) By symmetry, the mean and median are both
a+b
.
2
7.29
Consider the function p1 (x), −b ≤ x ≤ b, which is made up of the two straight line segments
which connect (−b, 0) to (0, c) and (0, c) to (b, 0), where b, c are both positive.
(a) Graph p1 (x) and determine a formula for p1 (x).
(b) Determine c so that p1 (x) is a probability distribution.
(c) Find the mean and median for p1 (x).
Solution
17
(a) See Figure 10. The function p1 (x) is made up of two straight line segments. A formula is
p1 (x) =
(
c
x+c
b
− bc x + c
if − b ≤ x ≤ 0
if 0 ≤ x ≤ b
c
−b
b
Figure 10: Plot of p1 (x) for problem 7.29
(b) The area under this function is simply A = cb. This must be 1 in order that p1 (x) be a
probability density function:
cb = 1 ⇒ c = 1/b.
(c) The mean and median are both 0 because of symmetry.
7.30
The probability that the height of a basketball player is x meters is given by the probability
density distribution p(x) = Cxe−x/2 where 0 < x < 3.
(a) What is the constant C?
(b) What is the most probable height?
(c) What is the mean height?
Solution
(a) To find C set
I=
Z
3
0
p(x)dx = 1.
The integral (using Integration by Parts with u = x, dv = e−x/2 dx) comes to
I =C
−2xe−x/2 |30
+
Z
3
0
2e
−x/2
dx = C(−2xe−x/2 − 4e−x/2 )|30 = C(4 − 10e−3/2 ).
18
Thus
1
= 0.5654.
4 − 10e−3/2
(b) The most probable height is the height at which p(x) has a peak, and we find this by setting
C=
dp/dx = 0, getting e−x/2 − (x/2)e−x/2 = 0 which leads to x = 2. This is easily seen to be a
maximum from the graph of this function or from the fact that the second derivative is (−1/2e),
i.e. negative at x = 2.
(c) The mean height is
x̄ =
Z
3
0
xp(x)dx = C
Z
3
0
x2 e−x/2 dx
where C is as calculated above. This integral requires integration by parts twice. We get
x̄ = C(−2x2 − 8x − 16)e−x/2 |30 = C(−58e−3/2 + 16) = 1.73.
7.31
Ants are always found within 1 mile of their hill. The fraction of ants found within a distance
X of their hill (where 0 ≤ x ≤ 1 mile) is given by the function
D(x) =
4
arctan(x)
π
(a)What is the median distance that ants are found from their hill?
(b)What is the most likely position to find an ant?
(c)What is the average or mean distance?
Solution
(a)The median distance m is the distance such that half of the ants are found within m. This
means that D(m) = π4 tan−1 (m) = 21 implying that m = tan( π8 ) = 0.41.
0
(b)The probability density function is p(x) = D (x) =
value at x = 0 and so this is the most likely position.
(c)The mean distance is
µ=
Z
1
0
1
xp(x)dx
4Z
x
=
dx
π 0 1 + x2
1
2
= ln (1 + x2 )
π
0
2
= ln (2) = 0.44
π
.
19
4 1
.
π 1+x2
This function has a maximum
7.32
Mortality is often highly age dependent. Suppose that the probability of dying per year at age
x (in years) is p(x) = C(1 + (x − 20)2 ) where 0 ≤ x ≤ 100.
(a) Find the constant C.
(b) Find the fraction of the population that has died by age 20.
(c) Find the fraction of the population that has died by age 80.
(d) What is the mean lifetime in this population?
Solution
(a) The constant C is determined by the equation
C
Z
100
0
1 + (x − 20)2 dx = 1.
That is
3
1
1
≈ 5.7659 × 10−6 .
= C 100 + (803 + 203 ) = 1 =⇒ C =
C x + (x − 20)3 |100
0
3
3
520300
(b) The probability of dying by 20 is
C
R 20
0
(1 + (x − 20)2 ) dx = C x + 31 (x − 20)3 |20
0
C 20 +
1
3
· 203 = C ×
(c) The fraction is C
Z
80
0
8060
3
≈ 1.549 × 10−2
1 + (x − 20)
2
(x − 20)3 80
|0 ≈ 0.43.
dx = C 80 +
3
!
(d) The mean is given by
µ = C
Z
100
0
x 1 + (x − 20)2 dx = C
Z
100
0
x dx +
100 (x − 20)3
1002
(x − 20)3 100
= C
+x
−
dx
2
3
3
0
0
!
803 (x − 20)4 100
−
= C 5000 + 100
3
12
0
!
3
4
4
80
80
20
= C 5000 + 100
≈ 78.83.
−
+
3
12
12
Z
20
Z
!0
100
x(x − 20)2 dx
7.33
The probability that seeds will be dispersed at distance x, 0 ≤ x ≤ 10, from a tree is p(x) =
Ce−x/10 .
(a) Determine the value of the constant C so that p(x) is a probability density function.
(b) Determine the mean and median distances of dispersal.
Solution
(a) C must satisfy the equation
Z
10
0
Ce−x/10
R 10
0
e−x/10
dx = C
−1/10
(b) The mean distance is given by
µ =
Z
10
0
Cxe
−x/10
Ce−x/10 dx = 1:
!
10
=
−10C(e−1 − 1) = 1 =⇒ C =
0
e−x/10
dx = C x
−1/10
!
10
0
−
Z
10
0
e−x/10
dx
−1/10
1
≈ 0.1582
10(1 − e−1 )
!
!
e−x/10
= C −100e + 10
e
dx = C −100e + 10
−1/10
0
10(1 − 2e−1 )
= C −100e−1 − 100(e−1 − 1) = 100C(1 − 2e−1 ) =
1 − e−1
Z
−1
10
−x/10
−1
The median distance of dispersal is the value of m such that
Z
m
0
Ce
−x/10
dx
=
C
e−x/10
−1/10
!
m
=⇒
0
Z
m
0
10
0
!
≈ 4.180
1
Ce−x/10 dx = :
2
10C(1 − e−m/10 ) =
1
2
1
1
=⇒ e−m/10 = (1 + e−1 )
20C 2
2
≈ 3.799
=⇒ m = 10 ln
1 + e−1
=⇒ 1 − e−m/10 =
7.34
The probability density function of a light bulb failing at time t, 0 ≤ t < ∞, is given by
p(t) = Ce−(0.1)t , where t is in days.
(a) Determine the constant
C so that p(t) is a probability density function. In other words
R
determine C so that 0∞ Ce−(0.1)t dt = 1.
(b) Find the function that describes the fraction of light bulbs failing by time t.
(c) What fraction of light bulbs are working after 20 days?
21
(d) Determine the mean and median times of failure.
Solution
(a) We must have
Z
∞
0
Ce
−(0.1)t
R∞
0
Ce−(0.1)t dt = 1 for a probability density function:
e−(0.1)t
dt = C
−(0.1)
!
∞
=
0
−10C(0 − 1) = 10C =⇒ C =
1
10
(b) The fraction of light bulbs failing by time t is
F (t) =
Z
t
0
Ce
−(0.1)s
1
ds =
10
e−(0.1)s
−(0.1)
!
t
=
0
−1(e−(0.1)t − 1) = 1 − e−(0.1)t
(c) The fraction of light bulbs working after 20 days is
Z
∞
20
Ce−(0.1)t
1
dt =
10
e−(0.1)t
−(0.1)
!
∞
=
20
−1(0 − e−2 ) = e−2 ≈ 0.1353
(d) The mean time of failure is given by
1
µ=
10
Z
∞
0
te
−(0.1)t
t
dt =
10
e−(0.1)t
−(0.1)
!
∞
0
The median time is the value m such that
1 Z m −(0.1)t
1
e
dt =
10 0
10
Finally,
1 − e−(0.1)m =
e−(0.1)t
−(0.1)
!
m
=
0
1
+
10
Rm
1
10 0
Z
∞
0
∞
e−(0.1)t
dt = −10e−(0.1)t = 10
0
−(0.1)
e−(0.1)t dt = 12 :
m
−e−(0.1)t = 1 − e−(0.1)m
0
1
⇐⇒ m = 10 ln 2 ≈ 6.931
2
7.35
According to L. Glass and M. Mackey, the authors of a recent book From clocks to chaos; the
rhythms of life p 44, “The probability that a cell drawn at random from a large population has
divided at time t ≥ 20 (minutes) after birth is p(t) = Re−R(t−20) , t ≥ 20, where R > 0 is some
constant”. (They assume that cells never divide before time t = 20 min.)
(a) Find the mean time for division.
(b) What fraction of the cells have not divided by time t = 40 min?
Solution
(a) The mean time (in minutes) is
µ=R
Z
∞
20
te
−R(t−20)
(b) The fraction is R
Z
∞
40
dt = − te
−R(t−20)
|∞
20
+
Z
∞
20
e
−R(t−20)
−20R
e−R(t−20) dt = −e−R(t−20) |∞
.
40 = e
22
1
e−R(t−20) ∞
|20 = 20 + .
dt = 20 +
−R
R
7.36
A mixture of cubic crystals of various sizes is made in the laboratory, and their sizes are measured.
The probability density function, p(x), for the size of a crystal, x, (in millimeters) is shown in
Figure 11.
P(X)
X
1
4
Figure 11:
(a)Write down the functional form of the probability density p(x) for crystal size and the corresponding cumulative distribution F (x).
(b)Using the fact that the volume of a cube is V = x3 , express this cumulative distribution in
terms of the volume, i.e. find F in terms of V . (We’ll call this F (V )).
(c)Using what you have found for F (V ), determine the corresponding probability density function
p(V ) for crystal volume. (Hint: what is the connection between F (V ) and p(V )?)
(d)Use your result in (c) to calculate the mean volume, V , of the crystals.
Solution
(a)
p(x) =
F (x) =
1≤X≤4
Z
x
1
1
3
1≤x≤4
1
1 x 1
ds = s = (x − 1)
3
3 1
3
(b)Change variables:
1
V = X 3,
x = V 3,
1
F (V ) = (V 1/3 − 1),
3
1 ≤ V ≤ 43
(c)
0
p(V ) = F (V ), p(V ) =
d 1 1/3
1 1
[ (V
− 1)] = ∗ V −2/3 ,
dv 3
3 3
1 ≤ V ≤ 64
(d)
1
1 64 1/3
V ∗ V −2/3 dv =
V dv
V P (x)dv =
V =
9
9 1
1
1
64
1
1
1 3
= ∗ V 4/3 = [644/3 − 14/3 ] = [256 − 1] = 21.25mm3
9 4
12
12
1
Z
64
Z
64
Z
23
7.37
A random bulb from a batch of light bulbs has the probability D(t) = 1 − e−rt of failing before
t hours. If the mean lifetime of such bulbs is 1000 hours, what is the value of r?
Solution
D(t) is the cumulative distribution function (CDF). Thus, p(t) = D 0 (t) = re−rt . The mean
lifetime is
R∞
tp(t)dt = 1/r. Thus, 1/r = 1000, r = 0.001 hr −1 .
0
7.38
Let M (t) be the amount of a certain radioactive substance left at time t. Then
M (t) = Mo e−kt
for some positive constant k, where M0 is the initial amount. The cumulative amount that has
decayed in the first t years is
F (t) = Mo (1 − e−kt ).
(a) If k = ln(2)/1000, show that F (1000) = Mo /2.
(b) Show that the function
F 0 (t)
p(t) =
F (1000)
satisfies all the requirements of a probability density distribution for 0 ≤ t ≤ 1000.
(c) Sketch the functions M (t), F (t), F 0 (t).
(d) Use integration by parts to calculate the mean time t̄ of decay.
Solution
(a) F (1000) = M0 (1 − e−1000k ) = M0 (1 − e− ln 2 ) = M0 /2.
(b) F (t) = M0 (1 − e−kt ) = M0 − M0 e−kt =⇒ F 0 (t) = kM0 e−kt , and so p(t) =
F 0 (t)
=
F (1000)
kM0 e−kt
= 2ke−kt ≥ 0 for 0 ≤ t ≤ 1000. Also
M0 /2
Z
1000
0
p(t) dt = 2k
(c) See Figure 12.
Z
1000
0
e−kt dt = 2k
e−kt 1000
= −2e−1000k + 2 = 2 − 2e− ln 2 = 1
−k 0
24
M(t)
F′(t)
F(t)
M
Mo
o
M ln(2)/1000
o
t
t
t
Figure 12: Plot of M (t), F (t), F 0 (t) for problem 7.38
(d) The mean time of decay is given by
!
Z 1000 −kt
Z 1000
−kt 1000
e
e
−1000k
−kt
−
dt = −2000e
+2
t̄ = 2k
e−kt dt
te
dt = 2k t
−k 0
−k
0
0
0
2
e−kt 1000
= −2000e−1000k − (e−1000k − 1)
= −2000e−1000k + 2
−k 0
k
2 1
1
1 − 1000k
1000(1 − ln 2)
= −1000 −
− 1 = −1000 + =
=
≈ 442.6950408
k 2
k
k
ln 2
Z
1000
25
Moments, Variance, and Standard Deviation
7.39
If p(x) is a probability density distribution on [a, b] then its “First moment” M1 , is just its mean,
Rb
Rb
x2 p(x)dx. We also
√
define the variance, V , and standard deviation, σ, as follows: V = M2 − (M1 )2 and σ = V .
Use these definitions to compute the mean, variance, and standard deviation of the following
probability density functions:
M1 = x̄ =
a
xp(x)dx, and its “Second moment” M2 is defined by M2 =
a
(a)
p(x) =
(
C, 0 ≤ x ≤ b
0 otherwise
(b) p(x) = ke−kx (x ≥ 0).
(c) p(x) = 2(1 − x) (0 ≤ x ≤ 1).
Solution
√
(a) C=1/b. Mean=b/2. M2 = b2 /3, V = b2 /12, σ = b/(2 3).
(b) Mean = x̄ = k 0∞ xe−kt dx. By Integration by Parts, we find x̄ = k1 .
R
M2 = k 0∞ x2 e−kt dx. Using Integrationqby Parts twice, M2 = k22 .
Therefore, V = k22 − k12 = k12 , and σ = k12 = k1 .
R
(c) Mean = x̄ =
M2 =
R1
0
R1
(2x2 − 2x3 )dx =
Therefore, V =
2
2
0 (2x − 2x )dx = x −
1
6
−
1
9
=
3
18
2x3
3
−
−
2
18
1
x4 =
2
0
=
1
,
18
2x3
3
1
.
6
1
=
and σ =
1
.
3
0
q
1
18
=
1
√
.
3 2
7.40
Consider the uniform probability distribution p(x) = C, a ≤ x ≤ b. (See Figure 9).
(a) Find the variance and the standard deviation.
(b) Find cumulative distribution function, F (x) for this probability density.
Solution
(a) First, we must find C such that p(x) is a probability density function:
Z
b
a
C dx = 1 ⇒ (b − a) C = 1 ⇒ C =
26
1
.
b−a
To find the variance and the standard deviation, we need to find both M1 and M2 .
1
M1 = µ =
b−a
1
M2 =
b−a
Z
Z
b
a
b
a
x2 dx =
Therefore, by some elementary algebra:
b2 + ab + a2
a+b
V = M2 − µ =
−
3
2
2
b2 − a 2
2
1
x dx =
b−a
!2
!
=
b+a
.
2
b3 − a 3
b2 + ab + a2
=
.
3(b − a)
3
=
4b2 + 4ab + 4a2 − 3(a2 + 2ab + b2 )
12
(b − a)2
b2 − 2ab + a2
=
.
=
12
12
Finally the standard deviation is
σ=
√
b−a
b−a
V = √
= √ .
12
2 3
(b) The cumulative distribution function is F (x) =
Z
x
a
x−a
1
dt =
.
b−a
b−a
7.41
Consider the function p1 (x), −b ≤ x ≤ b, which is given by
p1 (x) =
(
c
x+c
b
− bc x + c
if − b ≤ x ≤ 0
if 0 ≤ x ≤ b
Find the variance and the standard deviation for p1 (x).
Solution
We use the formula V = M2 − µ2 to calculate the variance and standard deviation.
V =
cb3
6
!2
2
−0 =
cb3
6
!2
=
√
b2
cb3
b4
,σ = V =
= .
36
6
6
27
7.42
The function
π
p(x) = C sin
x , 0 ≤ x ≤ 6,
6
is the probability density function for a random jump of x units at some large track meet.
(a) Determine the constant C.
(b) Find the zeroth, the first, and the second moments of this probability distribution, i.e.
calculate
I0 =
Z
6
0
p(x) dx,
I1 =
Z
6
0
x p(x) dx,
I2 =
Z
6
0
x2 p(x) dx.
(c) Use the results of (b) to determine the mean, the variance, and the standard deviation of the
jump distance.
Solution
(a)
Z
6
0
π
C sin
x
6
πx
6C
dx = −
cos
π
6
(b) We use integration by parts:
6
=
0
π
12C
=⇒ C = .
π
12
I0 = 1 by the definition of a probability density function.
I1 = C
I2
Z
6
0
πx
x sin
6
6x
πx
36
πx
dx = C − cos
+ 2 sin
π
6
π
6
6
=
0
π 36
·
=3
12 π
216
π2
1
πx
πx
πx
πx
x sin
dx = C 3 − x2 cos
+ 2 cos
+ πx sin
= C
6
π
36
6
6
3
6
0
π 216
18(π 2 − 4)
=
· 3 · (π 2 − 2 − 2) =
≈ 10.70
12 π
π2
Z
6
2
Note: I1 = 3 by symmetry of p(x).
! 6
0
√
(c) By symmetry we have µ = 3. We use the formulas V = I2 − µ2 and σ = V to calculate the
variance and standard deviation:
s
√
√
18(π 2 − 4)
9π 2 − 72
9π 2 − 72
9π 2 − 72
V =
V
=
≈ 1.306.
−
9
=
≈
1.705,
σ
=
=
π2
π2
π2
π
28
7.43
Given below is the distribution of the number of heads (H) obtained by a group of people in an
experiment in which each person tossed the coin ten times. (N (x)=number of people who got x
heads.) Use the spreadsheet to plot the (empirical) probability distribution of obtaining x heads
in 10 tosses based on this data and the cumulative distribution (of obtaining up to k heads) on
the same graph. Use the spreadsheet to calculate the expected number of heads based on the
same data. Submit a graph of the probability distribution and cumulative distribution on which
the calculated expected value is given.
num heads x
0
1
2
3
4
5
6
7
8
9
10
num people N (x)
0
1
4
15
17
25
21
13
3
2
1
Solution
We show below how the data is organized in the spreadsheet:
Column a contains the number x of heads from 1 to 10.
Column b contains the number of people who got x heads.
Column c totals up the size of the group of people. (There were 102 people in all).
The numbers in column d are then the fraction of the group that got a given number of heads,
which is a0/102, b0/102... This is the probability p(x) of getting x heads.
Column e computes the cumulative function F (x) (0, e0+d0, e1+d1...)
Column f computes xp(x), or a0*d0, a1*d1...
Finally, column g computes the mean value of x for the probability density by adding up xp(x)
for x going from 1 to 10 (0, g0+f0, g1+f1...)
Figure 13 then shows the two functions p(x) and F (x) on the same graph.
29
1.0
cumulative distribution
probability of k heads
0.0
-1.0
10.0
Figure 13:
a
0.0000
1.0000
2.0000
3.0000
4.0000
5.0000
6.0000
7.0000
8.0000
9.0000
10.0000
b
c
d
0.0000
0.0000 0.0000
1.0000
1.0000 0.0098
4.0000
5.0000 0.0392
15.0000 20.0000 0.1471
17.0000 37.0000 0.1667
25.0000 62.0000 0.2451
21.0000 83.0000 0.2059
13.0000 96.0000 0.1275
3.0000 99.0000 0.0294
2.0000 101.0000 0.0196
1.0000 102.0000 0.0098
e
0.0000
0.0098
0.0490
0.1961
0.3627
0.6078
0.8137
0.9412
0.9706
0.9902
1.0000
30
f
0.0000
0.0098
0.0784
0.4412
0.6667
1.2255
1.2353
0.8922
0.2353
0.1765
0.0980
g
0.0000
0.0098
0.0882
0.5294
1.1961
2.4216
3.6569
4.5490
4.7843
4.9608
5.0588