ex <- 100
var <- 364*0.25
sd <- sqrt(var)
z_score_1 <- (100-ex)/sd
1-pnorm(z_score_1)
## [1] 0.5
\[ P(100 ≤ Y_{365}) ≈ P(\frac{100 − 100}{\sqrt{91}}≤ Y^∗_{365})\\ = P(0 ≤ Y^∗_{365})\\ \approx 0.5\\ \]
z_score_2 <- (110-ex)/sd
1-pnorm(z_score_2)
## [1] 0.1472537
\[ P(110 ≤ Y_{365}) ≈ P(\frac{110 − 100}{\sqrt{91}}≤ Y^∗_{365})\\ = P(1.05 ≤ Y^∗_{365})\\ \approx 0.1473\\ \]
z_score_3 <- (120-ex)/sd
1-pnorm(z_score_3)
## [1] 0.01801584
\[ P(120 ≤ Y_{365}) ≈ P(\frac{120 − 100}{\sqrt{91}}≤ Y^∗_{365})\\ = P(2.10 ≤ Y^∗_{365})\\ \approx 0.0180\\ \]
\[ g(t)=\sum_{j=0}^ne^{tj}\binom{n}{j}p^jq^{n-j}\\ =\sum_{j=0}^n\binom{n}{j}(pe^t)^jq^{n-j}\\ =(pe^t+q)^n\\ \] The expected value is the first derivative of the moment generating function evalauted at 0. \[ g'(t)=n(pe^t+q)^{n-1}pe^t\\ g'(0)=n(p+q)^{n-1}p\\ g'(0)=np \] So the expected value of a binomial distribution is \(np\).
The variance is the difference between the second derivative evaluated at 0 and the square of the first derivative evalauted at 0.
\[ g''(0)=n(n-1)p^2+np\\ Var=n(n-1)p^2+np-(np)^2\\ =(n^2-n)(p^2)+np-n^2p^2\\ =n^2p^2-np^2+np-n^2p^2\\ =np(1-p)\\ \] The variance of a binomial distribution is \(np(1-p)\).
\[ g(t)=\int_0^\infty e^{tx}\lambda e^{-\lambda x} dx\\ =\frac{\lambda (e^{t-\lambda})^x}{t-\lambda} \bigg|_0^\infty\\ =\frac{\lambda}{\lambda-t} \]
The expected value is the first derivative of the moment-generating function evaluated at 0. \[ g'(t)=\frac{\lambda}{(\lambda-t)^2}\\ g'(0)=\frac{\lambda}{(\lambda)^2}\\ g'(0)=\frac{1}{\lambda}\\ \] So using the moment generating function shows that the expected value of an exponential distribution is \(\frac{1}{\lambda}\).
The variance is the difference between the second derivative evaluated at 0, and the square of the first derivative evaluated at 0.
\[ g''(t)=\frac{2\lambda}{(\lambda-t)^3}\\ g''(0)=\frac{2\lambda}{\lambda^3}\\ g''(0)=\frac{2}{\lambda^2}\\ \]
\[ Var=\frac{2}{\lambda^2}-(\frac{1}{\lambda})^2\\ =\frac{2}{\lambda^2}-\frac{1}{\lambda^2}\\ =\frac{1}{\lambda^2}\\ \]
The variance of an exponential distribution is \(\frac{1}{\lambda^2}\).