# Integration help from Poisson Process question

"A machine suffers instantaneous stoppages of two kinds, major and mine, according to independent Poisson processes with rates $\lambda$ and $\mu$ respectively. Let T denote the time at which the first major stoppage occurs, and let N denote the number of minor stoppages which occur before the first major stoppage. Using the fact that T has an exponential distribution with parameter $\lambda$, and the law of total probability, deduce that the distribution of N is Geometric with

$$P(N = n) = \left( \frac{\lambda}{\lambda + \mu} \right) \left(\frac{\mu}{\lambda + \mu} \right)^n$$

for $n = 0, 1, 2, ...$"

From the law of total probability, I know that

$$P(N = n) = P(N = n | T = t) P(T = t)$$ $$= \int_0^{\infty} P(N = n) \cdot \lambda e^{- \lambda t}$$

(I thought it should've been a summation sign, not sure why it's integral though, could someone explain that?) Using the Poisson formula to work out $P(N = n)$

You get

$$\int_0^{\infty} \frac{e^{-\mu t}(\mu t)^n}{n!} \cdot \lambda \cdot e^{-\lambda t} dt$$

Taking out the constants and combining terms gives

$$\frac{\lambda \mu^n}{n!} \int_0^{\infty} e^{-(\lambda + \mu)t} t^n dt$$

But I'm stuck how to go on from here. In the answers, they use a substitution and go from this step to

$$\frac{\lambda \mu^n}{n!} \frac{1}{(\lambda + \mu)^{n+1}} \int_0^{\infty} u^n e^{-u} du = \lambda \mu^n \frac{1}{(\lambda + \mu)^{n + 1}} = \frac{\lambda}{\lambda + \mu} \left(\frac{\mu}{\lambda + \mu} \right)^n$$

From the exponential, I thought the substitution might've been $u = (\lambda + \mu) t$, which then gives $du = \frac{dt}{\lambda + \mu}$. And we also get $t = \frac{u}{\lambda + \mu}$ but then I get my integral to read

$$\frac{\lambda \mu^n}{n!} \frac{1}{(\lambda + \mu)^2} \int_0^{\infty} u^n e^{-u} du$$

Which isn't the same. What am I doing wrong? Also, how would I do the integral?

-

Just minor glitch in the substitution. We have $dt=\dfrac{du}{\lambda+\mu}$.

We also need to substitute for the $t^n$ in the integral, obtaining $\dfrac{u^n}{(\lambda+\mu)^n}$.

Together, the $\dfrac{1}{\lambda+\mu}$ and $\dfrac{u^n}{(\lambda+\mu)^n}$ give us the desired $(\lambda+\mu)^{n+1}$ in the denominator.

For the integral $\int_0^\infty u^n e^{-u}\,du$, call this $F(n)$. By integration by parts, you can express $F(n)$ in terms of $F(n-1)$.

For the integration by parts, let $v=u^n$ and $dw=e^{-u}\,du$. Then $dv=nu^{n-1}\,du$ and $w=-e^{-u}$. Pretty quickly we get $F(n)=nF(n-1)$, and conclude that $F(n)=n!$.

Or else you can look up Gamma Function on Wikipedia.

-
Do you know why I do any kind of integration at all? –  Kaish Dec 19 '12 at 22:04
Informally, for any $n$, we are "adding up" over all waiting times $t$ that could yield that $n$, –  André Nicolas Dec 19 '12 at 22:09
So why is it an integral and not the summation sign? –  Kaish Dec 19 '12 at 22:54
Because $t$ varies continuously. The conditional distribution really is measuring the probability that $N=n$ given $T$ lies between $t$ and $t+dt$. The "adding up" I mentioned casually earlier involves dividing the interval into a large number of small parts, and using a Riemann sum to approximate the probability. Then we take the limit as $\Delta t\to 0$, that is, we find a definite integral. –  André Nicolas Dec 19 '12 at 23:01