The price of one share of stock in the Pilsdorff Beer Company (see Problem 8.2.12) is given by Yn on the nth day of the year. Finn observes that the differences Xn = Yn+1 − Yn appears to be independent random variable with a common distribution having mean μ = 0 and variance σ2 = 14 .

If Y1 >= 100, estimate the probability that Y365 is

1-pnorm((100-100)/(0.5*sqrt(365)))
## [1] 0.5

If Y1 >= 110, estimate the probability that Y365 is

1-pnorm((110-100)/(0.5*sqrt(365)))
## [1] 0.1475849

If Y1 >= 120, estimate the probability that Y365 is

1-pnorm((120-100)/(0.5*sqrt(365)))
## [1] 0.01814355

Calculate the expected value and variance of the binomial distribution using the moment generating function

M(t) = E[e^(tX)] = (pe^t + (1 - p))^(n)

then take the first derivative of M(t), with respect to t

M’(t) = n(pe^t + q)^(n-1) * pe^t

Then set t=0 E[X] = n(pe^0 + q)^(n-1) * pe^0 = n(p + q)^(n-1) * p = np The expected value is np

Then take the second derivative of M(t) M’’(t) = n(n-1)(pe^t + q)^(n-2) * (pet)2 + n(pe^t + q)^(n-1) * pe^t

then set t=0 E[X^2] = n(n-1)(p + q)^(n-2) * p^2 + n(p + q)^(n-1) * p = n(n-1)p^2 + np

Then use this formula: Var[X] = E[X^2] - (E[X])^2

sub in the first and second derivative: Var[X] = n(n-1)p^2 + np - (np)^2 = n(n-1)p^2 + np - n2p2 = np(1-p)

Calculate the expected value and variance of the exponential distribution using the moment generating function

M(t) = E[e^(tX)] = ∫[e^(tx) * λ * e^(-λx) dx] for x = 0 to ∞

M(t) = λ / (λ - t) for t < λ

Take first derivative of M(t) M’(t) = λ / (λ - t)^2

then set t to zero: E[X] = λ / (λ - 0)^2 = λ / λ^2 = 1/λ Then take the second derivative of M(t) M’’(t) = 2λ / (λ - t)^3

then sub in t = 0 E[X^2] = 2λ / (λ - 0)^3 = 2λ / λ^3 = 2/λ^2

Then insert into this equation: Var[X] = E[X^2] - (E[X])^2

Var[X] = 2/λ^2 - (1/λ)^2 = 2/λ^2 - 1/λ^2 = 1/λ^2