1. 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 square = 1/4. If Y1 = 100, estimate the probability that Y365 is
(a) >= 100.
(b) >= 110.
(c) >= 120.
var <- 365*(1/4)
x <- pnorm( 100 - 100, mean=0, sd = sqrt(var), lower.tail = FALSE )
x
## [1] 0.5
var <- 365*(1/4)
x <- pnorm(110 - 100, mean=0, sd = sqrt(var), lower.tail = FALSE )
x
## [1] 0.1475849
var <- 365*(1/4)
x <- pnorm(120 - 100, mean=0, sd = sqrt(var), lower.tail = FALSE )
x
## [1] 0.01814355
2. Calculate the expected value and variance of the binomial distribution using the moment generating function.
\(g(t)\) = \(\sum_{j=0}^{n} e_{j}^{tjn} p^{j} q^{n-j}\)
\(g(t)\) = \(\sum_{j=0}^{n} (^{n}_{j}) (pe^{t})^{j} q^{n-j}\)
\(g(t)\) = \((pe^{t} + q)^{n}\)
\(g^{'}(t)\) = $n(pe^{t} + q)^{n-1} pe^{t}
\(g^{"}(t)\) = \(n(n-1)(pe^{t} + q)(pe^{t})^{2} + n(pe^{t})^{2} + n(pe^{t} + q)^{n} pe^{t}\)
\(g^{'}(0)\) = $n(p+q)^{n-1}p + np
\(g^{"}(0)\) = \(n(n-1)p^{2} + np\)
Expected Value:
\(\mu\) = \(\mu_{1}\) = \(g^{'}(0)\) = \(np\)
\(\sigma^{2}\) = \(\mu_{2} - \mu^{2}_{1}\) = \(g^{"}(0) - g^{'}(0)^{2}\)
\(\sigma^{2}\) = \(n(n-1)p^{2} + np - (np)^{2}\)
\(\sigma^{2}\) = \(np((np-p) + 1 - np)\)
Variance: \(\sigma^{2}\) = \(np(1-p)\)
3. Calculate the expected value and variance of the exponential distribution using the moment generating function
\(g(t)\) = \(\sum _{0}^{\infty} e^{tx} \lambda e^{- \lambda e} dx\)
\(g(t)\) = \(\lambda e^{(t-\lambda)x}/t-\lambda | ^{\infty} _{0}\)
\(g(t)\) = \(\lambda / \lambda - t\)
\(g(t)\) = \(\lambda / (\lambda - t)^{2}\)
\(g(t)\) = \(\lambda / \lambda^{2}\) = \(1/\lambda\)
\(g^{n}(t)\) = \(2\lambda / (\lambda - t)^{2}\)
\(g^{n}(0)\) = \(2\lambda/\lambda^{3}\) = \(2/\lambda^{2}\)
Expected Value:
\(\mu = g^{'}(0) = \lambda^{-1}\)
Variance:
\(\sigma^{2} = g^{n}(0) - g^{'}(0)^{2} = 2/\lambda^{2} = 1/\lambda^{2} = \lambda^{-2}\)