Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Stat 426 : Homework 2 solutions. Moulinath Banerjee University of Michigan October 18, 2005 Announcement: For purposes of the homework, you can cite any results in the handouts or the text-book or any others proved in class, without proof. The homework carries a total of 60 points, but contributes 4 points towards your total grade. • 1. A random variable X is said to have a distribution symmetric about 0 if the distribution of X is the same as that of −X. Let X be a continuous random variable with continuous density function f . (i) Show that X is distributed symmetrically about 0 if and only if f (t) = f (−t), for every t. In other words f is an even function. Solution: Suppose f (t) = f (−t) for all t. Now, a direct application of the change of variable theorem yields that the density g of −X is related to the density of X by the equation g(x) = f (−x). But we know that f (−x) = f (x) showing that g(x) = f (x) for all x. Thus X and −X have the same density and consequently the same distribution function. Conversely, suppose that X and −X have the same distribution. Let F be the distribution of X. If G is the distribution function of −X, then G(x) = P (−X ≤ x) = P (X ≥ −x) = 1 − P (X ≤ −x) = 1 − F (−x) . By hypothesis, G = F and hence g, the density of −X equals f , the density of X. But g(x) = d (1 − F (−x)) = f (−x) dx showing that f (x) = f (−x) for all x. (ii) Suppose that X has an expectation; in other words Z | x | f (x) dx < ∞ . 1 Then show that E(X) = 0. ( 3 + 3 = 6 points) Solution: Since X and −X have the same distribution and X has an expectation, so does −X and E(X) = E(−X) = −E(X) which implies that 2 E(X) = 0 and hence E(X) = 0. • 2. Let (X, Y ) be distributed jointly with a spherically symmetric density. In other words, let their joint density f (x, y) = C g(x2 + y 2 ) , for some non-negative function g. Show that (²1 X, ²2 Y ) has the same distribution as (X, Y ), where ²1 and ²2 are either 1 or -1. Deduce that X and Y are uncorrelated. ( 6 points) Solution: Use the change of variable theorem once again. Setting U = ²1 X and V = ²2 Y , note that X = ²1 U and Y = ²2 V . Now the density of (U, V ) is given by, ¯ ¯ ¯∂ x ∂ y ∂ x ∂ y ¯ ¯, h(u, v) = f (x(u, v), y(u, v)) ¯¯ − ∂u ∂v ∂ v ∂ u¯ and thus, h(u, v) = C g(²21 u2 + ²22 v 2 ) |²1 ²2 | and recalling that ²1 and ²2 both have absolute value 1, we get h(u, v) = C g(u2 + v 2 ) . Thus (X, Y ) ≡d (²1 X, ²2 Y ). In particular (X, Y ) ≡d (X, −Y ). Therefore E(XY ) = E(X × (−Y )) = −E(XY ) showing that E(XY ) = 0 as in the previous problem. It also follows easily that EX = 0 = EY . Consequently Cov(X, Y ) = 0 and hence X and Y are uncorrelated. • 3. This exercise outlines the construction of what is known as the Poisson process. As a warming up exercise, let’s do some calculus first. (i) Recall that, for α > 0, the gamma function is defined as Z ∞ Γ(α) = e−x xα−1 dx . 0 Show that Γ(α + 1) = α Γ(α) . Hint: Use integration by parts. Solution: We have, Z Γα+1 = ∞ xα+1−1 e−x dx 0 2 Z = −xα+1−1 e−x |∞ 0 ∞ +α xα−1 e−x dx 0 = 0 + α Γ(α) , where the first term is 0 because xα e−x goes to 0 as x tends to 0 and also as x tends to ∞. (ii) Deduce that Γ(n) = (n − 1)! . Solution: Γ(n) = (n − 1) Γ(n − 1) = (n − 1)(n − 2) Γ(n − 2) = . . . = (n − 1)(n − 2) . . . ...1 Γ(1) = (n − 1)! , where the last step follows on noting that Gamma(1) = 1 . (iii) If X1 , X2 , X3 , .... is a sequence of mutually independent random variables, where each is distributed as exponential with parameter λ, then show that the partial sums Sn = X1 + X2 + . . . + Xn are distributed as Gamma (n, λ); in other words, show that the distribution of Sn is, λn −λx n−1 e x . fn (x) = Γ(n) Hint: One way to do this is to prove the result for n = 2 using the formula for the density of the sum of two independent random variables, as derived in the book (or from first principles). Then, use induction. Assume that the result holds true for n − 1 and then write Sn = Sn−1 + Xn and derive the density of Sn using the density of Sn−1 and Xn and the fact that Sn−1 and Xn are independent. Solution: We show only the induction step, skipping the proof for n = 2, which can be viewed as a special case of the induction step. Now, the density of Sn−1 , under the induction hypothesis is, fSn−1 (x) = λn−1 eλ x xn−2 , x > 0 Γ(n − 1) and 0 otherwise, while the density of Xn is, fXn (y) = λ e−λ y , y > 0 and 0 otherwise. Using the formula on page 94 of Rice, which gives the formula for the density of the sum of two independent random variables, we get, that the density of Sn = Sn−1 + Xn is, Z z λn−1 fSn (z) = e−λ x xn−2 λ e−λ (z−x) dx Γ(n − 1) Z0 z λn e−λ z xn−2 dx = 0 Γ(n − 1) 3 = = z n−1 λn e−λ z Γ(n − 1) n−1 n λ e−λ z z n−1 , Γ(n) which is all that is required to show. (iv) Now define a family of random variables in the following way: N (t) be defined as, N (t) = largest integer n such that Sn ≤ t . For each t, let Here is a physical motivation: Suppose customers arrive at a counter starting from some fixed time. The inter-arrival times of the customers are assumed to be distributed independently and identically as exp(λ); in other words, the time that it takes for the first customer to arrive is an exp(λ) random variable and the time between the first customer and the second customer is an exp(λ) random variable independent of the first and so on. Note then, that the time taken for the n’th customer to arrive is precisely Sn . The number of customers arriving in time t is then counted by the random variable N (t). The family {N (t)} forms a Poisson process; each N (t) is distributed as Poi(λt). Furthermore, if t1 < t2 < . . . < tk , then N (t1 ), N (t2 ) − N (t1 ), . . . , N (tk ) − N (tk−1 ) are mutually independent and N (ti ) − N (ti−1 ) follows Poi(λ(ti − ti−1 )). Here we will only prove that the marginal distribution of N (t) is Poisson with parameter λt. (v) Show that the event {Sn ≤ t} is equivalent to the event that {N (t) ≥ n}. Hence show that, P (N (t) = n) = P (Sn ≤ t) − P (Sn+1 ≤ t) . Solution: By definition of N (t), SN (t) ≤ t and SN (t)+1 > t. Now N (t) ≤ n ⇒ Sn ≤ SN (t) ≤ t. On the other hand, N (t) < n implies that N (t) + 1 ≤ n and so Sn ≥ SN (t)+1 > t. This establishes the desired equivalence. The event {Sn ≤ t} is the same as the event {N (t) ≥ n}. The event Sn+1 ≤ t is the same as the event {N (t) ≥ n + 1}. Now, clearly P (N (t) ≥ n) = P (N (t) = n) + P (N (t) ≥ n + 1) showing that P (N (t) = n) = P (N (t) ≥ n) − P (N (t) ≥ n + 1) = P (Sn ≤ t) − P (Sn+1 ≤ t) . (vi) Now write Z P (Sn ≤ t) = t 0 4 λn −λx n−1 e x dx Γ(n) and use integration by parts to show that, P (Sn ≤ t) = e−λt (λt)n + P (Sn+1 ≤ t) . n! It follows immediately that P (N (t) = n) = e−λt (λt)n . n! Solution: Z P (Sn ≤ t) = 0 t λn −λ z n−1 e z dz Γ(n) Z t ¯ λn = (λn /Γ(n)) e−λ z (z n /n) ¯t0 + λ e−λ z z n dz n Γ(n) 0 Z t λn+1 e−λt (λt)n + e−λ z z n+1−1 dz = n! Γ(n + 1) 0 e−λt (λt)n = + P (Sn+1 ≤ t) . n! In the above derivation we have freely used the results derived in the earlier parts of the problem. ( 3 + 3 + 4 + 5 + 5 = 20 points) • 5. (i) A fair coin is tossed n times and the number of heads N is counted. The coin is then tossed N more times. Find the expected total number of heads generated by this process and the variance. Solution: Let H denote the number of tosses generated in the second phase of this process; i.e. the number of heads out of the N tosses (after the initial n tosses). We know that N follows Binomial(n, 1/2) and also that the conditional distribution of H given N is Binomial(N , 1/2). To find E(N+H) we proceed as follows: E(N + H) = EN + EH = n/2 + E(E(H | N )) = n/2 + E(N/2) = n/2 + n/4 = 3n/4 . Now Var(N+H) can be computed as follows: Var(N + H) = E[Var(N + H) | N ] + Var(E(N + H | N )) . Now, Var(N + H) | N = Var(H | N ) = N/4 , and E(N + H | N ) = 3N/2 . Thus we need to compute, E(N/4) + Var(3N/2) = n/8 + 9/4 × n/4 = 11 n/16. 5 (ii) Let Y have a density which is symmetric about 0 and let X = SY where S is independent of Y and assumes values 1 and −1 with probability 1/2. Show that Cov(X, Y ) = 0 but that X and Y are not independent. (This shows that uncorrelatedness does not necesarily imply independence.) Solution: We know that EY = 0 because the density of Y is symmetric about 0. To show that Cov(X, Y ) = 0 we only need to show that E(XY ) = 0. Now, E(XY ) = E(SY 2 ) = E(S) × E(Y 2 ) = 0 since ES = (1/2) × 1 + (1/2) × (−1) = 0. To show that X and Y are not independent, note that, given Y = y, the conditional distribution of X = SY is concentrated on the set {y, −y}; conditionally on Y = y, X assumes the value y with probability 1/2 and the value −y with probability 1/2. This is clearly different from the unconditional distribution of X which is continuous and in particular has a density. (iii) A random rectangle is generated in the following way: The base X is chosen to be a U(0,1) random variable and after having generated the base, the height of the rectangle is chosen to be uniform on (0, X). Find the expected circumference and area of the rectangle. (6 + 6 + 5 = 17 points) Solution: We know that X follows U (0, 1); we also know that the conditional distribution of H (the height) given X is U (0, X). We need to find E(2(X + H)) and E(XH). Now, E(2(X + H)) = 2 EX + 2 EH = 2 × 1/2 + 2 E(E(H | X)) = 1 + 2 E(X/2) = 3/2 . Also, E(XH) = E(E(HX | X)) = E(X E(H | X)) = E(X 2 /2) = 1/6 . 6