## 1. Exercise 11 - Page 363

The price of one share of stock in the Pilsdorff Beer Company (see Exercise 8.2.12) is given by \(Y_n\) on the \(n\) th day of the year. Finn observes that the differences \(X_n=Y_{n+1}−Y_n\) appear to be independent random variables with a common distribution having mean \(μ=0\) and variance \(σ^2\)=\(\frac{1}{4}\). If \(Y_1=100\), estimate the probability that \(Y_365\) is

Since \(X_n=Y_{n+1}−Y_n\), also we can say \(Y_{n+1}=X_n−Y_n\) In year 1 and 2 \(Y_2 = X_1 + Y_1\) And then \(Y_{365} = Y_1 + X_1 + X_2 + X_3 + ... + X_{364}\) Because we know that \(Y_1 = 100\) and \(X_1 , X_2 , X_3 ...X_{364}\) have \(μ=0\), We know the expected value for \(Y_1\) is 100+0+0+0+…+0=100. As variance \(σ^2\)=\(\frac{1}{4}\), standard deviation is can be calculated as below, \(Y_{365}\) = 365 * \(\frac{1}{4}\) = 91.25 Therefor, SD = \(\sqrt{91.25} = 9.552\)

Using mean, \(μ=0\) and SD, \(σ = \sqrt{91.25}\)

### (a)\(≥ 100\)

`pnorm(100 - 100, mean = 0, sd = sqrt(91.25), lower.tail = FALSE)`

`## [1] 0.5`

### (a)\(≥ 110\)

`pnorm(110 - 100, mean = 0, sd = sqrt(91.25), lower.tail = FALSE)`

`## [1] 0.1475849`

### (a)\(≥ 120\)

`pnorm(120 - 100, mean = 0, sd = sqrt(91.25), lower.tail = FALSE)`

`## [1] 0.01814355`

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

The probability mass function for the binomial distribution is:

\(\binom{n}{k} (p)^k(1-p)^{n-k}\)

The moment generating function is given as \(g(t) = \sum_{j=0}^{n}(p)^k(1-p)^{n-k}e^{jt}\) = \((1-p+pe^t)^n\)

First derivative, \(g'(t) = npe^t(pe^t-p+1)^{n-1}\)

Evaluating for \(t=0\) to be determine the mean \(μ_1\) \(g'(0) = n*p*e^0(pe^0-p+1)^{n-1} = np\)

Second derivative, \(g''(t) = npe^t(pe^t-p+1)^{n-2}(npe^t-p+1)\)

Evaluating for \(t=0\) to be determine the mean \(μ_2\) \(g''(0) = npe^0(pe^0-p+1)^{n-2}(npe^0-p+1) = np(np+1-p)\)

The variance is \(μ_2-μ_{1}^{2} = np(np+1-p)np = n^2p^2(np+1-p)\)

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

The probability density function for the exponential distribution is: \(\lambda e^{-\lambda x}\)

The moment generating function is givenn as \(g(t) = \frac{\lambda}{\lambda-t}\) for \(t < \lambda\)

First derivative, \(g'(t) = \frac{\lambda}{(\lambda-t)^2}\)

Evaluating for \(t=0\) to be determine the mean \(μ_1\) \(g'(0) = \frac{\lambda}{(\lambda-0)^2} = \frac{1}{\lambda}\)

Second derivative, \(g''(t) = \frac{2}{(\lambda-t)^3}\)

Evaluating for \(t=0\) to be determine the mean \(μ_2\) \(g''(0) = \frac{2}{(\lambda-0)^3} = \frac{2}{\lambda^2}\)

The variance is \(μ_2-μ_{1}^{2} =\frac{2}{\lambda^2} - (\frac{1}{\lambda})^2 = \frac{2}{\lambda^2} - \frac{1}{\lambda^2} = \frac{1}{\lambda^2}\)