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
mean <- 0
var <- 1/4
sd <- sqrt(var)
n <- 364
x <- 0/sqrt(n)
pnorm(x, mean, sd, lower.tail = FALSE)
## [1] 0.5
x <- 10/sqrt(n)
pnorm(x, mean, sd, lower.tail = FALSE)
## [1] 0.1472537
x <- 20/sqrt(n)
pnorm(x, mean, sd, lower.tail = FALSE)
## [1] 0.01801584
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)\]
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}\]