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 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
\(\geq 100\)
\(\geq 110\)
\(\geq 120\)
\(S_{364}=X_1+X_2+...+X_{364}\)
\(E(S_{364})=0 \times 364=0\)
\(\sigma^2(S_{364})=364*1/4=91\)
\(\sigma(S_{364})=\sqrt{91}\)
Then \(P(Y_{365}\geq 100)=P(S_{364}\geq 0)\approx P(0\leq S^*_{364})=NA(0,\infty)=0.5\)
1 - pnorm(0,0,sqrt(91))
## [1] 0.5
\(P(Y_{365}\geq 110)=P(S_{364}\geq 10)\approx P(\frac{110-100}{\sqrt{91}}\leq S^*_{364})=NA(\frac{10\sqrt{91}}{91},\infty)\approx0.4562483\)
1 - pnorm(10*sqrt(91)/91,0,sqrt(91))
## [1] 0.4562483
\(P(Y_{365}\geq 120)=P(S_{364}\geq 20)\approx P(\frac{120-100}{\sqrt{91}}\leq S^*_{364})=NA(\frac{20\sqrt{91}}{91},\infty)\approx0.4130212\)
1 - pnorm(20*sqrt(91)/91,0,sqrt(91))
## [1] 0.4130212
Calculate the expected value and variance of the binomial distribution using the moment generating function.
For a binomial distribution, \(M_X(t)=(1-p+pe^t)^n\)
\(E(X)=M'(0)\) and \(M'(X)=n(1-p+pe^t)^{n-1}(pe^t)\), therefore:
\(E(X)=M'(0)=n(1-p+pe^0)^{n-1}(pe^0)\\=n(1-p+p)^{n-1}(p)\\=n(1)^{n-1}(p)\\=np\)
\(\sigma^2=M''(0)-[M'(0)]^2\), \(M'(0)=np\), and \(M''(X)=n(1-p+pe^t)^{n-1}(pe^t)+pe^t(n)(n-1)(1-p+pe^t)^{n-2}(pe^t)\), therefore:
\(\sigma^2=M''(0)-[M'(0)]^2\\=n(1-p+pe^0)^{n-1}(pe^0)+pe^0(n^2-n)(1-p+pe^0)^{n-2}(pe^0)-(np)^2\\=n(1-p+p)^{n-1}(p)+p(n^2-n)(1-p+p)^{n-2}(p)-(np)^2\\=n(1)^{n-1}(p)+p(n^2-n)(1)^{n-2}(p)-(np)^2\\=np+p^2(n^2-n)-(np)^2\\=np+n^2p^2-np^2-n^2p^2\\=np-np^2\\=np(1-p)\)
Calculate the expected value and variance of the exponential distribution using the moment generating function.
For an exponential distribution, \(M_X(t)=(1-t\lambda^{-1})^{-1}\)
\(E(X)=M'(0)\) and \(M'(X)=\lambda^{-1}(1-t\lambda^{-1})^{-2}\), therefore:
\(E(X)=M'(0)=\lambda^{-1}(1-0\lambda^{-1})^{-2}=\lambda^{-1}=\frac{1}{\lambda}\)
\(\sigma^2=M''(0)-[M'(0)]^2\), \(M'(0)=\lambda^{-1}\), and \(M''(X)=\frac{2}{\lambda ^2}(1-t\lambda ^{-1})^{-3}\), therefore:
\(\sigma^2=M''(0)-[M'(0)]^2\\=2\lambda^{-2}(1-0\lambda ^{-1})^{-3}-(\lambda^{-1})^2\\=2\lambda ^{-2}-\lambda^{-2}\\=\lambda^{-2}\\=\frac{1}{\lambda^2}\)