



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Solutions to various probability problems, including finding the value of c for a given probability density function, finding the expected value and variance of a random variable, and determining the probability of certain events based on given information. The problems involve calculating probabilities using integrals and solving equations.
Typology: Exams
1 / 5
This page cannot be seen from the preview
Don't miss anything!




Problem 1 (20%). Figure 1 shows the graph of a probability density function f (x) whose equation is of the form
f (x) = cx(1 − x) (0 ≤ x ≤ 1)
for a certain value of c. A random variable X has f (x) as its probability density function.
0.50.5 11
Figure 1. PDF y = cx(1 − x).
(a) Find the value that c must have. (b) Find the expected value of X. (Hint: there’s an easy way to do this one. (c) Find the variance and standard deviation of X. (d) Show how to find the third quartile of X, i.e. the value of k such that P (X ≤ k) = 0. 75. You will not be able to actually solve the equation; just write the equation down.
Solution.
(a) To be a probability density function, the area under the graph of f must be 1. But ∫ (^1)
0
cx(1 − x) dx =
0
cx − cx^2 dx =
cx^2 − c
x^3
1
0
c 6
In order for this to be 1, we must therefore have c = 6. (b) By symmetry, the center of mass of the graph lies over x = 1/2. Therefore the expectation of X is given by μ = 1/2. You can also do this by calculus. The expectation is the integral of x fX (x), i.e.
μ =
0
x 6 x(1 − x) dx
0
6 x^2 − 6 x^3 dx
2 x^3 −
x^4
1
0 = 2 −
I leave it to you to decide which is easier. (c) We use the simplified formula for the variance,
Var(X) =
0
x^2 f (x) dx − μ^2.
(The only catch is, you have to remember to subtract off μ^2 !) The first part is ∫ (^1)
0
x^26 x(1 − x) dx =
0
6 x^3 − 6 x^4 dx
x^4 −
x^5
1
The variance is therefore 3 10
The standard deviation is the square root of the variance,
σ =
It’s also valid to compute the variance as ∫ (^1)
0
x −
6 x(1 − x) dx.
This still works out to be 1/ 20 ≈ 0 .05, but it’s a little more work. (d) We want to find the value of k such that P (X ≤ k) = 0. 75. But
P (X ≤ k) =
∫ (^) k
0
6 x(1 − x) dx
= (3x^2 − 2 x^3 )
k
0 = 3k^2 − 2 k^3 , and therefore the required equation is 3 k^2 − 2 k^3 = 0. 75 We didn’t ask you to solve this equation, because cubic equa- tions are hard to solve; anyway, the exact answer, 1 2
1 − i
−1 + i
3
−1 + i
1 + i
is too complicated to be of any use. (It’s typical for such cu- bic equations that it seems to involve cube roots of complex numbers, despite the fact that all three roots are real. If you actually evaluate that last line on a calculator that does com- plex calculations, you’ll find the imaginary part is zero.) The numerical solutions to this cubic are k = 1. 26604 , k = 0. 673648 , k = − 0. 439693 , and the only root in [0, 1] is the middle one, k = 0.673648.
Problem 2. (15%) Assume boys and girls are born with equal prob- ability 1 / 2 , and independently of previous children born to the same parents. At the local PTA meeting, Jim overhears John say that he (John) has two children.
(a) Draw a tree diagram illustrating the four possibilities for the sexes of John’s children. (b) What is the probability that John has exactly one boy and one girl? (c) Later, Jim overhears John mention that one of his children is a boy; but Jim doesn’t hear whether it was the firstborn or not. With no further information, what should Jim conclude is the probability that John’s other child is also a boy?
Solution. This is a famous example of how people’s intuition about probability is often wrong: the majority of people given this problem believe that the answer to part (c) should be 1/2, and are surprised to learn it is only 1/3.
(a) I was astonished at, and disappointed in, the tree diagrams which people drew. First, organize what you’re representing. In this case, we have two children; so there is a first-born, then a second-born. (Obfuscating by worrying about twins doesn’t cut it; no pair of twins has ever been born at exactly the same time, one always comes out before the other.) The diagram we get is basically the same diagram we get for flipping a coin twice:
B
B
G
G
B
G
Note that the nodes of the graph contain the events, in this case B (for boy) or G (for girl). The probabilities appear along the edges. While I stretched this point for this exam, you will be cut no slack on future exams for missing these points! Finally, what would you make of a two-level tree which began with two branches labeled “First child” and “Second child”? The branches of a tree represent alternatives: different possible outcomes of an experiment. “First” and “Second” children aren’t alternatives.
Problem 5 (20%). Suppose that 5% of the population has pediculosis. (Don’t know what it is? Look it up–later!) A new diagnostic test is devised with the following characteristics:
Of people who have pediculosis, 99% test positive and 1% test negative;
Of people who do not have pediculosis, 4% test positive and 96% test negative.
(a) Draw a tree or table to illustrate the situation. (b) What is the probability that a randomly chosen person tests positive and has pediculosis? (c) What is the probability that a randomly chosen person has pedicu- losis, given that he tests positive?
Solution. Did you look up “pediculosis”? Yep, that’s right–it’s head lice. (It’s hard to imagine a better test than combing the hair with a fine-tooth comb, but let’s leave the icky subject at that.)
(a) We’ll do this by a tree. (A table solution would be similar.)
Ped
Ped
0.05x0.99=0.
0.05x0.01=0. 0.95x0.04=0.
0.95x0.96=0. (b) Since the probability of a compound event is obtained by mul- tiplying the edge probabilities which lead to that compound event, we see that P (Ped&+) = 0. 05 × 0 .99 = 0. 0495. (c) We have, by the definition of conditional probability,
P (Ped|+) =
P (Ped&+) P (+)
Now we have to expand P (+) = P (+ and Ped) + P (+&Ped) = 0. 05 × 0 .99 + 0. 95 × 0. 04 = 0.0495 + 0.038 = 0. 0875.
Thus, finally,
P (Ped|+) =
Better than a 50% chance, which might make you nervous if you test positive for pediculosis.
Problem 6. (15%) The Snakes For A Plane corporation sells cartons of snakes, nominally 25 to a carton; but the actual number of snakes per carton varies, partly from cannibalism, partly from the reluctance with which handlers count the snakes, with probability distribution as follows:
Number of snakes 22 23 24 25 26 Probability 0.07 0.10 0.15 0.38 0.
(a) Find the expected value and standard deviation for the number of snakes in a carton. (b) Among those boxes with 25 or more snakes, find the expected value of the number of snakes. (Be careful!! The probability distribution has changed! To find the new probabilities, compute the probability that X = x, given that X ≥ 25 .)
Solution.
(a) The calculation is ugly but brief: μ = 22 × 0 .07 + 23 × 0 .10 + 24 × 0 .15 + 25 × 0 .38 + 26 × 0 .30 = 24. 74. We could even do this by inspection; the mean is clearly some- where around 25, so if we subtract 25 from all the values we find μ = 25 + (−3) × 0 .07 + (−2) × 0 .10 + (−1) × 0 .15 + 0 × 0 .38 + 1 × 0. 30 = 24. 74. There’s no easy way to do the standard deviation: the variance, σ^2 , can either be computed by σ^2 = (22 − 24 .74)^2 × 0 .05 + (23 − 24 .74)^2 × 0 .10 + (24 − 24 .74)^2 × 0. 15
or by the formula σ^2 = E(X^2 ) − μ^2. In either case, 1.4124 is the variance; the standard deviation is given by σ =
(b) Among those boxes with 25 or more snakes, find the expected value of the number of snakes. Many students restricted their attention to just a part of the above table, and computed the
Number of snakes 25 26 Probability 0.38 0.
new value of μ as μ = 25 × 0 .38 + 26 × 0 .30 = 17. 3. But this can’t be right–how can the expected value of a quantity which can only take values of 25 or more be as low as 17.3?! The reason is that this last table doesn’t represent a probability distribution–the sum of the probabilities is only 0.68, not 1. We have to divide all the entries by 0. 68. This is justified by, e.g.,
P (X = 25|X ≥ 25) =
P ((X = 25) and (X ≥ 25)) P (X ≥ 25)
=
Notice that we have used the logical fact that (X = 25) and (X ≥
Number of snakes 25 26 Probability 0. 38 / 0. 68 0. 3 / 0. 68
and now we can compute μ = 25 × 0 .4412 + 26 × 0. 5588 ≈ 25. 4412. But an easier way to do the same thing would be to compute the contribution to μ from the original table, 25 × 0 .38 + 26 × 0 .30 = 17. 3 and divide it by 0.68.
Notice that an answer of 25.4412 makes better sense than one of 17.3; the values of X are all 25 or more, so the mean should also be at least 25.
.