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

In order to solve this problem we can apply the concept of Central Limit Theorem.

\(Z=\dfrac{\bar{X}-\mu}{\sigma/\sqrt{n}}=\dfrac{\sum\limits_{i=1}^n X_i-n\mu}{\sqrt{n}\sigma}\)

It’s given that the difference between prices on different days is \(X_n = Y_{n+1} − Y_n\)

The price on the nth day equals to the price on the first day and the sum of differences between prices from day n to day n

\(Y_n=Y_1+\sum _{ i=1 }^{ n-1 }{ { x }_{ i } }\)

\(\sum _{ i=1 }^{ n-1 }{ { x }_{ i } }=Y_n-Y_1\)

Let’s substitute \(\sum\limits_{i=1}^n X_i\) with \(\sum _{ i=1 }^{ n-1 }{ { x }_{ i } }=Y_n-Y_1\) and n with n-1

\(Z=\dfrac{Y_n-Y_1-(n-1)\mu}{\sigma\sqrt{n-1}}\)

mu <- 0
n <- 365-1
Y_1 <- 100
var <- 1/4
  1. find \(P(Y_365 ≥ 100)\)
Y_n <- 100
1-pnorm((Y_n-Y_1-(n-1)*mu)/(sqrt(var)*sqrt(n)))
## [1] 0.5
  1. find \(P(Y_365 ≥ 110)\)
Y_n <- 110
1-pnorm((Y_n-Y_1-(n-1)*mu)/(sqrt(var)*sqrt(n)))
## [1] 0.1472537
  1. find \(P(Y_365 ≥ 120)\)
Y_n <- 120
1-pnorm((Y_n-Y_1-(n-1)*mu)/(sqrt(var)*sqrt(n)))
## [1] 0.01801584

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

The Moment Generating Function of the binomial distribution is described by the following formula:

\(M(t) = [(1 – p) + pe^t]^n\)

In order to find the mean we need to find the first derivative of M(t) and calculate M’(0).

\(M’(t) = n(pe^t)[(1 – p) + pe^t]^{n - 1}\)

\(\mu =M’(0) = n(pe^0)[(1 – p) + pe^0]^{n - 1} = n(p*1)[(1 – p) + p*1]^{n - 1} = np[1]^{n - 1} = np\)

In order to find the variance we need to find the second derivative of M(t) and calculate \(M’’(0)-[M’(0)]^2\).

\(M’’(t) = n(n - 1)(pe^t)2[(1 – p) + pe^t]n - 2 + n(pe^t)[(1 – p) + pet]^{n - 1}\)

\(M’’(0) = n(n - 1)(pe^0)^2[(1 – p) + pe^0]^{n - 2} + n(pe^0)[(1 – p) + pe0]^{n - 1} = n(n - 1)(p*1)^2[(1 – p) + p*1]^{n - 2} + n(p*1)[(1 – p) + p*1]^{n - 1} = n(n - 1)p^2[(1 – p) + p]^{n - 2} + np[(1 – p) + p]^{n - 1} = n(n - 1)p^2 + np\)

\(\sigma^2 = M’’(0)-[M’(0)]^2 = n(n - 1)p^2 + np - (np)^2 = n^2p^2 -np^2 + np - (np)^2=np-np^2=np(1-p)\)

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

The Moment Generating Function of the exponential distribution is described by the following formula:

\(M(t)=\dfrac{1}{1-\theta t}\)

In order to find the mean we need to find the first derivative of M(t) and calculate M’(0).

\(M’(t) = -(1-\theta t)^{-2}*-\theta\)

\(\mu=M’(0) = -(1-\theta*0)^{-2}*(-\theta)=-1*-\theta=\theta\)

In order to find the variance we need to find the second derivative of M(t) and calculate \(M’’(0)-[M’(0)]^2\).

\(M’’(t) = \theta *(-2(1-\theta t)^{-3})*(-\theta)= = 2\theta^2 (1-\theta t)^{-3}\)

\(M’’(0) = 2\theta^2 (1-\theta *0)^{-3} = 2\theta^2\)

\(\sigma^2 = M’’(0)-[M’(0)]^2 = 2\theta^2-\theta^2= \theta^2\)