11.) 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.
a.) Since the differences appear to be independent random variables with common distribution we can use central limit theorem to solve for the probabilities.

\(Y_{365} = Y_{1} + \sum_{n=1}^{364} X_{n}\)
\(Y_{1}=100\)
\(\sigma^2=0.25\)
\(\sigma^2\) after 364 days =0.25 x 364=91
\(\mu=0\)
\(\mu\) after 364th day =364 x 0=0
\(\sigma=\sqrt 0.25\)
\(\sigma\) after 364 days=\(\sqrt 91\) =9.54

If Yn=100 and the mean after 364th day is equal to zero and also given that we are calculating a z-score for a value greater than 100, we do not even need to calculate because the price of the stock has equal probability of being greater than or equal to 100 which is 50%.

a.)

#a
pnorm(100, mean = 100, sd = 9.54)
## [1] 0.5
#could also write pnorm(0, mean = 0, sd = 9.54)

b.)

#b
pnorm(110, mean = 100, sd = 9.54,lower.tail = FALSE)
## [1] 0.1472691

c.)

#c
pnorm(120, mean = 100, sd = 9.54,lower.tail = FALSE)
## [1] 0.01802176

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

The MGF for binomial distribution is as follows: \[M(t) = E(e^{tX}) = (q + pe^t)^n\] where \(E(e^{tX})\) denotes the expected value of \(e^{tX}\).
The expected value for the binomial distribtuion can be found when setting t=0
For the first derivative: \[g'(t) = \frac{d}{dt}\left[n(p e^t + q)^{n-1} * p e^t\right] \bigg|_{t=0} = n(p e^0 + q)^{n-1} * p e^0 = n(p + q)^{n-1} * p = n * 1 * p = np\]

For the second derivative:
\[g''(t=0)=\frac{d^2}{dt^2}\left[n(n-1)(p e^t + q)^{n-2} * (p e^t)^2 + n(p e^t + q)^{n-1}* p e^t\right] \bigg|_{t=0} = n(n-1)(p + q)^{n-2} * p^2 + n(p + q)^{n-1}* p = np^2(n-1) + np\] Answer
The expected value of the first derivative is equal to the mean \[\mu = g'(t=0) = np\]

Variance is equal to the difference between first and the second derivative:
\[\sigma^2 = g''(t=0) - (g'(t=0))^2 = np^2(n-1) + np - (np)^2 = np - np^2 = np(1-p)\]

\[ M'(0) = n(q + p)^{n-1} * p = np \]

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

MGF for the exponential distribution:

\[ g(t) = e^{\lambda(e^t - 1)} \] Step 1: Calculate the first MGF derivative at \(t=0\):

First MGF derivative gives the EV which is the mean which is also the rate:

\[ g'(t) =\lambda e^t e^{\lambda(e^t - 1)} \]

First derivative at \(t=0\):

\[ g'(t=0) = \lambda e^{\lambda(e^0 - 1)} = \lambda \] Step 2: Calculate second MGF derivative at \(t=0\), which is used to calculate the variance (\(\sigma^2\)):

\[ g''(t) = \lambda e^t e^{\lambda(e^t - 1)} + \lambda^2 e^{2t} e^{\lambda(e^t - 1)} \]

Second derivative at \(t=0\):

\[ g''(t=0) = \lambda + \lambda^2 \] Answer The EV is the first derivative which is both the rate and the mean.

\[ \mu = g'(t=0) = \frac{1}{\lambda} \]

The standard deviation is the recipical of the the lambda squared. \[ \sigma^2 = \frac{1}{\lambda^2} \]