Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I'm trying to compute the variational distance between two negative exponential distributions. If $a$ denotes the value of $x$ where both curves are equal, then:

$$\int_0^{+\infty}\left|\lambda_1e^{-\lambda_1x}-\lambda_2e^{-\lambda_2x}\right|dx$$

$$=-\int_{0}^a(\lambda_1e^{-\lambda_1x}-\lambda_2e^{-\lambda_2x})dx+\int^{+\infty}_a(\lambda_1e^{-\lambda_1x}-\lambda_2e^{-\lambda_2x})dx$$

$$=\left[e^{-\lambda_2x} - e^{-\lambda_1x}\right]_{0}^a +\left[e^{-\lambda_1x} - e^{-\lambda_2x}\right]^{+\infty}_a$$

$$=e^{-\lambda_2a} - e^{-\lambda_1a} -1 +1 +e^{-\infty} - e^{-\infty}-e^{-\lambda_1a}+e^{-\lambda_2a}$$

$$=2\left(e^{-\lambda_2a}-e^{-\lambda_1a}\right).$$

Computing $a$ is not difficult: \begin{eqnarray*} \lambda_1e^{-\lambda_1x}=\lambda_2e^{-\lambda_2x} \Leftrightarrow\ln(\lambda_1)-\lambda_1x&=&\ln(\lambda_2)-\lambda_2x\ \Leftrightarrow x&=&\frac{\ln(\lambda_2)-\ln(\lambda_1)}{\lambda_2-\lambda_1}. \end{eqnarray*}

However, what puzzles me is that I am integrating a positive function, yet depending on how parameters are related to each other, the value of the above result may be negative ... what am I missing?

(sorry for the messy layout, it seems that my &'s are ignored ...)

share|improve this question

1 Answer 1

up vote 3 down vote accepted

In the change from the first line of your equation to the second line, you implicitly used the fact that

$$ \lambda_1 e^{-\lambda_1x} > \lambda_2 e^{-\lambda_2x} $$

for $x > a$. (Which is equivalent to assuming $0 < \lambda_1 < \lambda_2$.) You'll see that the parameter ranges that gives you a negative answer from your computation precisely corresponds to the case where the above assumption is false

share|improve this answer
    
Well done, I should pay more attention. Thank you! –  anon Dec 17 '10 at 15:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.