Ex. 11, p. 363

The price of one share of stock in the Pilsdorff Beer Company (see Exercise 8.2.12) is given by Yn on the nth day of the year. Finn observes that the differences Xn = Yn+1 − Yn appear to be independent random variables with a common distribution having mean µ = 0 and variance σ2 = 1/4. If Y1 = 100, estimate the probability that Y365 is:

The pnorm function can be utilized to solve this problem.

  1. Greater than or equal to 100 => P(Y365−Y1≥0)
## [1] 0.5
  1. Greater than or equal to 110 => P(Y365−Y1≥10)
## [1] 0.1472537
  1. Greater than or equal to 120 => P(Y365−Y1≥20)
## [1] 0.01801584
  1. Calculate the expected value and variance of the binomial distribution using the moment generating function.

The binomial distribution is defined as:

\(P(X=k) = {n \choose k} p^k q^{n-k}\), where \(q=1-p\).

The moment generating function is defined as

\(M_X(t)=(q+pe^t)^n\).

and the first moment is:

\(M'_X(t) = n(q+pe^t)^{n-1}pe^t\).

Then the expected value is derived by solving \(M'_X(t)\) for \(t =0\):

\[ \begin{split} E(X)=M'_X(0) &= n(q+pe^0)^{n-1}pe^0\\ &= n(q+p)^{n-1}p\\ &= np(1-p+p)^{n-1}\\ &= np1^{n-1}\\ &=np \end{split} \]

Given the second moment is:

\(M''_X(t) = n(n-1)(q+pe^t)^{n-2}p^2 e^{2t}+n(q+pe^t)^{n-1}pe^t\).

The variance is obtained by solving for \(t =0\) to obtain \(u{2}\) and the caluculating variance using:

\(V(X)=E(X^2)-E(X)^2\):

\[ \begin{split} E(X^2)=M''_X(0) &= n(n-1)(q+pe^0)^{n-2}p^2 e^0+n(q+pe^0)^{n-1}pe^0\\ &= n(n-1)(1-p+p)^{n-2}p^2+n(1-p+p)^{n-1}p\\ &= n(n-1)p^2+np \end{split} \]

Given \(E(X)\) and \(E(X^2)\) variance is calcuated as: \(V(X)=E(X^2)-E(X)^2\):

\[ \begin{split} V(X) &= n(n-1)p^2+np-n^2p^2 \\ &= np((n-1)p+1-np) \\ &= np(np-p+1-np) \\ &= np(1-p) \\ &= npq \end{split} \]

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

Given the exponential distribution is:

\(f(x)=\lambda e^{-\lambda x}\)

and the moment generating function is given by:

\(M_X(t)=\frac{\lambda}{\lambda-t}, t<\lambda\).

and the first and second moment are:

\(M'_X(t) = \frac{\lambda}{(\lambda-t)^2}\)

and

\(M''_X(t) = \frac{2\lambda}{(\lambda-t)^3}\).

We calculated E(x) amd V(x) as follows:

E(x)

\[ \begin{split} E(X)=M'_X(0) &= \frac{\lambda}{(\lambda-0)^2} \\ &= \frac{\lambda}{\lambda^2}\\ &= \frac{1}{\lambda} \end{split} \]

V(x)

\[ \begin{split} V(X) = E(X^2)-E(X)^2 &= M''_X(0)-M'_X(0)^2 \\ &=\frac{2\lambda}{(\lambda-0)^3} - \frac{1}{\lambda^2}\\ &=\frac{2\lambda}{\lambda^3} - \frac{1}{\lambda^2}\\ &=\frac{2}{\lambda^2} - \frac{1}{\lambda^2}\\ &=\frac{1}{\lambda^2} \end{split} \]