The price of one share of stock in the Pilsdorff Beer Company 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
μ = 0
σ2 = 0.25
n = 365
pnorm(100, mean = 100, sd = sqrt(0.25*364), lower.tail = F)
## [1] 0.5
pnorm(110, mean = 100, sd = sqrt(0.25*364), lower.tail = F)
## [1] 0.1472537
pnorm(120, mean = 100, sd = sqrt(0.25*364), lower.tail = F)
## [1] 0.01801584
Every consecutive derivative of the MGF gives a different moment. Each moment is equal to the expected value of X raised to the power of the number of the moment.
By taking the first derivative (n = 1) of the MGF and setting t equal to 0, we find the expected value or mean of random variable X. The second derivative (n = 2) then gives us the expected value of X2, which can be used to find variance with the following formula:
Var [X] = E[X^2] - (E[X2])^2
https://study.com/academy/lesson/moment-generating-functions-definition-equations-examples.html
Calculate the expected value and variance of the binomial distribution using the moment generating function.
g′(0) = n(pe^0 + q)^(n−1) pe^ = np
g″(0) = n(n−1)p^2+np
μ=np
σ^2 = g″(0) − g′(0)^2 = n(n−1)p^2 + np − (np)^2 = np(1−p)
Calculate the expected value and variance of the exponential distribution using the moment generating function.
gn(0) = n!/λ^n
g′(0) = 1/λ
g″(0) = 2/λ^2
μ = 1/λ
σ2 = 2/λ^2 − (1/λ)^2 = 1/λ^2