\magnification=\magstep1
\centerline{Mathematics 375 -- Probability and Statistics 1}
\centerline{Solutions for Problem Set 7 -- November 5, 2003}
\bigskip
\noindent
Text Problems:
\bigskip
\noindent
4.69/ a)  The probability that the magnitude $Y$ of a single earthquake will
exceed 3 is
$$P(Y > 3) = \int_3^\infty {1\over 2.4} e^{-y/2.4}\ dy = 
-e^{-y/2.4}|_3^\infty =  0 + e^{-3/2.4} \doteq .287$$

b)  The probability that the magnitude $Y$ of an earthquake will fall 
between 2 and 3 is
$$P(2 < Y < 3) = \int_2^3 {1\over 2.4} e^{-y/2.4}\ dy = 
-e^{-y/2.4}|_2^3 = -e^{-3/2.4} + e^{-2/2.4} \doteq .148$$
\bigskip
\noindent
4.70/ Similarly to 4.69 a, the probability that a single earthquake
has magnitude greater than $5$ is 
$$\int_5^\infty {1\over 2.4} e^{-y/2.4}\ dy = 
-e^{-y/2.4}|_5^\infty = e^{-5/2.4} \doteq .1245$$
Now, assuming the next 10 earthquakes are independent events, 
we can model the number exceeding 5 on the Richter scale as
a binomial (discrete) random variable with $n = 10$, $p = .1245$.
The probability that this number is at least one is
$$\sum_{y=1}^{10} {10\choose y}(.1245)^y(.8755)^{10-y} = 1 - (.8755)^{10} 
\doteq .7354.$$
(Better get your home insurance in order!!)
\bigskip
\noindent
4.71/ a)  This part is similar to 4.69 a:  Let $Y$ be the demand
$$P(Y > 200) = \int_{200}^\infty {1\over 100} e^{-y/100}\ dy = 
-e^{-y/100}|_{200}^\infty =  0 + e^{-200/100} \doteq .1353$$

b)  We want to find the value $c$ so that $P(Y > c) = .01$.
This gives the equation 
$$.01 = \int_c^\infty {1\over 100} e^{-y/100}\ dy = 
e^{-c/100}$$
Taking natural logarithms of both sides we get
$$c = -100 \ln(.01) \doteq 460.5$$
\bigskip
\noindent
4.72/ Since $Y$ is exponential with mean $\beta = 10$, we 
know from class or Theorem 4.10 in the book that 
$E(Y) = \beta = 10$ and $E(Y^2) = \beta^2 + \beta^2 = 200$.
Therefore 
$$E(C) = E(100 + 40Y + 3Y^2) = 100 + 40E(Y) + 3E(Y^2) = 100 + 400 + 600 = 1100$$
To find the variance of the cost, we will use 
$V(C) = E(C^2) - (E(C))^2$.  To find $E(C^2)$, multiply out first:
$$C^2 = (100 + 40Y + 3Y^2)^2 = 10000 + 800Y + 2200Y^2 + 240Y^3 + 9Y^4$$
We know $E(Y)$ and $E(Y^2)$ from the above.  To find $E(Y^3)$ and$E(Y^4)$,
we will use the substitution $u = y/10$ on the corresponding integrals
to recognize them as constants times $\Gamma$-function values:
$$\eqalign{
E(Y^3) &= \int_0^\infty y^3 {1\over 10}e^{-y/10}\ dy = 
10^3\int_0^\infty u^3 e^{-u}\ du = 10^3 \Gamma(4)\cr
E(Y^4) &= \int_0^\infty y^4 {1\over 10}e^{-y/10}\ dy = 
10^4\int_0^\infty u^4 e^{-u}\ du = 10^4 \Gamma(5)\cr}$$
Hence
$$E(C^2) = 10000 + 800\cdot 10 + 2200\cdot 200 + 240\cdot 6000 + 9\cdot 240000
=4,130,000$$
Then
$$V(C) = 4,130,000 - (1100)^2 = 2,920,000.$$

