1. #11 page 363

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 sigma^2 = 1/4. If Y1 = 100, estimate the probability that Y365 is

  1. \[p > = 100.\]
mean <- 0  
var <- 1/4
sd <- sqrt(var)
n <- 364  
x <- 0/sqrt(n)
pnorm(x, mean, sd, lower.tail = FALSE)
## [1] 0.5
  1. \[p > = 110.\]
x <- 10/sqrt(n)
pnorm(x, mean, sd, lower.tail = FALSE)
## [1] 0.1472537
  1. \[p > = 120.\]
x <- 20/sqrt(n)
pnorm(x, mean, sd, lower.tail = FALSE)
## [1] 0.01801584
  1. Calculate the expected value and variance of the binomial distribution using the moment generating function.

The binomial PMF is defined as

\[(^n_x)p^xq^{n−x}\]

so the moment generating function is:

\[M(t) = ∑_{x=0}^n e^{tx}(^n_x)p^xq^{n−x} = ∑_{x=0}^n(^n_x)(pe^t)^xq^{n−x}=(pe^t+q)^n\]

\[M′(t)=n(pe^t+q)^n−1pe^t\] \[E(X)=M′(0)=np\]

\[M′′(t)=n[1−p+pe^t]^{n−1}(pe^t)+(pe^t)n(n−1)[1−p+pe^t]^{n−2}(pe^t)\]

\[E(X^2) = M′′(0)=n(n−1)p^2+np\]

\[Var(X)=E(X^2)−E(X)^2=n(n−1)p^2+np−(np)^2\]

\[=(n^2p^2−1np^2)+np−(np)^2\]

\[=(np)^2−np^2+np−(np)^2\]

\[=np−np^2=np(1−p)\]

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

The exponential PDF is defined as \[λe^{−xλ}\] so the moment generating function is:

\[M(t)=∫^∞_0e^{tx}λe^{−xλ}dx\]

\[=λ∫^∞_0e^{−x(λ−t)}\]

\[=−λ\frac{e^{−x(λ−t)}}{λ−t}∣^∞_0\]

\[=\frac{λ}{λ−t}\]

\[M′(t)=\frac{λ}{(λ−t)}2E(X)\]

\[=M′(0)=\frac{λ}{λ^2}\]

\[=\frac{1}{λ}\]

\[M′′(t) = \frac{2λ}{(λ−t)^3}\]

\[E(X^2)=M′′(0 ) =\frac{2λ}{λ^3} =\frac{2}{λ^2}\]

\[Var(X)=E(X^2)−E(X)^2\]

\[=\frac{2}{λ^2}−\frac{1}{λ^2}=\frac{1}{λ^2}\]