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 \(σ2 = 1/4\). If \(Y1 = 100\), estimate the probability that \(Y365\) is:
M <- 0
SD<- sqrt(0.25)
N <- 365-1
Q <- 0-M/sqrt(N)
pnorm(Q, M, SD, lower.tail = FALSE)
## [1] 0.5
Q <- 10/sqrt(N)
pnorm(Q, M, SD, lower.tail = FALSE)
## [1] 0.1472537
Q <- 10/sqrt(N)
pnorm(Q, M, SD, lower.tail = FALSE)
## [1] 0.1472537
Calculate the expected value and variance of the binomial distribution using the moment generating function.
\(\binom{n}{x} p^{x} q^{n-x}\)
\(\sum_{x=1}^{n} e^{tx} \binom{n}{x} p^{x} q^{n-x}\)
\(\sum_{x=1}^{n} \binom{n}{x} {(pe^t)}^x q^{n-x}\)
\({(pe^t + q)}^n\)
The Expected value, is found by taking the first derivative of MGF and then substitute t by 0. E(x) = np
\(Var(x) = E(X^2) - E(X)^2 = np(1-p)\)
Calculate the expected value and variance of the exponential distribution using the moment generating function.
\(M(t) = \int_{0}^{\infty} e^{tx} \lambda e^{-x\lambda}\)
\(= \lambda \int_{0}^{\infty} e^{-x(\lambda - t)}\)
\(= \lambda / {(\lambda - t)}\)
\(E(X) = 1/\lambda\)
\(E(X^2) = 2/{\lambda ^2}\)
\(Var(X) = E(X^2) - E(X)^2\)
\(= 2/{\lambda ^2} - 1/{\lambda ^2}\)
\(= 1/{\lambda ^2}\)