\bigskip
\noindent
4.75/ We have by the definition of the discrete random variable $X$:
$$\eqalign{P(X=k) &= \int_{k-1}^k {1\over \beta} e^{-y/\beta}\ dy\cr
&= -e^{-y\over \beta}|_{k-1}^k\cr
&= -e^{-k\over \beta} + e^{-(k-1)\over \beta}\cr
&= (e^{-(k-1)\over \beta})(1 - e^{-1\over \beta})\cr
&= (e^{-1\over \beta})^{k-1} (1 - e^{-1\over \beta})\cr}$$
This is the form ($q^{k-1}p$) for the probability distribution function 
for a {\it geometric} random variable with $p = 1 - e^{-1\over \beta}$.

\bigskip
\noindent
4.83/ Using Theorem 4.8, $\mu = \alpha\beta = 3.2$ and 
$\sigma^2 = \alpha\beta^2 = 6.4$.

\bigskip
\noindent
4.87  The idea for this one is similar to what we did above in 4.72.
First, let's derive the general formula for $E(Y^k)$ when 
$Y$ has a Gamma-distribution with parameters $\alpha, \beta$.  We
apply the substitution $u = {y\over \beta}$, so $dy = \beta\ du$,
then apply the functional equation $\Gamma(x+1) = x\Gamma(x)$ repeatedly:
$$\eqalign{
E(Y^k) &= {1\over \Gamma(\alpha) \beta^\alpha}\int_0^\infty y^k \cdot y^{\alpha-1} e^{-y\over \beta}\ dy\cr
&={1\over \Gamma(\alpha) \beta^\alpha}\int_0^\infty y^{\alpha+k-1} e^{-y\over \beta}\ dy\cr
&={1\over \Gamma(\alpha) \beta^\alpha}\cdot \beta^{\alpha+k} \int_0^\infty u^{\alpha+k-1} e^{-u}\ du\cr
&={1\over \Gamma(\alpha) \beta^\alpha}\cdot \beta^{\alpha+k} \cdot \Gamma(\alpha+k)\cr
&=\beta^k (\alpha+k-1)(\alpha+k-2)\cdots (\alpha+1)(\alpha)\cr}$$
In our problem, with $\alpha=3, \beta =2$, we get
$$\eqalign{E(Y) &= \alpha\beta = 6\cr
         E(Y^2) &= (\alpha+1)(\alpha)\beta^2 = 48\cr
         E(Y^3) &= (\alpha+2)(\alpha+1)\alpha\beta^3 = 480\cr
         E(Y^4) &= (\alpha+3)(\alpha+2)(\alpha+1)\alpha\beta^4=5760\cr}$$
