Pg. 363 #11
The price of one share of stock in the Pilsdorff Beer Company (see Exercise 8.2.12) is given by \(Y_n\) on the nth 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\) = 1/4 .If \(Y_1\) = 100, estimate the probability that \(Y_{365}\) is
  • \(\geq 100\)

  • \(\geq 110\)

  • \(\geq 120\)

\(E(X) = μ = 0\)

\(σ^2 = 1/4\)

\(σ = 1/2\)

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

\(Y_{365} = Y_1 + \sum_{i=1} ^{364} X_i\)

\(S_n\) is the sum of day-to-day differences up to n days, which are independent and identically distributed random variables. The day to day difference is \(Y_{n+1} - Y_n\). Starting with \(Y_1\) = 100 and adding all the differences for the remaining 364 days = \(Y_{365}\)

Referring to the Central Limit Theorem for a Discrete Independent Trial (Pg. 343) Let \(S_n\) = \(X_1 + X_2 + ... + X_n\) be the sum of \(n\) discrete independent random variables with common distribution having expected value \(μ\) and variance \(σ^2\) \[ \lim_{n\to\infty} P(a <\frac{S_n -nμ}{\sqrt{nσ^2}} < b) = \frac{1}{\sqrt{2\pi}} \int_{a}^{b} e^{-x^2/2} \,dx \]

The sum of independent variables \(X_n\) should be between \(0\) and \(∞\) with \(n = 364\) is \[ 0 \leq S_n \leq ∞ \]

Referring to the Central Limit Theorem, we can express the standardized sum (Pg. 341) which standardizes \(S_n\) to have expected value of \(0\) and variance \(1\) in this format;

\[ S_n^* = \frac{S_n - nμ}{\sqrt(nσ^2)} = \frac{Y_{365} - Y_1 - nμ}{\sqrt{n}σ} \]

For the lower bound, for the first case where P >= 100 \[ \frac{100 - 100 -364*0}{\sqrt(364)* 1/2} = 0 \] For the upper bound, for the first case where P >= 100 \[ \frac{∞ - 100 -364*0}{\sqrt(364)* 1/2} = ∞ \]

Given info

# Given
mean <- 0
n <-  364
var <- 1/4
sd <-  sqrt(var)
y_1 <- 100

\(P \geq 100\)

pnorm(100-y_1, mean, sqrt(n*var) ,lower.tail = FALSE)
## [1] 0.5

\(P \geq 110\)

pnorm(110-y_1, mean, sqrt(n*var),lower.tail = FALSE)
## [1] 0.1472537

\(P \geq 120\)

pnorm(120-y_1, mean, sqrt(n*var) ,lower.tail = FALSE)
## [1] 0.01801584

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

By definition, a MGF (Pg. 366) is the sum of their probabilities * \(e^{tj}\) ;

\[ g(t) = E(e^{tX}) = \sum_{k=0}^{∞} \frac{μ_k t^k}{k!} = \sum_{j=1}^{∞} e^{tx_j}p(x_j) \]

For a binomial distribution \[ p_X(j) = \binom{n}{j}p^jq^{n-j} \] So the MGF g(t)

\[ g(t) = \sum_{j=0}^n e^{tj} \binom{n}{j}p^jq^{n-j} = (pe^t +q)^n \] To find variance and the mean, we need to calculate the first and the second derivative of the MGF with respect to t, and evaluate at 0. The first derivative is \[ g'(t=0) = npe^t(pe^t +1-p)^{n-1} = npe^0(pe^0 +1-p)^{n-1} = np(p-p+1)^{n-1} = np(1)^{n-1} = np \]

The second derivative is \[ g''(t=0) = npe^t(pe^t - p +1)^{n-2} (npe^t -p+1) = npe^0(pe^0 - p +1)^{n-2} (npe^0 -p+1) = np(np-p+1) \]

The expected value is \(μ_1 = g'(0) = np\).

The variance is \(μ_2 = g''(0) = np(np-p+1)\).


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

For an exponential distribution, for \(x \geq 0\) \[ p_X(j) = λ e^{-λx} \]

So the MGF g(t), where \(t < λ\) \[ g(t)=\int^∞_0 e^{tx}*λ e^{-λ x} = e^{-λ} \sum_{j=0}^∞ \frac{{(e^t λ)}^j}{j!} = -\frac{λ}{λ-t} \]

To find variance and the mean, we need to calculate the first and the second derivative of the MGF with respect to t, and evaluate at 0. The first derivative is \[ g'(t=0) = -\frac{-λ}{(λ-t)^2} = \frac{λ}{(λ-0)^2} = \frac{1}{λ} \]

The second derivative is \[ g''(t=0) = λ(-2)\frac{1}{(λ-t)^3}(-1) = \frac{2λ}{(λ-0)^3} = \frac{2}{λ^2} \]

The expected value is \(μ_1 = g'(0) = \frac{1}{λ}\).

The variance is \(μ_2 = g''(0) = E(X^2)-E(X)^2 = \frac{2}{λ^2} - (\frac{1}{λ})^2 = \frac{1}{λ^2}\).