61solutions1

advertisement
Stat61 - Homework #1 – SOLUTIONS (9/21/07)
About cumulative distribution functions (cdf’s)
A random variable X (whatever that is) has a cumulative distribution function, denoted
F:R->R (or FX if we need to emphasize which random variable it applies to). The cdf
can be interpreted in these ways:
F(x) = fraction of values of X that are ≤ x; or, equivalently,
F(x) = probability that a given value of X is ≤ x.
1. Suppose that FX(x) = 1 – e-x/10. What fraction of the values of X are…
a. Less than or equal to 10
F(10) = 1-e-10/10 = 0.632121
b. Exactly equal to 10
zero.
To see this formally: It must be smaller than F(10)-F(10-) for
any positive , and these numbers can be made as small as we
like.
c. In the closed interval [ 5, 10 ]
F(10)-F(5) = (1-e-10/10)-(1-e-5/10) = 0.238651
Strictly speaking, that’s the fraction of values in the half-open
interval (5, 10]. But the fraction of values that are exactly 5 is
zero, so it doesn’t matter.
d. In the set [1, 2]  [3, 4]
[(1-e-2/10)-(1-e-1/10) ] + [ (1-e-4/10)-(1-e-3/10) ] = 0.156605
e. Odd, when truncated to the next lower integer. (That is, if we choose
random values of X and drop the fractions, what fraction are odd?)
The set of values we’re talking about is
[1,2)  [3,4)  [5,6)  [7,8)  …
because those are exactly the numbers which, when truncated, give
odd integers. So the answer we want is
A = [(1-e-2/10)-(1-e-1/10) ] + [(1-e-4/10)-(1-e-3/10) ]+ [(1-e-6/10)-(1-e-5/10) ]+…
or
A = e-1/10 – e-2/10 + e-3/10 – e-4/10 + e-5/10 – e-6/10 + …
This is a geometric series, but even if you don’t notice that you might
think of multiplying A by e1/10 to get
e1/10A = 1 – e-1/10 – e-2/10 + e-3/10 – e-4/10 + e-5/10 – …
1
and now when we add the last two equations, almost everything cancels
and we get
A + e1/10A = 1
whence the answer is
A = 1/(1+e1/10) = 0.475021.
2. Whatever a random variable is, it ought to be possible to make random draws from its
distribution. That is, we ought to be able to pick a sequence of numbers
a1, a2, a3, … such that in the long run, the ai’s are distributed in the way
described by FX(x). This exercise suggests one way of doing this.
Suppose we make random draws this way:
(1) Pick a random number t uniformly in [0,1], perhaps by using the Excel
RAND( ) function
(2) Let a = F-1 (t). (That is, find a such that F(a) = t.)
Assume that F(x) is still given by F(x) = 1 – e-x/10.
a. If we choose random numbers uniformly in [0,1], what fraction of them
are ≤ 0.615487 ?
“Uniformly” means that each interval has probability in
proportion to its length, so the fraction in the interval [0,
0.615487] is exactly 0.615487.
b. What is F-1(t) ?
F-1(t) = -10 ln (1-t)
c. If our first selection for t is 0.615487, what is our first selection for a ?
F-1(0.615487) = 9.557777
d. If we choose numbers a in this way, what fraction of them are
less than or equal to 9.557777 ?
To get a value of a ≤ 9.557777, we need a value of t ≤ 0.615487.
So the fraction of such values is 0.615487. This is
F(9.557777).
e. In general, given x, what fraction of our random draws are ≤ x ?
Always F(x). So we have succeeded in finding a method of
drawing random numbers that have the distribution described
by F(x).
2
Back to reality: Problems related to Sections 2.2 through 2.5
3. (based on text problem 2.2.4) Suppose that two cards are dealt from a standard 52card poker deck. Let A be the event that the sum of the two cards is 8 (assume that aces
have a numerical value of 1).
a. Describe a reasonable sample space S.
All pairs of distinct cards:
S = { (A, K), (A, Q), …, (3, 2) }
but not (A, A)
b. How many elements are in S? (Not 52.)
52 × 52 – 52 = 2652
c. How many elements of S are in A?
108
(16 each of the form A7, 26, 35, 53, 62, 7A but only 12 of the
form 44)
d. Given reasonable assumptions, what is P(A) ?
P(A) = 108 / 2652  0.040724
(The reasonable assumption is that we choose the uniform, or
classical, probability measure. Otherwise you could have any
answer you want.)
4. (based on 2.2.32) Let A and B be any two subsets of S. Use Venn diagrams to show
the following:
a. (A  B)C = AC  BC
b. (A  B)C = AC  BC.
(These are called DeMorgan’s laws.)
5. Suppose that S = { 1, 2, 3, … } and that P({s}) = (2/3s) for each value of s.
a. Verify that P(S) = 1, by adding P({s}) for all values of s.
A = 2/3 + 2/9 + 2/27 + 2/81 + … (another geometric series)
3A = 2 + 2/3 + 2/27 +…
(3A-A) = 2
so A = 1.
3
b. If A is the event that s is odd. That is, A = {1, 3, 5, 7, …}. What is P(A) ?
P(A) = 2/3 + 2/27 + 2/243 + …
9 P(A) = 6 + 2/3 + 2/27 + …
(9 P(A) – P(A) ) = 6
so P(A) = 6/8 = 3/4.
Also, do these problems from the text.
Section 2.3, problems 2.3.10 and 2.3.11 (both use theorem 2.3.6);
2.3.10. Answer is 2/3.
2.3.11. Answer is 30%.
Section 2.4, problems 2.4.5, 2.4.28, and 2.4.42.
(2.4.5 is a famous trick question. To clarify problem 2.4.42:
If oil is low, light flashes 99% of time.
If oil is not low, light flashes 2% of time.
Before we looked at the light, we thought that P(oil low) = 0.10.
The light is flashing. Now what is the probability that oil is low? )
2.4.5.
The answer depends on the probability measure we assign to the threeelement sample space. If we decide to assign equal probabilities to
the three elements, the answer to the question is (1/3)/(2/3) = ½. But
it makes no sense to do that; the sensible probability measure is P(BB)
= ¼, P(BG) = ½, P(GG) = ¼ . The answer to the question is then 1/3, just
as on page 45.
This is a famous trick question because it is counterintuitive, and it is
counterintuitive because it is difficult to imagine a physical event that
really corresponds directly to the abstract event “at least one boy”.
2.4.28.
(1000/4000)(0.60) + (1000/4000)(0.55) + (2000/4000)(0.35) = 0.4625
2.4.42.
(0.099) / (0.099 + 0.018) = 11/13
4
Section 2.5, problems 2.5.1, 2.5.2, 2.5.4.
2.5.1.
a. A and B are NOT mutually exclusive---P(AB) > 0, so AB can’t be empty.
b. A and B are NOT independent---we would need P(AB) = P(A)P(B) = 0.3,
which isn’t the case.
C
c. P(A BC) = 0.8 (see the first Venn diagram above)
2.5.2.
Not independent, since 0.35 × 0.40 ≠ 0.12. Fail both with probability 0.37.
2.5.4.
[ Urn 1: 3 red, 2 black, 5 white; Urn 2: 2 red, 4 black, 3 white.]
Both red: (3/10)(2/9) = 6/90
Both black: (2/10)(4/9) = 8/90
Both white: (5/10)(3/9) = 15/90
Both same color = sum of these = 29/90 (answer)
(end)
5
Download