#11. Page 363
The price of one share of stock in the Pilsdorff Beer Company (see Exercise 8.2.12) is given by \(Y_n\) on the \(n\)th 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 (a) \(\geq 100\). (b) \(\geq 110\). (c) \(\geq 120\).
Solutions:
The price of one share of stock \(Y n\) is independent variable. The sigma of daily price is \(X n(=Y n+1-Y n)\), a random variable with \(\mu=0\) and \(\delta=\) \(0.5, z\) is a critical value for normal distribution of the price change, since
\[ \begin{gathered} Y n=Y 1+\sum_{i=1}^{364} X_i \\ \mu=\frac{\sum_{i=1}^{364} X_i}{364}=0 \end{gathered} \]
Let \(z\) be a standard normal random variable and n = 365,
\[ z=\frac{\sum_{i=0}^{365} X_i-n \mu}{\delta \sqrt{n-1}}=\frac{Y n-Y 1}{\delta \sqrt{364}}=\frac{Y n-Y 1}{\sqrt{91}} \] Probability that \(Y_{365}\) is (a) \(\geq 100\) is
#To find the probability of P(Z >= 0) for standard normal random variable Z, pnorm funcion is used:
1-pnorm((100-100)/(sqrt(91)))
## [1] 0.5
Probability that \(Y_{365}\) is (b) \(\geq 110\) is
1-pnorm((110-100)/(sqrt(91)))
## [1] 0.1472537
Probability that \(Y_{365}\) is (c) \(\geq 120\) is
1-pnorm((120-100)/(sqrt(91)))
## [1] 0.01801584
Solutions:
Suppose \(X\) has a Binomial (n, p) distribution. Then its moment generating function is
\[ \begin{aligned} M(t) & =\sum_{x=0}^x e^{x t}\left(\begin{array}{l} n \\ x \end{array}\right) p^x(1-p)^{n-x} \\ & =\sum_{x=0}^n\left(\begin{array}{l} n \\ x \end{array}\right)\left(p e^t\right)^x(1-p)^{n-x} \\ & =\left(p e^t+1-p\right)^n \end{aligned} \]
The expected value (mean) is calculated by taking the \(k\)-th derivative of the MGF at \(t=0\) is \(E(X)=M_X^{\prime}(0)\).
The derivative of \(M_X(t)\) with respect to t is
\[ M_X^{\prime}(t)=n p e^t\left(1-p+p e^t\right)^{n-1} \]
at \(t=0, E(X)=M_X^{\prime}(0)=n p\)
The variance of \(X, \operatorname{Var}(X)\) can be calculated using the second moment:
\[ \operatorname{Var}(X)=E\left(X^2\right)-(E(X))^2 \]
To find \(E\left(X^2\right)\), calculate the second derivative of the MGF at \(t=0\) :
\[ M_X^{\prime \prime}(t)=n p e^t\left(1-p+p e^t\right)^{n-1}+n(n-1) p^2 e^{2 t}\left(1-p+p e^t\right)^{n-2} \]
at \(t=0, E\left(X^2\right)=M_X^{\prime \prime}(0)=n p+n(n-1) p^2\)
Substitute value of \(E\left(X^2\right)\) into \(\operatorname{Var}(\mathrm{X})\),
\[ \operatorname{Var}(X)=E\left(X^2\right)-(E(X))^2=n p+n(n-1) p^2-(n p)^2=n p(1-p) \]
Solutions:
The Moment generating function of a random variable \(\mathrm{X}\) is defined as,
\[ M_X(t)=\mathrm{E}\left(e^{t X}\right) \]
The Moment generating function of the exponential distribution is,
\[ M_X(t)=\frac{\lambda}{\lambda-t}, t<\lambda \]
The expected value \(E(X)\) is calculate the first derivative of the MGF with respect to \(t=0\) :
\[ E(X)=M_X^{\prime}(0)=\frac{d}{d t}\left(\frac{\lambda}{\lambda-t}\right)=\frac{1}{(\lambda-t)^2}=\frac{1}{\lambda} \]
The variance \(\operatorname{Var}(X)\) can be calculated by taking the second derivative of the MGF with respect to \(t\) and then evaluate it at \(\mathrm{t}=0\) :
\[ \begin{gathered} \operatorname{Var}(X)=M_X^{\prime \prime}(0)=\frac{d^2}{d t^2}\left(\frac{\lambda}{\lambda-t}\right) \\ M_X^{\prime \prime}(0)=\frac{2 \lambda}{(\lambda-t)^3}=\frac{2}{\lambda^2} \\ \delta^2=E\left(X^2\right)-E(X)=\frac{2}{\lambda^2}-\frac{1}{\lambda^2}=\frac{1}{\lambda^2} \end{gathered} \]