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 \(Y_{365}\) is

Here

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

E(x)=µ=0

??=1/2

n=364.

  1. \(>= 100\)
mean <- 100  
var <- 1/4
n <- 364  
1 - pnorm(100,mean,91, lower.tail=T)
## [1] 0.5
  1. \(>= 110\)
1 - pnorm(110, mean, n*var)
## [1] 0.4562483
  1. \(>= 120\)
1 - pnorm(120,mean,n*var)
## [1] 0.4130212
  1. Calculate the expected value and variance of the binomial distribution using the moment generating function.

binomial distribution, \(P_X(j) = {n \choose j} p^j q^{n-j}\) where q = 1-p

I am using help from example 10.2 from reading book and tutorial from https://www.thoughtco.com/

Moment Generating Function

Use this probability mass function to obtain the moment generating function of X:

\(g(t) = \sum_{j=0}^{n}n e^{tj}{n \choose j}p^jq^{n - j}\)

\(g(t)=(q+pe^t)^n\).

The expected value is the first moment evaluated at t=0:

\(g^{'}(t)=n(pe^t + q)^{n-1}pe^t\).

t = 0

we get

\(g^{'}(t)=np\)

The calculation of the variance is performed in a similar manner. First, differentiate the moment generating function again, and then we evaluate this derivative at t = 0

\(g^{''}(t)=n(n-1)p^2 + np\)

The variance \(\sigma^2\) of your distribution is

\(\sigma^2 = g^{''}(0) - [g^{'}(0)]^2 = n(n - 1)p^2 +np - (np)^2 = np(1 - p)\)

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

For exponential distribution, \(f(x)=\lambda e^{-\lambda x}\).

The moment generating function is \(M_X(t)=\frac{\lambda}{\lambda-t}, t<\lambda\).

\(M'_X(t) = \frac{\lambda}{(\lambda-t)^2}\) and \(M''_X(t) = \frac{2\lambda}{(\lambda-t)^3}\).

Expected value:

\[ \begin{split} E(X)=M'_X(0) &= \frac{\lambda}{(\lambda-0)^2} \ &= \frac{\lambda}{\lambda^2}\ &= \frac{1}{\lambda} \end{split} \]

Variance:

\[ \begin{split} V(X) = E(X^2)-E(X)^2 &= M''_X(0)-M'_X(0)^2 \ &=\frac{2\lambda}{(\lambda-0)^3} - \frac{1}{\lambda^2}\ &=\frac{2\lambda}{\lambda^3} - \frac{1}{\lambda^2}\ &=\frac{2}{\lambda^2} - \frac{1}{\lambda^2}\ &=\frac{1}{\lambda^2} \end{split} \]

We arrived at the known definitions for binomial distribution - \(E(X)=1/\lambda\) and \(V(X)=1/\lambda^2\)