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

n = 365
y1 = 100
m = 0
sd = sqrt(n * 1/4)
  1. ≥ 100.
x1 = 100
pnorm(x1-y1,m,sd,lower.tail=F)
## [1] 0.5
  1. ≥ 110.
x2 <- 110
pnorm(x2-y1,m,sd,lower.tail=F)
## [1] 0.1475849
  1. ≥ 120.
x3 <- 120
pnorm(x3-y1,m,sd,lower.tail=F)
## [1] 0.01814355

A moment refers to the expected values at each step of X^n \(E(x)\), \(E(x^2)\), \(E(x^3)\), \(E(x^4)\), …, \(E(x^n)\).

The moment generating function is defined as \(MFGx(t) = E[e^{tx}]\).To get \(E(x^n)\) take n derivatives of MGF and plug in t=0.

The mean is \(μ = E(X)\). The variance is \(σ^2 = E(X^2) - μ^2\).

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

The binomial probability mass function is \(f(x) = p^x(1 – p)^{n - x}\).

Using PMF we get the MGF

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

To calculate the mean we the first derivative of the MGF:

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

Plug in t=0

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

= \(np\)

To calculate variance we take a second derivative of the MGF:

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

Plug in t=0

\(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)p2 +np\)

Variance = \(n(n - 1)p2 +np\)

= \((np)^2\)

= \(np(1 - p)\)

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

The exponential distribution probability density function is \(f(x) = λe^{−λx}\).

Using PMF we get the MGF

\(M(t) = \fracλ{λ-t}\).

To calculate the mean we the first derivative of the MGF: \(M'(t) = \fracλ{(λ-t)^2}\)

Plug in t=0

\(M'(t) = \fracλ{(λ-0)^2}\)

= \(\frac1{λ}\)

To calculate variance we take a second derivative of the MGF:

\(M''(t) = 2\fracλ{(λ-t)^3}\).

Plug in t=0

\(M''(0) = \frac2λ{(λ-0)^3}\)

= \(\frac2λ{λ^3}\)

= \(\frac2{λ^2}\)

Variance = \(\frac2{λ^2} - (\frac1{λ})^2\)

= \(\frac2λ{λ^2} - \frac1{λ^2}\)

= \(\frac1{λ^2}\)