The price of one share of stock in the Pilsdorff Beer Company (see Exercise 8.2.12) is given by \(Y_n\) on the nth day of the year. Finn observes that the differences \(X_n\) = \(Y_{n+1} − Y_n\) appear 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 (a) \(≥\) 100, (b) \(≥\) 110, and (c) \(≥\) 120.
List what we’re given:
Take what we know for \(S_n\) and re-organize for \(Y_{365}\):
\(S_n = X_1 + X_2 + ... + X_n\)
\(S_n = (Y_2 - Y_1) + (Y_3 - Y_2) + ... + (Y_{n+1} - Y_n)\)
\(S_n = Y_{n+1} - Y_1\)
Once we cancel out, we notice that only the 1st and last \(Y\) values make it through. We can interpret this as the difference in price of one share of stock in the Pilsdorff Beer Company, from day 1 to day 365, can be simplified to the price on that last day minus the price of that first day (being that all in-between terms cancel out).
Substituting in what we have and re-organizing equations, we get:
\(S_{364} = Y_{365} - 100\) –> \(Y_{365} = S_{364} + 100\)
Next (referring to p.360 of the text), we solve for the corresponding mean, variance, and standard deviation:
Taking all that’s been defined above, we can re-arrange our probabilities and use R’s built in pnorm() function to solve for:
\(P(Y_{365} ≥ 100)\) = 0.5 as shown below:
\(P(Y_{365} ≥ 100)\), recall \(Y_{365} = S_{364} + 100\)
\(P(S_{364} + 100 ≥ 100)\)
\(P(S_{364} ≥ 0)\)
#standard deviation calculation
std <- sqrt(91) #sqrt of variance (noted above)
# >= 100
1 - pnorm(0, mean = 0, sd = std)
## [1] 0.5
A note on pnorm(): it returns the integral from −∞ to x of the pdf of the normal distribution (recall: z = \((x - \mu)\)/\(\sigma\). The pnorm function can also take the argument lower.tail. When lower.tail = FALSE then pnorm returns the integral from q to ∞ of the pdf of the normal distribution. Note that pnorm(q, lower.tail = FALSE) is the same as 1-pnorm(q). (Reference)[http://seankross.com/notes/dpqr/]
\(P(Y_{365} ≥ 110)\) = 0.147 as shown below:
\(P(Y_{365} ≥ 110)\), recall \(Y_{365} = S_{364} + 100\)
\(P(S_{364} + 100 ≥ 110)\)
\(P(S_{364} ≥ 10)\)
# >= 110
1 - pnorm(10, mean = 0, sd = std)
## [1] 0.1472537
# another means to the same solution: plug in as the Z-score
1 - pnorm(10 / std) #because mu = 0
## [1] 0.1472537
#Note that they're equivalent :)
\(P(Y_{365} ≥ 120)\) = 0.018 as shown below:
\(P(Y_{365} ≥ 120)\), recall \(Y_{365} = S_{364} + 100\)
\(P(S_{364} + 100 ≥ 120)\)
\(P(S_{364} ≥ 20)\)
# >= 120
1 - pnorm(20, mean = 0, sd = std)
## [1] 0.01801584