Question 1

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 \(\mu = 0\) and variance \(\sigma^2 = \frac{1}{4}\). If \(Y_1 = 100\), estimate the probability that \(Y_{365}\) is:

  1. \(\geq 100\).

  2. \(\geq 110\).

  3. \(\geq 120\).


\(Y_{365} = Y_1 + X_1 + X_2 + ... + X_{364}.\)

\(S_n = Y_{n+1} - 100\).

If \(n = 364, S_{364} = Y_{365} - 100 \ \to \ Y_{365} = S_{364} + 100\).

\(E[S_{364}] = n\mu = 364\cdot 0 = 0\).

Variance of \(S_{364} = 364\cdot\frac{1}{4} =\) 91 \(\ \to \ \sigma = \sqrt{91}\).

(a)

\(P(Y_{365} \geq 100) = P(S_{364} + 100 \geq 100) = P(S_{364} \geq 0)\).

q <- 0
mu <- 0
sd <- sqrt(91)

pnorm(q, mean = mu, sd = sd, lower.tail = F)
## [1] 0.5

(b)

\(P(Y_{365} \geq 110) = P(S_{364} + 100 \geq 110) = P(S_{364} \geq 10)\).

where q is equal to 10 in the pnorm formula

pnorm(10, mean = mu, sd = sd, lower.tail = F)
## [1] 0.1472537

(c)

\(P(Y_{365} \geq 120) = P(S_{364} + 100 \geq 120) = P(S_{364} \geq 20)\). where q u equal to 20 in the pnorm formula


pnorm(20, mean = mu, sd = sd, lower.tail = F)
## [1] 0.01801584

Question 2

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


the pmg can be described as \(\binom{n}{k}p^{n}q^{n-k}\).

And the moment generating function can be described as \(M_k(t) = E[e^{tn}], \ \ t \in \mathbb{R}\).

combining the two to solve for our matrix provides \[M_k(t) = \sum_{k=0}^{n}e^{tn}\binom{n}{k}p^{n}q^{n-k} = \sum_{k=0}^{n}(pe^t)^{n}\binom{n}{k}q^{n-k}\]

we can simplify and take the derivative as: \(M_k(t)\) wrt \(t\): \(M_{k}^{'}(t) = n(pe^t)(q+pe^t)^{n-1}\).

When \(t = 0: E[k] = np(q+p)^{n-1} = np\).

using the product rule for the second moment can be described as - \(M_k^{''}(t) = np\Big[e^{t}(pe^t + q)^{n-1}+(n-1)(pe^t + q)^{n-2}(e^tp + 0)\Big]\)

simplifying and When \(t = 0:\) provides -

\(M_k^{''}(0) = E[k^2] = np(q + p)^{n-2}(q + np) = np(q + np)\).

Using the formula \(V(x) = E[x^2] - (E[x])^2:\)

\(V(k) = np(q + np) - n^2p^2 = npq\).

Question 3

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


Proceeding in the same manner as in question 2.

The pmf for the exponential can be descibed as \(\lambda e^{-\lambda x}\).

with a moment function: \[M_x(t) = \int_{0}^{\infty}e^{tx}\lambda e^{-\lambda x} dx = \lambda \int_{0}^{\infty}e^{(t-\lambda)x} dx = \frac{\lambda}{t - \lambda}, \ \ |t| < \lambda\]

\(M_{x}^{'}(t) = \frac{\lambda}{(\lambda - t)^2}\).

now When \(t = 0:\) we can say -

\(E[X] = M_{x}^{'}(0) = \frac{1}{\lambda}\).

and the second moment can be described as -

\(E[X^2] = M_{x}^{''}(0) = \frac{2\lambda}{(\lambda - t)^3} = \frac{2}{\lambda^2}\).

Using the formula \(V(x) = E[X^2] - (E[X])^2:\)

\(V(x) = \frac{2}{\lambda^2} - \frac{1}{\lambda^2} = \frac{1}{\lambda^2}\).