9.3 - Problem 11

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 \(X_n = Y_{n+1} − Y_n\) appear to be independent random variables with a common distribution having mean μ = 0 and variance \(\sigma^2 = 1/4\). If \(Y_1 = 100\), estimate the probability that \(Y_{365}\) is

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

Given:
\(Y_1 = 100\)
\(\sigma^2 = 1/4\)
\(\mu = 0\)
\(X_n = Y_{n+1} - Y_n\) => \(Y_{n+1} = X_n + Y_n\)

  1. \(P(Y_{365} \geq 100) = P(x +100 \geq 100) = P(x \geq 0)\)
x <- 0; mu <- 0; sd <- sqrt(365/4)
cat(sprintf("%s = %f \n", c("P(Y365 ≥ 100)"), c(1 - pnorm(x, mean = mu, sd = sd, lower.tail = TRUE))))
## P(Y365 ≥ 100) = 0.500000
  1. \(P(Y_{365} \geq 110) = P(x +100 \geq 110) = P(x \geq 10)\)
x <- 10; mu <- 0; sd <- sqrt(365/4)
cat(sprintf("%s = %f \n", c("P(Y365 ≥ 110)"), c(1 - pnorm(x, mean = mu, sd = sd, lower.tail = TRUE))))
## P(Y365 ≥ 110) = 0.147585
  1. \(P(Y_{365} \geq 120) = P(x +100 \geq 120) = P(x \geq 20)\)
x <- 20; mu <- 0; sd <- sqrt(365/4)
cat(sprintf("%s = %f \n", c("P(Y365 ≥ 120)"), c(1 - pnorm(x, mean = mu, sd = sd, lower.tail = TRUE))))
## P(Y365 ≥ 120) = 0.018144

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


\(g(t) = \sum^n_{j=0} e^{tx}\left( \begin{array}{c} n \\ x \end{array} \right) p^x(1-p)^{n-x} = \sum^n_{j=0} \left( \begin{array}{c} n \\ x \end{array} \right) (pe^t)^x(1-p)^{n-x} = (1-p + pe^t)^n\)

1st derivative, let’s find the expected value E(X):

\(g'(t) = \frac{dg}{dt} = npe^t( 1 - p + pe^t)^{n-1}\)

At t = 0 => \(E(X) = \frac{dg(0)}{dt} = np((1-p) + p)^{n-1} = np\)

2nd derivative, let’s find variance V(X):

\(g''(t) = \frac{d^2M_x(t)}{dt^2} = npe^t((n-1)(1 - p + pe^t)^{n-2}pe^t) + g'(t)\)

At t = 0 => \(E(X^2) = g''(0) = np(n-1)[1-p+pe^0]^{n-2}pe^0e^0 + g'(t) = np^2(n-1) + g'(t) = np^2(n-1) + np\)

\(V(X) = E(X^2) - (E(X))^2 = np^2(n-1) + np - n^2p^2 = n^2p^2 -np^2 +np - n^2p^2 = np - np^2 = np(1-p)\)


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


\(g(t) = \int_{0}^{\infty} e^{tx}\lambda e^{-\lambda x} dx = \lambda \int_{0}^{\infty}e^{(t-\lambda) x} dx = \frac{\lambda}{t-\lambda}\)

1st derivative, let’s find the expected value E(X):

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

At t = 0 => \(E(X) = g'(0) = \frac{\lambda}{(\lambda)^2} = \frac{1}{\lambda}\)

2nd derivative, let’s find variance V(X):

\(g''(t) = \frac{2\lambda}{(\lambda - t)^3}\)

At t = 0 => \(E(X^2) = g''(0) = \frac{2\lambda}{\lambda^3} = \frac{2}{\lambda^2}\)

\(V(X) = E(X^2) - (E(X))^2 = \frac{2}{\lambda^2} - \frac{1}{\lambda^2} = \frac{1}{\lambda^2}\)