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 Xn = Yn+1 − Yn 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:
\(\ge 100 = P\left(Z\ge \frac{100-100}{\sqrt{(365-1)\sigma^2}}\right)=0.5\).
\(\ge 110= P\left(Z\ge \frac{110-100}{\sqrt{(365-1)\sigma^2}}\right)=0.01472\).
\(\ge 120= P\left(Z\ge \frac{120-100}{\sqrt{(365-1)\sigma^2}}\right)=0.0180\).
We suppose that Xn is normal distrubuted
x <- c(100, 110, 120)
for (i in 0:length(x)){
mu <- 0
dx <- x[i]-100
n <- 365-1
q <- dx/sqrt(n)
sd <- sqrt(1/4)
p <- pnorm(q, mu, sd, lower.tail = FALSE)
print(p)
}
## numeric(0)
## [1] 0.5
## [1] 0.1472537
## [1] 0.01801584
\(M_X(t)=E[e^{Xt}]\\ =\sum_{k=0}^{n}e^{tk}\begin{pmatrix} n\\ k \end{pmatrix}p^k(1-p)^{}n-k\\ =\sum_{k=0}^{n}(pe^t)^k\begin{pmatrix} n\\ k \end{pmatrix}(1-p)^{}n-k\\ = (pe^t+1-p)^n\)
The mean \(\mu=E(X)=M_{X}^{'}(0)=\frac{d}{dt}M_X(t)|_{t=0}=n(pe^t+1-p)^{n-1}pe^t|_{t=0}=np\)
\(M_{X}^{''}(0)=\frac{d^2}{dt^2}M_X(t)|_{t=0}=\frac{d}{dt}M_X^{'}(t)|_{t=0}\\ = n(n-1)(pe^t+1-p)^{n-2}(pe^t)^2+n(pe^t+1-p)^{n-1}pe^t|_{t=0}\)
\(E(X^2)=M_{X}^{''}(0)=n(n-1)p^2+np\)
The variance is \(\sigma^2= E(X^2)-E^{2}(X)=n(n-1)p^2+np-n^2p^2=np(1-p)\)
The mean \(\mu=E(X)=M_{X}^{'}(0)=\frac{d}{dt}M_X(t)|_{t=0}=\frac{\lambda}{(\lambda-t)^2}|_{t=0}=\frac{1}{\lambda}\)
\(E(X^2)=M_{X}^{''}(0)=\frac{d^2}{dt^2}M_X(t)|_{t=0}=\frac{d}{dt}M_X^{'}(t)|_{t=0}=\frac{2\lambda}{(\lambda-t)^3}|_{t=0}=\frac{2}{\lambda^2}\)
The variance is \(\sigma^2= E(X^2)-E^{2}(X)=\frac{1}{\lambda^2}\) Source: A First Course in Probability. Sheldom Ross.