1-pnorm((100-100)/(0.5*sqrt(365)))
## [1] 0.5
1-pnorm((110-100)/(0.5*sqrt(365)))
## [1] 0.1475849
1-pnorm((120-100)/(0.5*sqrt(365)))
## [1] 0.01814355
M(t) = E[e^(tX)] = (pe^t + (1 - p))^(n)
then take the first derivative of M(t), with respect to t
M’(t) = n(pe^t + q)^(n-1) * pe^t
Then set t=0 E[X] = n(pe^0 + q)^(n-1) * pe^0 = n(p + q)^(n-1) * p = np The expected value is np
Then take the second derivative of M(t) M’’(t) = n(n-1)(pe^t + q)^(n-2) * (pet)2 + n(pe^t + q)^(n-1) * pe^t
then set t=0 E[X^2] = n(n-1)(p + q)^(n-2) * p^2 + n(p + q)^(n-1) * p = n(n-1)p^2 + np
Then use this formula: Var[X] = E[X^2] - (E[X])^2
sub in the first and second derivative: Var[X] = n(n-1)p^2 + np - (np)^2 = n(n-1)p^2 + np - n2p2 = np(1-p)
M(t) = E[e^(tX)] = ∫[e^(tx) * λ * e^(-λx) dx] for x = 0 to ∞
M(t) = λ / (λ - t) for t < λ
Take first derivative of M(t) M’(t) = λ / (λ - t)^2
then set t to zero: E[X] = λ / (λ - 0)^2 = λ / λ^2 = 1/λ Then take the second derivative of M(t) M’’(t) = 2λ / (λ - t)^3
then sub in t = 0 E[X^2] = 2λ / (λ - 0)^3 = 2λ / λ^3 = 2/λ^2
Then insert into this equation: Var[X] = E[X^2] - (E[X])^2
Var[X] = 2/λ^2 - (1/λ)^2 = 2/λ^2 - 1/λ^2 = 1/λ^2