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
The mean is 0.
The variance of one day is .25
The variance of 365 days is 365*.25 or 91.25
The standard deviation of 365 days is 9.552487
We can use the normal distribution’s CDF function to estimate the following probabilities:
(a) ≥ 100.
# There's a 50% chance that Y365 is >= 100
1-pnorm(100-100,0,9.552487)
## [1] 0.5
(b) ≥ 110.
# There's a 14.76% chance that Y365 is >= 110
1-pnorm(110-100,0,9.552487)
## [1] 0.1475849
(c) ≥ 120.
# There's a 1.81% chance that Y365 is >= 120
1-pnorm(120-100,0,9.552487)
## [1] 0.01814355
Calculate the expected value and variance of the binomial distribution using the moment generating function.
Here is the moment generating function for a binomial distribution from page 367 of the textbook: \[g(t)=(pe^t+q)^n\] In order to calculate the expected value we need the first derivative of the moment generating function: \[g'(t)=npe^t(pe^t+q)^{(n-1)}\] Then the expected value is the first derivative of the moment generating function evaluated at zero: \[g'(0)=np(p+q)^{(n-1)}\] In order to calculate the variance we need the second derivative of the moment generating function: \[g''(t)=npe^t(pe^t+q)^{(n-1)}+n(n-1)p^2e^{2t}(pe^t+q)^{(n-2)}\]
Then the variance is the second derivative of the moment generating function evaluated at zero: \[g''(0)=np(p+q)^{(n-1)}+n(n-1)p^2(p+q)^{(n-2)}\] Note: You can check your derivatives against an online calculator. I had misapplied the product rule and caught it using the following website. I used consonants as standins for the other variables like 10 for n, .4 for p and .6 for q to make it easy to trace where variables were going: https://www.symbolab.com/solver/first-derivative-calculator
Calculate the expected value and variance of the exponential distribution using the moment generating function.
We can solve this the same way as the proceeding problem however we’ll need a moment generating function specific to the exponential distribution.
From the following website we obtain the moment generating function for the exponential distribution: https://proofwiki.org/wiki/Moment_Generating_Function_of_Exponential_Distribution
\[g(t)=\frac{1}{1-\beta t}\] Note: See the proof at the website above; This is only well defined for \(t<\frac{1}{\beta}\)
In order to calculate the expected value of the exponential distribution we need the first derivative of the moment generating function: \[g'(t)=\frac{\beta}{(1-\beta t)^2}\]
Then the expected value of the exponential distribution is the first derivative of the moment generating function evaluated at zero: \[g'(0)=\beta\]
In order to calculate the variance of the exponential distribution we need the second derivative of the moment generating function: \[g''(t)=\frac{2\beta^2}{(1-\beta t)^3}\]
Then the variance of the exponential distribution is the second derivative of the moment generating function evaluated at zero: \[g''(0)=2\beta^2\]