9.3 Question 11: The price of one share of stock in the Pilsdorff Beer Company (see Exercise 8.2.12) is given by \(Y_n\) on the \(n\)th day of the year. Finn observes that the differences \(X_n = Y_{n+1} - Y_n\) appears to be independent random variables with a common distribution having mean \(\mu = 0\) and variance \(\sigma^2 = 1/4\). If \(Y_1 = 100\), estimate the probability that \(Y_{365}\) is:
We will assume the normal distribution curve, or in other words \(\sim N(0, 1/4)\). We are given the above formula: \(X_n = Y_{n+1} - Y_n\), and also given the \(\mu\), \(\sigma^2\), and \(Y_1\). We need to estimate the probability of \(Y_{365} \geq c\), where \(c\) is a constant given below in the question stem.
\[Y_{365} - Y_1 = (Y_{365} - Y_{364}) + (Y_{364} - Y_{363}) + (Y_{363} - Y_{362}) + ... + (Y_2 - Y_1)\] \[Y_{365} - Y_1 = X_{365} + X_{364} + X_{363} + ... X_{2} = 364X\] \[Y_{365} = 364X + Y_1 = 364X + 100\] \[X = \frac{Y_{365 - 100}}{364}\]
where X follows the normal distribution curve \(\sim N(0, 1/4)\).
(a) \(\geq 100\).
\[P(Y_{365} \geq 100) = P(Y_{365} - 100 \geq 0)\]
Let’s substitute the formula above into this previous equation (Remember: \(364X = Y_{365} - 100\)).
\[= P(364X \geq 0) = P(X \geq 0)\] Given that X follows a normal distribution curve, we can calculate for \(Z\).
\[ Z = \frac{x - \mu}{\sigma} = \frac{0 - 0}{1/2} = 0\] If we look for Z = 0, on a Z table, the probability \(P(Y_{365} \geq 100) = 0.5\).
(b) \(\geq 110\).
We will approach this problem similarly to the previous problem:
\[P(Y_{365} \geq 110) = P(Y_{365} - 100 \geq 10) = P(364X \geq 10)\] Again, because we are assuming a standard normal distribution curve, we will substitue \(X\) with \(Z\), from this formula: \(\frac{x - 0}{1/2}\)
\[P(364X \geq 10) = P(182Z \geq 10) = P(Z \geq 10/182)\] Z for \(10/182\), on the Z table \(\approx\) 0.5199. However, we are looking for the upper tail, since we’re looking for \(P(Z \geq 10/182)\).
paste0("Probability that Y_365 >= 110: ", 1 - 0.5199)
## [1] "Probability that Y_365 >= 110: 0.4801"
(c) \(\geq 120\).
\[P(Y_{365} \geq 120) = P(Y_{365} - 100 \geq 20) = P(364X \geq 20) = P(182Z \geq 20) = P(Z \geq 20/182)\] Z for \(20/182\) on the Z table \(\approx\) .5438.
paste0("Probability that Y_365 >= 120: ", 1 - 0.5438)
## [1] "Probability that Y_365 >= 120: 0.4562"
2. Calculate the expected value and variance of the binomial distribution using the moment generating function.
Reference: https://www.thoughtco.com/moment-generating-function-binomial-distribution-3126454, https://www.le.ac.uk/users/dsgp1/COURSES/MATHSTAT/5binomgf.pdf
Start with the random variable \(X\) and describe the probability distribution more specifically. Perform \(n\) independent Bernoulli trials, each of which has probability of success \(p\) and probability of failure \(1-p\). Thus, the probability mass function is:
\[f(x) = C(n,x)p^x(1-p)^{n-x}\]
Here the term \(C(n,x)\) denotes the number of combination of \(n\) elements taken \(x\) at a time, and \(x\) can take the values 0,1,2,3,…,n.
We can use this probability mass function to obtain the moment generating function of \(X\):
\[M_x(t) = \sum_{x=0}^{n} e^{xt} C(n,x)p^x(1-p)^{n-x}\] \[M_x(t) = \sum_{x=0}^{n} (pe^t)^x(1-p)^{n-x}\] \[M_x(t) = ((1-p) + pe^t)^n\]
The above is the moment generating function for the Binomial Distribution. If we differentiate the moment generating function with respect to \(t\), using the function-of-a-function rule, then we get:
\[\frac{dM_x(t)}{dt} = n((1-p) + pe^t)^{n-1}pe^t\] \[\frac{dM_x(t)}{dt} = npe^t((1-p) + pe^t)^{n-1}\] If we substitute \(t = 0\) for this differentiated MGF, we will obtain the expected value.
\[E(x) = \frac{dM_x(0)}{dt} = np((1-p) + p)^{n-1} = np\]
In order to get the variance, we differentiate $ $ again and set \(t = 0\).
\[\frac{d^2M_x(t)}{dt^2} = npe^t((n-1)((1-p) + pe^t)^{n-2}pe^t) + ((1-p) + pe^t)^{n-1}(npe^t)\] \[\frac{d^2M_x(t)}{dt^2} = npe^t((1-p) + pe^t)^{n-2}((1-p) + npe^t)\] Let \(q = 1-p\). \[E(x^2) = \frac{d^2M_x(0)}{dt^2} = np(q + p)^{n-2}(q + np) = np(q + np)\] If we remember the formula: Variance = \(V(x) = E(x^2) - (E(x))^2\).
\[V(x) = E(x^2) - (E(x))^2 = np(q + np) - (np)^2 = npq\].
Hence,
\[E(x) = np, V(x) = npq\]
3. Calculate the expected value and variance of the exponential distribution using the moment generating function.
Reference: http://www.maths.qmul.ac.uk/~bb/MS_Lectures_5and6.pdf
The PDF of the exponential distribution:
\[f(x) = \lambda e^{-\lambda x}\]
We can use this probability density function to obtain the moment generating function of \(X\):
\[M_x(t) = \int_{0}^{\infty} e^{tx}\lambda e^{-\lambda x} dx\] \[M_x(t) = \lambda \int_{0}^{\infty}e^{(t-\lambda) x} dx\] \[M_x(t) = \frac{\lambda}{t-\lambda}\] Like the previous question, we will differentiate the above function and set \(t = 0\) to find \(E(x)\).
\[{M_x}^{'}(t) = \frac{\lambda}{(\lambda - t)^2}\] \[E(x) = {M_x}^{'}(0) = \frac{\lambda}{(\lambda)^2} = \frac{1}{\lambda}\] To find the variance, we need to again differentiate the above equation (and set \(t = 0\)) to find \(E(X^2)\).
\[{M_x}^{''}(t) = \frac{2\lambda}{(\lambda - t)^3}\] \[E(X^2) = {M_x}^{''}(0) = \frac{2\lambda}{\lambda^3} = \frac{2}{\lambda^2}\] The formula for variance is: \(V(X) = E(X^2) - (E(X))^2\).
\[V(X) = \frac{2}{\lambda^2} - \frac{1}{\lambda^2} = \frac{1}{\lambda^2}\] Hence,
\[E(X) = \frac{1}{\lambda}, V(X) = \frac{1}{\lambda^2}\]