#Question 1. 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

365 * 0.25
## [1] 91.25

The probability distribution is given by N(100,91.25)

  1. ≥ 100.

Answer:

pnorm(100-100,0,sqrt(91.25))
## [1] 0.5
  1. ≥ 110.

Answer:

pnorm(110-100,0,sqrt(91.25), lower.tail = F)
## [1] 0.1475849
  1. ≥ 120.

Answer:

pnorm(120-100,0,sqrt(91.25), lower.tail = F)
## [1] 0.01814355

#Question 2. Calculate the expected value and variance of the binomial distribution using the moment generating function.

Answer:

\(g(t) = \sum_{j=0}^n e^{tj} {{n}\choose{j}}p^jq^{n-j}\)

\(g(t) = \sum_{j=0}^n {{n}\choose{j}}(pe^t)^jq^{n-j}\)

\(g(t) = (pe^t+q)^n\)

\(g'(t) = n(pe^t+q)^{n-1}pe^t\)

\(g''(t) = n(n-1)(pe^t+q)(pe^t)^2 + n(pe^t+q)^npe^t\)

\(g'(0) = n(p+q)^{n-1}p =np\)

\(g''(0) = n(n-1)p^2 + np\)

\(\boxed{\mu = \mu_1 = g'(0) = np}\)

\(\sigma^2 = \mu_2-\mu_1^2 = g''(0) - g'(0)^2\)

\(\sigma^2 = n(n-1)p^2 + np - (np)^2\)

\(\sigma^2 = np[(np-p) +1 -np]\)

\(\boxed{\sigma^2 = np[1-p]}\)

since p + q = 1.

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

Answer:

\(g(t) = \int_0^\infty e^{tx}\lambda e^{-\lambda x} dx\)

=>\(g(t) = \frac{\lambda e^{(t-\lambda )x}}{t -\lambda}|_0^{\infty}\) =>\(g(t) = \frac{\lambda}{\lambda-t}\) On taking first derivative and equating it to 0 we find \(g'(t) = \frac{\lambda}{(\lambda-t)^2}\) \(g'(0) = \frac{\lambda}{\lambda^2} = \frac{1}{\lambda}\) On taking second derivative and equating it to 0 we find \(g''(t) = \frac{2\lambda}{(\lambda-t)^3}\) \(g''(0) = \frac{2\lambda}{\lambda^3} = \frac{2}{\lambda^2}\) Hence we can see mean is : \(\mu = g'(0) = \lambda^{-1}\) variance is : \(\mu_{2} - \mu_{1}^2\) =

\(\sigma^2 = g''(0) - g'(0)^2 = \frac{2}{\lambda^2} - \frac{1}{\lambda^2} = \lambda^{-2}\)