Data 605 Assignment Week 9

Alexander Ng

10/20/2019

Problem 1: Chapter 9.3 page 363 Exercise 11

Statement

The price of one share of stock in the Pilsdorff Beer Company (see Exercise 8.2.12) is given by \(Y_n\) on the nth day of the year. Finn observes that the differences \(X_n = Y_{n+1} − Y_n\) appear to be independent random variables with a common distribution having mean \(\mu = 0\) and variance \(\sigma_2 = 1/4\). If \(Y_1 = 100\), estimate the probability that \(Y_{365}\) is

  1. ≥ 100.
  2. ≥ 110.
  3. ≥ 120.

Solution

To apply the Central Limit Theorem, we can’t use \(Y_n\) but need to express the probability for \(Y_n\) in terms of a sum \(S_n\) of i.i.d random variables. Using simple algebra, we rearrange \(Y_n\) as a telescoping series and use the identity \(X_i = Y_{i+1}-Y_{i}\).

\[\begin{align} Y_n &= & Y_1 + (Y_2 - Y_1)+(Y_3-Y_2) + \dots + (Y_n - Y_{n-1}) \\ & = & Y_1 + X_1 + X_2 + \dots + X_{n-1} \\ Y_n - Y_1 & = & X_1 + X_2 + \dots + X_{n-1}\\ Y_n - Y_1 & = & S_{n-1} \\ \end{align} \]

It follows that for \(a < b\), by the CLT,

\[ lim_{n \rightarrow \infty } P\left[ a < \frac{ S_n - n \mu}{\sqrt{n}\sigma} < b \right] = \Phi(b) - \Phi(a)\]

We use the same approach to solve (a)-(c) by formulating a lemma stated below:

For any real \(C\), \[ P\left[ Y_{365} > 100 + C \right] \sim \Phi( -\frac{2C}{\sqrt{364}}) \] Proof of Lemma

We know that \(Y_1 = 100\) and

\[\begin{align} P[Y_n > 100 + C ] & = & P[Y_n > Y_1 + C] \\ & = & P[ Y_n - Y_1 > C ] \\ & = & P[ S_{n-1} > C ] \\ \end{align} \] By the CLT, the latter term is equivalent by minor algebra re-arrangement to:

\[\begin{align} P[S_{n-1} > C ] = P\left[ \frac{ S_{n-1} - (n-1)\mu}{ \sqrt{n-1}\sigma} > \frac{ C - (n-1)\mu}{\sqrt{n-1}\sigma} \right] \sim 1 - \Phi(\frac{C - (n-1)\mu}{\sqrt{n-1}\sigma}) \end{align} \]

Since \(\mu = 0\) and \(n=365\) and \(\sigma = 1/2\), we obtain the equivalent format: \[P\left[ Y_{365} > 100 + C \right] \sim \Phi( -\frac{C}{\sqrt{364} \frac{1}{2} } ) = \Phi(- \frac{ 2C}{\sqrt{364}}) \]

This proves the lemma.

To solve (a), set \(C=0\). To solve (b), set \(C=10\) and to solve (c), set \(C = 20\).

We calculate the estimates in R:

(prob_100 = pnorm( -2 * 0 / sqrt(364) ) )
## [1] 0.5
(prob_110 = pnorm( -2 * 10/ sqrt(364) ) )
## [1] 0.1472537
(prob_120 = pnorm( -2 * 20/ sqrt(364) ) )
## [1] 0.01801584
  1. We estimate \[P[ Y_{365} > 100 ] \approx 50.000\%\]

  2. We estimate \[P[ Y_{365} > 110 ] \approx 14.725\%\]

  3. We estimate \[P[ Y_{365} > 120 ] \approx 1.802\%\]

Problem 2

Statement

Calculate the expected value and variance of the binomial distribution using the moment generating function.

Solution

The moment generating function of the binomial distribution with parameters \(n\) and \(p\) is:

\[m(t) = (1 - p + pe^t)^n\] Using the identity \[E[X^k] = \frac{\partial^{(k)} m}{\partial t}(0)\]

We solve for the first and second derivatives with respect to \(t\):

\[\begin{align} m^{'}(t) & = & n ( 1 - p + pe^t)^{n-1}(pe^t) \\ m^{''}(t) & = & n (n-1) ( 1 - p + pe^t)^{n-2}(pe^t)^2 + n(1-p + pe^t)^{n-1}pe^t \\ \end{align} \]

Noting that when \(t = 0\), we get $ (1 - p + pe^0) = 1$ and \(pe^0 = p\), the above derivatives can be evaluated to:

\[ \begin{align} m^{'}(0) & = & E[X^1] & = & np \\ m^{''}(0) & = & E[X^2] & = & n(n-1)p^2 + np \\ \end{align} \]

The mean is of the binomial distribution is therefore \[E[X] = np\]

The variance is obtained from the identity: \[\begin{align} E[X^2] - (E[X]^2)& = & n(n-1)p^2 + np - n^2p^2 \\ V(X) & = & n^2p^2 -np^2 + np - n^2p^2 \\ & = & np - np^2 \\ & = & np(1-p) \\ \end{align} \]

Thus, the variance of the binomial distribution is \(V(X) = np(1-p)\).

Problem 3

Statement

Calculate the expected value and variance of the exponential distribution using the moment generating function.

Solution

The moment generating function of the exponential distribution is \(m(t)\) where

\[ m(t) = \frac{ \lambda}{\lambda - t} \text{ for } t < \lambda \]

Calculating the first derivative of \(m(t)\) with respect to \(t\), we obtain:

\[\begin{align} \frac{\partial m}{\partial t} & = & \lambda (-1)(\lambda - t)^{-2} (-1) \\ & = & \lambda ( \lambda - t)^{-2} \\ \end{align} \]

Setting \(t=0\), we get

\[\frac{\partial m}{\partial t}(0) = E[X] = \lambda ( \lambda - 0)^{-2} = \frac{1}{\lambda}\]

Thus the mean of the exponential distribution is \[E[X] = \frac{1}{\lambda}\]

Taking the second derivative of \(m(t)\) with respect to \(t\) we get:

\[\begin{align} \frac{\partial^2 m}{\partial t} & = & \lambda (-2)(\lambda - t)^{-3}(-1) \\ & = & \frac{ 2\lambda}{(\lambda - t)^3} \\ \end{align} \]

Plugging in \(t = 0\) gives

\[\frac{\partial^2 m}{\partial t} (0) = E[X^2] = \frac{2}{\lambda^2}\]

Lastly, using the identity for the variance \(V(X)\):

\[\begin{align} V(X) & = E[X^2] - E[X]^2 \\ & = \frac{2}{\lambda^2 } - (\frac{1}{\lambda})^2 \\ & = \frac{1}{\lambda^2} \end{align} \]

Thus, the variance of the exponential distribution is \[V(X) = \frac{1}{\lambda^2}\].