advertisement

Math 5010-1, Spring 2005 Assignment 7 Problems #26, p. 174. (a) If X is the value of the random number, then this algorithm needs X steps to find X. Therefore, the answer is E[X] = 1 · 1 1 + · · · + 10 · = 5.5. 10 10 I.e., our best guess is that it takes this algorithm 5.5 questions, on average, to find the secret number. (b) Let g(x) denote the number of questions needed to find the number if the secret number is x. We are asked to find E[g(X)]. To do so, we need to know the function g. If the secret number is 1, then you ask, 1. Is it ≤ 5? Answer: Yes. So now your list has been reduced to 1, 2, 3, 4, 5. 2. Is it ≤ 3? Answer: Yes. So now your list has been reduced to 1, 2, 3. 3. Is it ≤ 2? Answer: Yes. So now your list has been reduced to 1, 2. 4. Is it ≤ 1.5? Answer: Yes, and you found the number. It took four questions to find the number one. Therefore, g(1) = 4. Similarly, g(2) = g(9) = g(10) = 4. For all other values of x ∈ {3, 4, 5, 6, 7, 8}, g(x) = 3 (check!). Therefore, P {g(X) = 4} = P {X = 1 or 2 or 9 or 10} = 4/10. Whereas P {g(X) = 3} = 6/10. Therefore, 4 6 34 E[g(X)] = 4 × +3× = = 3.4. 10 10 10 This is a lot better, on average, than the first method. #27, p. 174. Let C = the amount charged, and Y = the total fortune after a year. That is, if E occurs, then Y = −A + C, whereas Y = C otherwise. We know that P (E) = p. Therefore, E[Y ] = (−A + C)p + C(1 − p), which we wish to be 0.1A. That is, (−A + C)p + C(1 − p) = 0.1A. Equivalently, C = (0.1 + p)A. #28, p. 174. Let X denote the number of defectives in the sample. Then 16 16 4 P {X = 0} = P {X = 2} = 3 P {X = 1} 20 , 3 16 4 1 2 , P {X = 20 3 = 2 20 3 1 , 4 3 20 . 3 3} = Therefore, 16 4 2 1 20 3 E[X] = 16 4 1 2 20 3 +2 1 4 3 20 . 3 +3 #8, p. 229. E[X] = R∞ 0 x2 e−x dx = Γ(3) = 2! = 2 (hours). #11, p. 229. Let s denote the length of the shorter segment, and ` the longer one. Then, s + ` = L. We seek 1 s ≤ = P {4s ≤ `} = P {4s ≤ L − s} = P {5s ≤ L} = P {S ≤ L/5}. P ` 4 That is, we want the probability that either X ≤ L/5 or X ≥ 4L/5. This is Z L/5 Z L L 4L 1 1 2 P X≤ +P X ≥ = dx + dx = . 5 5 L 5 0 4L/5 L #31, p. 231. (a) First, we compute E{|X − a|} for any a ∈ (0, A). Then, we minimize it using the methods of calculus. ! Z Z a Z A 1 A 1 E{|X − a|} = |x − a| dx = (a − x) dx + (x − a) dx A 0 A 0 a ! Z a Z A−a 1 y dy + z dz (z = x − a, y = a − x) = A 0 0 1 a2 (A − a)2 1 A2 2 = + = a + − aA . A 2 2 A 2 Call this function [of a] ψ(a). Then, ψ 0 (a) = 1 (2a − A) , A ψ 00 (a) = 2 ≥ 0. A The second assertion implies that if we let ψ 0 = 0, then we wll be finding minima. But ψ 0 = 0 implies that a = A/2; i.e., we ought to build the fire station halfway in between 0 and A. (b) By definition, f (x) = λe−λx for x ≥ 0. As in (a), we have Z ψ(a) := E{|X − a|} = a −λx (a − x)λe Z dx + 0 ∞ (x − a)λe−λx dx. a To find the first integral, let u = (a − x) and v 0 = λe−λx to find that u0 = −1 and v = −e−λx . Therefore, Z a −λx (a − x)λe x=a Z + −λx dx = −(a − x)e x=0 0 −λa =a+ 1−e λ 2 . 0 a e−λx dx Similarly, Z ∞ −λx (x − a)λe x=∞ Z + ∞ −λx dx = (x − a)e x=a a e−λx dx a e−λa = . λ Therefore, ψ(a) = a + e−λa 1 1 − e−λa + =a+ . λ λ λ Obviously, this is minimized at a = 0. Theoretical Exercises #6, p. 180. Simply follows the hint: By reversing the order of the sums, we have: ∞ X P {N ≥ i} = i=1 = ∞ X ∞ X P {N = j} = i=1 j=i ∞ X j ∞ X X P {N = j} j=1 i=1 jP {N = j} = E[N ]. j=1 #32, p. 183. There are 2n subsets of {1, . . . , n}. Therefore, there are 2n − 1 nonempty subsets of {1, . . . , n}. One is chosen at random; X denotes its cardinality. We want E[X]. Therefore, first we want P {X = j}, and the relevant n j’s are j = 1, . . . , n. There are n n k subsets of size k. Therefore, P {X = k} = k /(2 − 1), whence we have n n 1 X n 1 X n! E[X] = n k = n k k 2 −1 2 −1 k!(n − k)! k=1 n X k=1 (n − 1)! (k − 1)!((n − 1) − (k − 1))! k=1 n n−1 n X n−1 n X n−1 = n . = n 2 −1 k−1 2 − 1 i=0 i = 2n n −1 k=1 Because Pm i=0 m i = 2m , it follows that E[X] = n2n−1 n = n−1 . n 2 −1 2 − 12 3 Similiarly, n n 1 X 2 n 1 X 2 n! E[X ] = n k = n k 2 −1 k 2 −1 k!(n − k)! 2 1 = n 2 −1 k=1 n X k=1 n n! 1 X n! k(k − 1) + n k k!(n − k)! 2 − 1 k!(n − k)! k=1 k=1 | {z } =E[X] = 1 n 2 −1 n X k=2 n! n2n−1 + n . (k − 2)!(n − k)! 2 − 1 Therefore, n n(n − 1) X (n − 2)! n2n−1 E[X ] = n + n 2 −1 (k − 2)!((n − 2) − (k − 2))! 2 − 1 k=2 n−2 n(n − 1) X n − 2 n2n−1 = n + n 2 − 1 i=0 i 2 −1 2 = n2n−1 n(n − 1)2n−2 + n2n−1 n(n − 1)2n−2 + = . 2n − 1 2n − 1 2n − 1 Factor out n2n−2 to find that E[X 2 ] = n2n−2 n−1+2 2n−2 = n(n + 1) . 2n − 1 2n − 1 Therefore, n−1 2 2n−2 n2 Var(X) = n(n + 1) n − 2 −1 2n − 1 n(n + 1)(2n − 1)2n−2 − n2 22n−2 = (2n − 1)2 n22n−2 − n(n + 1)2n−2 = . (2n − 1)2 To understand the asymptotics for large n, first note that (2n − 1)2 ∼ 22n . Therefore, Var(X) ∼ n2n − n(n + 1) 2n−2 (n2n − n(n + 1)) = . 22n 2n+2 But n + 1 is asymptotically negligible compared to 2n . Therefore, the numerator is ∼ n2n , whence we have Var(X) ∼ n/22 = n/4. #8, p. 233. Define Y = X/c so that with probability one, 0 ≤ Y ≤ 1. This means that Y 2 ≤ Y , whence E[Y 2 ] ≤ E[Y ]. Thus, Var(Y ) = E[Y 2 ] − (E[Y ])2 ≤ E[Y ] 1 − E[Y ] . 4 Now α := E[Y ] ∈ [0, 1], and f (x) = x(1 − x) has its maximum at x = 1/2, where f (1/2) = (1/4). Therefore, E[Y ]{1 − E[Y ]} ≤ 1/4, whence we have Var(Y ) ≤ 1 . 4 Because Var(Y ) = Var(X/c) = c−2 Var(X), the desired result follows. 5