Problem 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
(a) ≥ 100
v<-365*(1/4)
x<-pnorm(100-100,mean = 0,sd = sqrt(v),lower.tail = FALSE)
x
## [1] 0.5
(b) ≥ 110.
v<-365*(1/4)
x<-pnorm(110-100,mean = 0,sd = sqrt(v),lower.tail = FALSE)
x
## [1] 0.1475849
(c) ≥120.
v<-365*(1/4)
x<-pnorm(120-100,mean = 0,sd = sqrt(v),lower.tail = FALSE)
x
## [1] 0.01814355
Problem 2 : Calculate the expected value and variance of the binomial distribution using the moment generating function.
Answer
For Binomial distribution, \(P(X=k)=(^n_k)p^kq^{n−k}\)
Moment Generating function, \[M(t)=\sum_{x=1}^n e^{tx}(^n _x)p^xq^{n−x}\\ =\sum_{x=1}^n (^n _x){(pe^t)}^xq^{n-x}\\ =(pe^t+q)^n\]
Expected value, taking first derivative of Moment generating function and with t=0 ,
\(E(X)=np\\E(X^2)=n(n-1)p^2+np\\Var(X)=E(X^2) - E(X)^2=np(1-p)\)
Problem 3 : Calculate the expected value and variance of the exponential distribution using the moment generating function.
Answer
For exponential distribution is \(f(x)=λe^{−xλ}\\ M(t)=∫^∞_0e^{tx}λe^{−xλ}\\ =λ∫^∞_0e^{−x(λ−t)}\\ =\frac{λ}{λ-t}\\ E(X)=\frac{1}{λ}\\ E(X^2)=\frac{2}{λ^2}\\ Var(X)=E(X^2)-E(X)^2\\ =\frac{2}{λ^2} - \frac{1}{λ^2}\\ =\frac{1}{λ^2}\)