Page 363

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 = Y(n+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 (grater than 100).

1-pnorm((100-100)/(0.5*sqrt(365-1)))
## [1] 0.5

(b) ??? 110 (grater than 110).

1-pnorm((110-100)/(0.5*sqrt(365-1)))
## [1] 0.1472537

(c) ??? 120 (grater than 120).

1-pnorm((120-100)/(0.5*sqrt(365-1)))
## [1] 0.01801584

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

Binomial Distribution: \(p(x) = \binom{n}{j}p^j(q)^{n-j}\)

Moment Generating Function:

\[ \ g(t) = \sum_{j=0}^{n} e^{jt}p(x) \\ = \sum_{j=0}^{n} e^{jt} \binom{n}{j}p^j(q)^{n-j} \\ = \binom{n}{j} (pe^t)^j q^{n-j} \\ = (pe^t + q)^n \ \] If \(a = pe^t\), according to the binomial theorem:

\(\sum_{j=0}^{n} \binom{n}{j} (a)^j q^{n-j} = (a+q)^n\)

momenting generating function: \((pe^t + q)^n\)

\(\sigma^2 = E(X^2) - E(X)^2\)

\(E(X) = g'(0) = n(pe^t +q)^{n-1}pe^t\big|_{t=0} = np\) Set t = 0, we get p+q in the base and q = 1-p so p+1-p = 1; \(E(X)^2 = (np)^2\) \(E(X^2) = g''(0) = np \bigg[ e^t \big( p(n-1)(pe^t + q)^{n-2} + (pe^t + q)^{n-1} \big) \bigg]\bigg|_{t=0} =\) \(np^2(n-1)+np\)

The variance is \(V(X)=\sigma^2 = np^2(n-1)+np - (np)^2 = np(1-p)\)

So \(E(X^2)=np^2(n-1)+np\); \(V(x)= np(1-p)\)

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

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

Moment generating function: \(M_X(t)=\frac{\lambda}{\lambda-t}, t<\lambda\).

Using WolframAlpha, we get \(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} \]