Then
$$E(L) = 30 E(Y) + 2E(Y^2) = 30\cdot 6 + 2\cdot 48 = 276$$
and
$$E(L^2) = 900 E(Y^2) + 120E(Y^3) + 4E(Y^4) = 900\cdot 48 + 120\cdot 480 + 4\cdot
5760 = 123840.$$
Hence
$$V(C) = E(L^2) - (E(L))^2 = 123840 - 276^2 = 47664.$$
\bigskip
\noindent
4.91/ From the form of $f(y)$, we recognize that $Y$ has a Beta-distribution
with parameters $\alpha = 4$ and $\beta = 3$.  Hence
$$k = {1\over B(4,3)} = {\Gamma(7)\over \Gamma(4)\Gamma(3)} = {6!\over 3!2!} = 60.$$
\bigskip
\noindent
4.97/ The idea is similar to 4.72 and 4.87.  Here the moments
$E(Y^k)$ are ratios of Beta-function values.  We find using Theorem 4.11
and similar calculations:
$$\eqalign{
E(Y) &= {B(2,2)\over B(1,2)} = 1/3\cr
E(Y^2) &= {B(3,2)\over B(1,2)} = 1/6 \cr
E(Y^3) &= {B(4,2)\over B(1,2)} = 1/10\cr
E(Y^4) &= {B(5,2)\over B(1,2)} = 1/15\cr}$$
Hence for $C = 10 + 20Y + 4Y^2$,
$$E(C) = 10 + 20\cdot (1/3) + 4\cdot (1/6) = 52/3$$
Then $V(C) = V(20Y + 4Y^2)$, so 
$$E(20Y+4Y^2) = 20 \cdot (1/3) + 4\cdot 1/6 = 22/3,$$
$$E((20Y+4Y^2)^2) = 400 \cdot (1/6) + 160\cdot (1/10) + 16\cdot (1/15) = 1256/15$$
and 
$$V(C) = 1256/15 - (22/3)^2 = 1348/45 \doteq 29.96$$
\bigskip
\noindent
4.98/ For a Beta-distributed $Y$ with parameters $\alpha$ and $\beta$,
as in 4.97, we have 
$$\eqalign{
E(Y^2) &= {1\over B(\alpha,\beta)} \int_0^1 y^2\cdot y^{\alpha-1}(1-y)^{\beta-1}\ dy\cr
&= {B(\alpha+2,\beta)\over B(\alpha,\beta)}\cr
&= {\Gamma(\alpha+2)\Gamma(\beta)\Gamma(\alpha + \beta)\over
    \Gamma(\alpha + \beta + 2) \Gamma(\alpha)\Gamma(\beta)}\cr
&= {(\alpha+1)\alpha\Gamma(\alpha)\Gamma(\beta)\Gamma(\alpha + \beta)\over
    (\alpha+\beta+1)(\alpha+\beta)\Gamma(\alpha + \beta) \Gamma(\alpha)\Gamma(\beta)}\cr
&= {(\alpha+1)\alpha\over (\alpha+\beta+1)(\alpha + \beta)}\cr}$$
We already know $E(Y) = {\alpha\over \alpha+\beta}$.  Hence
$$\eqalign{
V(Y) &= {(\alpha+1)\alpha\over (\alpha+\beta+1)(\alpha + \beta)} - 
 \left({\alpha\over \alpha+\beta}\right)^2\cr
 &= {(\alpha+\beta)(\alpha+1)\alpha - \alpha^2(\alpha+\beta+1)\over
     (\alpha+\beta+1)(\alpha+\beta)^2}\cr
 &= {\alpha\beta\over (\alpha+\beta)^2(\alpha+\beta+1)}\cr}$$
which is what we wanted to show.
\bigskip
\noindent
4.101/From the form of $f(y)$ we recognize that $Y$ has a 
Beta-distribution with $\alpha = 3$, $\beta = 5$.  Hence
a) $c = {1\over B(3,5)} = 105$, and b) $E(Y) = {3\over 3+5} = 3/8$,
using Theorem 4.11.
\bigskip
\noindent
{\it Additional Problems}
\bigskip
\noindent
A)  1) We must show that when $\alpha$ is a positive integer, 
$${1\over \Gamma(\alpha)}\int_\lambda^\infty y^{\alpha-1} e^{-y}\ dy = 
\sum_{n=0}^{\alpha-1} {\lambda^n\over n!}e^{-\lambda}.\leqno(1)$$
We will use induction on $\alpha$.  The base case is $\alpha = 1$.  Then
the left of (1) is
$$1\cdot\int_\lambda^\infty e^{-y}\ dy = e^{-\lambda}.$$
With $\alpha = 1$, the sum on the right of (1) is:
$$\sum_{n=0}^0 {\lambda^n\over n!}e^{-\lambda} = e^{-\lambda}$$
So the base case is established.  

