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
Probability and statistics May 3, 2016 Lecturer: Prof. Dr. Mete SONER Coordinator: Yilin WANG Solution Series 8 Q1. If log(X) has the normal distribution with mean µ and variance σ 2 , we say that X has the lognormal distribution with parameters µ and σ 2 . A popular model for the change in the price of a stock over a period of time of length u is to say that the price after time u is Su = S0 Zu , where Zu has the lognormal distribution with parameter µu and σ 2 u. In this formula, S0 is the present price of the stock, and σ is called the volatility of the stock price. (a) What is the expected value of S1 ? (b) Find the distribution of 1/S1 . (c) What is the expected value of 1/S1 ? (d) What are k-th moments of S1 , for k = 1, 2, . . .? Solution: (a) By definition of a lognormal distribution, N := log(Z1 ) ∼ N(µ, σ 2 ). Thus E(Z1 ) = E(eN ) = ϕN (1) = eµ+σ 2 /2 , where we have used the moment generating function of N : 2 σ 2 /2 ϕN (t) = E(etN ) = etµ+t . We get: E(S1 ) = S0 eµ+σ 2 /2 . (b) Let X := (log(Z1 ) − µ)/σ ∼ N(0, 1), µ+σX S1 = S0 e e−µ−σX 1 = . ⇒ S1 S0 Hence 1/S1 has the distribution of 1/S0 times a lognormal random variable with parameter −µ and σ 2 . (c) By question a) E(1/S1 ) = e−µ+σ 2 /2 /S0 . Note that if we use a random variable to modelize the rate of change from A to B, than its inverse will be the rate of change from B to A. The product of expected value is always 2 larger than 1 if the variance is non-zero (Jensen’s inequality). Here E(S1 )E(1/S1 ) = eσ . 1 Probability and statistics May 3, 2016 (d) The k-th moment of a lognormal distribution is easy to compute: For k = 1, 2, · · · , E(S1k ) = S0k E(ekµ+kσX ) = (S0 eµ )k ek 2 σ 2 /2 . Q2. Suppose that Z has the standard normal distribution, V has the χ-squared distribution with n degrees of freedom, and that Z and V are independent. Let Z T =p . V /n You will show that T has p.d.f. given by Γ((n + 1)/2) f (t) = √ nπΓ(n/2) −(n+1)/2 t2 1+ n t ∈ R. Recall that we have seen in Series 4, that the p.d.f. of a χ-squared with n degrees of freedom is, for some cn ∈ R: fV (x) = cn xn/2−1 e−x/2 1{x≥0} . (a) Find the joint p.d.f. of (T, V ). (b) Show first that the conditional distribution of T given V = v is normal with mean 0 and variance nv . (c) Compute cn . (d) Find the p.d.f. of T . Solution: (a) Since Z and V are independent, the p.d.f. of the couple (Z, V ) is fZ,V (z, v) = fZ (z)fV (v), √ 2 where fZ (z) = e−z /2 / 2π is the p.d.f. of standard normal distribution. By the transformation formula, one obtains the joint p.d.f. of (T, V ): r r v v fV (v) fT,V (t, v) = fZ t . n n (b) The conditional probability given V = v is r r p v/n fT,V (t, v) v v t2 √ fT |v (t) = , = fZ t = exp − fV (v) n n 2n/v 2π which is the p.d.f. of a centered normal distribution with variance n/v. One can guess it by replace directly V by v in the expression of T (which can be proven when Z and V are independent). 2 Probability and statistics May 3, 2016 (c) The cn can be computed as the constant making fV a p.d.f. (with integral 1): Z ∞ xn/2−1 exp(−x/2)dx = 2n/2 Γ(n/2). 1/cn = 0 (d) The p.d.f. of T is obtained by integrating fT,V : Z ∞ fT,V (t, v)dv fT (t) = 0 Z ∞ √ cn t2 =√ exp −v v n/2−1 e−v/2 vdv 2n 2πn 0 2 Z ∞ t cn 1 exp −v =√ + v (n+1)/2−1 dv 2n 2 2πn 0 cn Γ((n + 1)/2) =√ 2πn t2 + 1 (n+1)/2 2n 2 −(n+1)/2 2 Γ((n + 1)/2) −n/2−1/2+(n+1)/2 t √ 2 +1 = n Γ(n/2) πn 2 −(n+1)/2 t Γ((n + 1)/2) √ . = +1 n Γ(n/2) πn Q3. We would like to compute Z 1 A := −3 1 2 √ e−x /2 dx 2π using Monte-Carlo method: (a) Express A under the form E(f (U )), where U is a standard Gaussian random variable, and f an appropriate function. (b) Take (Ui )i∈N an i.i.d. family having the same law as U . Set n Sn := 1X f (Ui ). n i=1 What is the distribution of Sn − A? (c) Compute E(Sn ) and show that V ar(Sn ) = (A − A2 )/n. (d) Show that for any x > 0, P(|Sn − A| ≥ x) ≤ 1/nx2 , thus converges to 0 when n → ∞. (e) Which theorem can you apply to get directly the above convergence? Solution: (a) Set f = 1[−3,1] , then A = E[f (U )] = P(U ∈ [−3, 1]) = P(f (U ) = 1). 3 Probability and statistics May 3, 2016 (b) nSn follows the binomial law with parameter (n, A). Hence n k P(nSn = k) = A (1 − A)n−k , k or equivalently n k P(Sn − A = k/n − A) = A (1 − A)n−k . k (c) E(Sn ) = A and V ar(Sn ) = nV ar(f (Ui )/n) = (A − A2 )/n. (d) By Tchebychev inequality P(|Sn − A| ≥ x) = P(|Sn − A|2 ≥ x2 ) ≤ V ar(Sn ) 1 ≤ . 2 x nx2 The convergence is valid for all x > 0, which means that Sn converges in probability to A. To numerically approximate the value A, one can sample independently a family (Ui )i=1..n having the standard normal distribution, and counts the number of points in the interval [−3, 1] then divide by n. While the n becomes larger we get a better approximation of A. (e) We can apply the weak Law of large number. Q4. Fitting a polynomial by Methode of Least Squares Suppose now that instead of simply fitting a straight line to n plotted points, we wish to fit a polynomial of degree k (k ≥ 2). such a polynomial will have the following form: y = β0 + β1 x + β2 x2 + · · · + βk xk . The method of least squares specifies that the constants β0 , · · · , βk should be chosen that the sum n X Q(β0 , · · · , βk ) = [yi − (β0 + β1 xi + · · · + βk xki )]2 i=1 of the squares of the vertical deviations of the points from the curve is a minimum. (a) Which equation system should a minimizer β̂0 , · · · , β̂k satisfy? (b) Fit a parabola (polynomial of degree 2) to the 10 points given in the table. Solution: 4 Probability and statistics May 3, 2016 Table 1: Data for Q4.(b) i xi yi 1 2 3 4 5 6 7 8 9 10 1.9 0.8 1.1 0.1 -0.1 4.4 4.6 1.6 5.5 3.4 0.7 -1.0 -0.2 -1.2 -0.1 3.4 0.0 0.8 3.7 2.0 (a) If we calculate the k + 1 partial derivatives ∂Q/∂β0 , · · · , ∂Q/∂βk , and we set each of these derivatives equal to 0, we obtain the following k + 1 linear equations involving k + 1 unknown values β0 , · · · , βk : n n n X X X k β̂0 n + β̂1 xi + · · · + β̂k xi = yi , i=1 β̂0 n X xi + β̂1 i=1 n X i=1 x2i + · · · + β̂k n X i=1 i=1 xk+1 = i i=1 n X xi y i , i=1 .. . β̂0 n X i=1 xki + β̂1 n X xk+1 i + · · · + β̂k i=1 n X x2k i = i=1 n X xki yi . i=1 As before, if these equations have a unique solution, that solution provides the minimum value for Q. A necessary and sufficient condition for a unique solution is that the determinant of the (k + 1) × (k + 1) matrix formed by the coefficients of β̂0 , · · · , β̂k above is not zero. (b) In this example, it is found that the equations are 10β0 + 23.3β1 + 90.37β2 = 8.1, 23.3β0 + 90.37β1 + 401.0β2 = 43.59, 90.37β0 + 401.0β1 + 1892.7β2 = 204.55. The unique solution is β̂0 = −0.744, β̂1 = 0.616, β̂2 = 0.013. Hence the least squares parabola is y = −0.744 + 0.616x + 0.013x2 . 5