library(glue)

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 (a) ≥100. (b) ≥110. (c) ≥120.

≥100

a = 365*(1/4)
b = pnorm(100-100,mean = 0,sd = sqrt(a),lower.tail = FALSE)
glue('If Y1 = 100, the probability that Y365 is ≥100 is {b}.')
## If Y1 = 100, the probability that Y365 is ≥100 is 0.5.

≥110

d = pnorm(110-100,mean = 0,sd = sqrt(a),lower.tail = FALSE)
glue('If Y1 = 100, the probability that Y365 is ≥110 is {d}.')
## If Y1 = 100, the probability that Y365 is ≥110 is 0.147584879761555.

≥120

f = pnorm(120-100,mean = 0,sd = sqrt(a),lower.tail = FALSE)
glue('If Y1 = 100, the probability that Y365 is ≥120 is {f}.')
## If Y1 = 100, the probability that Y365 is ≥120 is 0.0181435485458444.
  1. Calculate the expected value and variance of the binomial distribution using the moment generating function.

an image caption Source: Question 2

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

an image caption Source: Question 3