Question_11, page 363, Introduction to probability

The price of one share of stock in the Pilsdorff Beer Company (see Exer- cise 8.2.12) 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 σ2 = 1/4. If Y1 = 100, estimate the probability that Y365 is

The summation of random variables will be as the following:

\[{ S }_{ n }\quad =\quad \sum _{ x\quad =\quad 1 }^{ x\quad =\quad n }{ { X }_{ 1 } } +\quad { X }_{ 2 }\quad +\quad { X }_{ 3 }\quad +\quad ......\quad +\quad { X }_{ n }\] Now substitute X by \({ Y }_{ n+1 }\quad -\quad { Y }_{ n }\)

\[{ S }_{ n }\quad =\quad \sum { \left( { Y }_{ 2 }\quad -\quad { Y }_{ 1 } \right) } \quad +\quad \left( { Y }_{ 3 }\quad -\quad { Y }_{ 2 } \right) \quad +\quad ......\quad +\quad \left( { Y }_{ n+1 }\quad -\quad { Y }_{ n } \right) \] Then we end up with:

\[{ S }_{ n }\quad =\quad { Y }_{ n+1 }\quad -\quad { Y }_{ n }\]

\[{ S }_{ n }\quad =\quad { Y }_{ n+1 }\quad -\quad 100\quad (where\quad { Y }_{ n }\quad =\quad 100)\] Now we have to get the mean and standard deviation \[var{ S }_{ n }\quad =\quad { \sigma }^{ 2 }{ S }_{ n }\quad =\quad \frac { 1 }{ 4 } \times \quad \sum _{ X=0 }^{ n }{ { { \sigma } }_{ X }^{ 2 } } \quad =\quad \frac { n }{ 4 }\] \[SD{ S }_{ n }\quad =\quad \sqrt { \frac { n }{ 4 } } \quad =\quad \frac { \sqrt { n } }{ 2 } \]

Consider n = 364 where \({ n+1 } = 365\)

\[{ S }_{ 364 }\quad =\quad { Y }_{ 365 }\quad -\quad 100\\ { Y }_{ 365 }\quad =\quad { S }_{ 364 }\quad +\quad 100\] calculate variance for n = 364

n = 364
var_s_364 = n/4
var_s_364
## [1] 91
sd_s_364 = sqrt(n)/2
sd_s_364
## [1] 9.539392

(a) \(\ge 100\)

z = (100-100) / sd_s_364
pnorm(z, lower.tail = FALSE)
## [1] 0.5

(b) \(\ge 110\)

z = (110-100) / sd_s_364
pnorm(z, lower.tail = FALSE)
## [1] 0.1472537

(c) \(\ge 120\)

z = (120-100) / sd_s_364
pnorm(z, lower.tail = FALSE)
## [1] 0.01801584

Question_2

Calculate the expected value and variance of the binomial distribution using the moment generating function.

I will start with the definition of \({ M }_{ x }(t)\quad =\quad E({ e }^{ tx })\) for a descrete variables: \[{ M }_{ x }(t)\quad =\quad \sum _{ x=0 }^{ n }{ { e }^{ tx } } \cdot \quad p(x)\quad \longrightarrow \quad 1\] from the binomial theory: \[p(x)\quad =\quad \begin{pmatrix} n \\ x \end{pmatrix}\cdot { \quad p }^{ x }\cdot \quad { (1-p) }^{ n-x }\quad \rightarrow \quad 2\] by substitute equation 2 into equation 1 we get: \[{ M }_{ x }(t)\quad =\quad \sum _{ x=0 }^{ n }{ { e }^{ tx } } \cdot \quad \begin{pmatrix} n \\ x \end{pmatrix}\cdot { \quad p }^{ x }\cdot \quad { (1-p) }^{ n-x }\] take e and p the same brackets to the power of x we get: \[{ M }_{ x }(t)\quad =\quad \sum _{ x=0 }^{ n }{ \begin{pmatrix} n \\ x \end{pmatrix} } \cdot \quad ({ e }^{ t }{ \quad p) }^{ x }\cdot \quad { (1-p) }^{ n-x }\quad \rightarrow \quad 3\] and we know from the Binomial theorm that \[\sum _{ x=0 }^{ n }{ \begin{pmatrix} n \\ x \end{pmatrix} } { \quad y }^{ x }\quad { \quad z }^{ n-x }\quad =\quad { (y\quad +\quad z) }^{ n }\quad for\quad any\quad x,y,z\quad \epsilon \quad R\quad \quad \rightarrow \quad 4\]

Then we can use the Binomial theorm to get the MGF from equation 3 then we get:

\[ { M }_{ x }(t)\quad =\quad { (({ e }^{ t }{ \quad p) }\quad +\quad (1-p)) }^{ n }\quad for\quad t\quad \epsilon \quad R\quad \quad \rightarrow \quad done(the\quad expected\quad value)\]

\[var(x) = second moment - { first\quad moment }^{ 2 }\quad at\quad t\quad =\quad 0\] \[{ M }_{ x }^{ ' }(t)\quad =\quad n{ (({ e }^{ t }{ \quad p) }\quad +\quad (1-p)) }^{ n-1 }\cdot \quad { e }^{ t }{ \quad p }\quad \rightarrow \quad 1st\quad moment\] \[{ M }_{ x }^{ ' }(0)\quad =\quad np\quad \rightarrow \quad { { M }_{ x }^{ ' }(0) }^{ 2 }\quad =\quad { n }^{ 2 }{ p }^{ 2 }\quad \rightarrow \quad 5\] \[{ M }_{ x }^{ '' }(t)\quad =\quad n\cdot (n-1)\cdot { (({ e }^{ t }{ \quad p) }\quad +\quad (1-p)) }^{ n-2 }\cdot \quad { e }^{ 2t }{ \quad p }^{ 2 }\quad +\quad { (({ e }^{ t }{ \quad p) }\quad +\quad (1-p)) }^{ n-1 }\quad \cdot \quad n\quad \cdot \quad { e }^{ t }{ \quad p }\quad \rightarrow \quad 2nd\quad moment\] \[{ M }_{ x }^{ '' }(0)\quad =\quad n\cdot (n-1){ \quad p }^{ 2 }\quad +\quad np\quad \rightarrow \quad 6\]

by subtracting equation 5 from 6 we get variance

\[var(x)\quad =\quad n\cdot (n-1){ \quad p }^{ 2 }\quad +\quad np\quad -\quad { n }^{ 2 }{ p }^{ 2 }\] \[var(x)\quad =\quad np(1-p)\quad \rightarrow \quad done\quad (the\quad variance)\]

Question_3

Calculate the expected value and variance of the exponential distribution using the moment generating function.

for the exponential distribution: \[f(x)=\lambda e^{-\lambda x}\] The MGF should be: \[{ M }_{ x }(t)=\frac{\lambda}{\lambda-t} \quad where \quad t<\lambda\]

Getting the first moment: \[{ M }_{ x }^{ '' }(t) = \frac{\lambda}{(\lambda-t)^2}\] The second moment: \[{ M }_{ x }^{ '' }(t) = \frac{2\lambda}{(\lambda-t)^3}\] \[{ E }(x) = { M }_{ x }(t) \quad at \quad t = 0\] \[{ E }(x) = \frac{1}{\lambda}\]

\[{ var }(x) = { M }_{ x }^{ '' }(t)-{ M }_{ x }^{ ' }(t)^2 \quad at \quad t = 0\]

\[{ var }(x) = \frac{1}{\lambda^2}\]