The price of one share of stock in the Pilsdorff Beer Company (see Exer- cise 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
(a) ≥ 100.
(b) ≥ 110.
(c) ≥ 120.
mean <- 0
variance <- 1/4
sd <- sqrt(variance)
n <- 364
x1 <- (100 - 100)/sqrt(n)
pnorm(x1, mean = mean, sd = sd, lower.tail = FALSE)
## [1] 0.5
x2 <- (110 - 100)/sqrt(n)
pnorm(x2, mean = mean, sd = sd, lower.tail = FALSE)
## [1] 0.1472537
x3 <- (120 - 100)/sqrt(n)
pnorm(x3, mean = mean, sd = sd, lower.tail = FALSE)
## [1] 0.01801584
2. Calculate the expected value and variance of the binomial distribution using the moment generating function.
Moment Generating Function of binomial to calculate mean and variance:
\[\begin{equation} g(t) = \sum^\inf_{i=1}e^{tx_i}p(x_i) = (pe^t + q)^n \\\\ g^{\prime}(0) = n(pe^0 + q)^{n-1}pe^0=np \\\\ g^{\prime\prime}(0) = n(n-1)p^2+np \\\\ \mu=np \\\\ \sigma^2 = g{\prime\prime}(0)-g{\prime}(0)^2 - (np)^2 = np(1-p) \\\\ \end{equation}\]
3. Calculate the expected value and variance of the exponential distribution using the moment generating function.
Moment Generating Function of exponential to calculate mean and variance:
\[\begin{equation} g(t) = \int^{\infty}_{-\infty} e^{tx}f(x)dx = \int^{\infty}_0 e^tx\lambda e^{-\lambda x} dx = \frac {\lambda}{\lambda - t} \\\\ g^n(0)=\frac {n!}{\lambda n} \\\\ g^{\prime}(0) = \frac {1} {\lambda} \\\\ g^{\prime\prime}(0)=\frac {2}{\lambda^2} \\\\ \mu = \frac {1}{\lambda} \\\\ \sigma^2 = \frac {2}{\lambda^2}-(\frac {1}{\lambda})^2 = \frac {1}{\lambda^2} \end{equation}\]