#11 page 363

  1. The price of one share of stock in the Pilsdorff Beer Company is given by \(Y_n\) on the \(n_{th}\) day of the year. Finn observes that the difference \(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

\(a. \geq 100\) \(b. \geq 110\) \(c. \geq 120\)

For each problem we can use the pnorm function. Given that \(X_n\) is an independent variable. The Central Limit Theorem will approximatley follow a normal distribution with a mean of 0 and variance of \(n * \frac{1}{4}\). Since the pnorm function gives us the area to the left we need to subtract it from 1.

a <- 1 - pnorm(100,100, sqrt(365/4))
b <- 1 - pnorm(110, 100, sqrt(365/4))
c <- 1 - pnorm(120, 100, sqrt(365/4))
  1. P(\(Y_{365}\geq 100\)) = 0.5
  2. P(\(Y_{365}\geq 110\)) = 0.1475849
  3. P(\(Y_{365}\geq 120\)) = 0.0181435
  1. Calculate the expected value and variance of the binomial distribution using the moment generating function.

\[expected~value:\\ m_x(t) = \\ E[e^{tx}] = \\ \sum^{n}_{x = 0} * e^{tx}p(x) = \\ \sum^{n}_{x = 0} * e^{tx} \begin{pmatrix}n\\ x\end{pmatrix} p^xq^{n-x} = \\ \sum^{n}_{x = 0} * e^{tx} \begin{pmatrix}n\\ x\end{pmatrix} (pe^t)^xq^{n-x} = \\ (q + pe^t)^n \\ m'(x) = n(q + pe^t)^{n-1}*pe^t = \\ npe^t(q+pe^t)^{n-1} = \\ np * 1 (q+p)^{n-1} = \\ np * 1^{n-1} = \\ expected~value = np \] \[variance: \\ \sigma^2 = m''(0) - m'(0)^2 \\ = n(n-1)p^2 + np - (np)^2 \\ = n^2p^2 - np^2 + np - n^2p^2 = \\ np(1-p) = \\ variance = npq \]

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

\[ m_x(t) = \int\limits_0^\infty e^{tx}\lambda e^{-\lambda x}dx \\ = \lambda \int\limits_0^\infty e^{-x(\lambda - t)} dx \\ = -(\frac{\lambda}{\lambda - t}) e ^{-(\lambda - t)x} |^{\infty} _{0} \\ = m_x(t) = \frac{\lambda}{\lambda - t} \\ = \frac{\lambda}{(\lambda - t)^2} \\ = \frac{1}{\lambda} \\ expected ~ value = m'(0) = \lambda^{-1} \] \[ variance:\\ = m''(0)−m′(0)^2 \\ =\frac{2}{\lambda^2}\\ = \frac{1}{\lambda^2} \]