Now for the induction step, assume that (1) is true for $\alpha = k$.
In other words, our induction hypothesis is:
$${1\over \Gamma(k)}\int_\lambda^\infty y^{k-1} e^{-y}\ dy = 
\sum_{n=0}^{k-1} {\lambda^n\over n!}e^{-\lambda}.\leqno(2)$$
Consider the integral on the left of (1) for $\alpha = k+1$:
$${1\over \Gamma(k+1)} \int_\lambda^\infty y^k e^{-y}\ dy$$
Apply integration by parts with $u = y^k$, and $dv = e^{-y}\ dy$.  We
get:
$$\eqalign{
{1\over \Gamma(k+1)} \int_\lambda^\infty y^k e^{-y}\ dy
&= {1\over \Gamma(k+1)}\left(-y^k e^{-y}|_\lambda^\infty 
+ k\int_\lambda^\infty y^{k-1} e^{-y}\ dy\right) \cr
&= {\lambda^k\over k!} e^{-\lambda} 
+ {1\over \Gamma(k)} \int_\lambda^\infty y^{k-1} e^{-y}\ dy\cr}$$
Now we use the induction hypothesis (2) on the remaining integral.
We get that this is equal to 
$${\lambda^k\over k!} e^{-\lambda} + \sum_{n=0}^{k-1}{\lambda^n\over n!}e^{-\lambda}
=\sum_{n=0}^k {\lambda^n\over n!}e^{-\lambda}$$
Hence our formula also works with $\alpha = k+1$, and by induction
we conclude that it works for all positive integers $\alpha$.

2) Using the Poisson table in the text with $\lambda = 5$, $\alpha = 3$
$$\sum_{n=0}^2 {5^n\over n!}e^{-5} = .125$$

\bigskip
\noindent
B)  The idea of this proof is similar to what we did for
A).  Now we will use {\it induction on $\beta$}, with $\alpha$
a fixed, but arbitrary, positive integer.  In other words we 
must first show the base case that
$${1\over B(\alpha,1)} \int_0^p y^{\alpha - 1}\ dy = 
\sum_{n=\alpha}^{\alpha} {\alpha \choose n} p^n (1 - p)^{\alpha - n}.\leqno(3)$$
The integral on the left of (3) is an easy one, we just get:
$${1\over B(\alpha,1) \alpha} y^\alpha|_0^p = 
{\Gamma(\alpha+1)\over \alpha \Gamma(\alpha)} p^\alpha = p^\alpha$$
(since $\Gamma(\alpha+1) = \alpha\Gamma(\alpha)$).
The sum on the right of (3) is again just one term:
$1\cdot p^\alpha$.
So our base case is established.

Now, for the induction step we assume that the formula is
true for $\beta = k$ (and $\alpha = $ anything):
$${1\over B(\alpha,k)} \int_0^p y^{\alpha - 1}(1-y)^{k-1}\ dy = 
\sum_{n=\alpha}^{\alpha+k-1} {\alpha+k-1 \choose n} p^n (1 - p)^{\alpha +k-1-n}.\leqno(4)$$
Start from the integral with $\beta = k + 1$:
$${1\over B(\alpha,k+1)} \int_0^p y^{\alpha - 1}(1-y)^k\ dy$$
Integrate by parts with $u = (1-y)^k$ (idea is to lower the exponent
here to match the integral on the left of (4).  This makes
$dv = y^{\alpha - 1}\ dy$.  Then $du = -k(1-y)^{k-1}$, and $v = y^\alpha/\alpha$.
Applying the parts formula and the induction hypothesis (with $\alpha$
replaced by $\alpha + 1$), we get
$$\eqalign{
&={1\over B(\alpha,k+1)}\left( {y^\alpha (1-y)^k\over\alpha}|_0^p
+ {k\over\alpha} \int_0^p y^\alpha(1-y)^{k-1}\ dy \right)\cr
&={\alpha + k \choose \alpha} p^\alpha(1-p)^k + 
\sum_{n=\alpha+1}^{\alpha + 1 + k  - 1} {\alpha+1+k-1\choose n}
p^n(1-p)^{\alpha+1+k-1-n}\cr
&={\alpha + k \choose \alpha} p^\alpha(1-p)^k + 
\sum_{n=\alpha+1}^{\alpha + k} {\alpha +k\choose n}
p^n(1-p)^{\alpha+k-n}\cr
&=\sum_{n=\alpha}^{\alpha + k} {\alpha +k\choose n}
p^n(1-p)^{\alpha+k-n}\cr}$$
which is what we want.
\bigskip
2)  Using the binomial table, with $p = .3$, $\alpha = 4, \beta = 7$,
$$P(0 \le Y \le .3) = \sum_{n=4}^{10} {10\choose n}(.3)^n(.7)^{10-n}
=1 - .650 = .350.$$ 
\bye

