2
$\begingroup$

I was trying to find the CDF for the following problem:

In[1]:= Probability[e1 - Log[e2 + e3] <= t, {
  e1 \[Distributed] ExponentialDistribution[1],
  e2 \[Distributed] ExponentialDistribution[1],
  e3 \[Distributed] ExponentialDistribution[1]}]

Out[1]= Probability[
 e1 - Log[e2 + e3] <= 
  t, {e1 \[Distributed] ExponentialDistribution[1], 
  e2 \[Distributed] ExponentialDistribution[1], 
  e3 \[Distributed] ExponentialDistribution[1]}]

Clearly Mathematica didn't like that. Then I rephrased it as

In[2]:= Probability[e1 - Log[c] <= t, {
  e1 \[Distributed] ExponentialDistribution[1],
  c \[Distributed] GammaDistribution[2, 1]}]

Out[2]= E^-E^-t

which apparently wasn't a problem Note that the sum of two standard exponentials is a gamma distribution with parameters (2,1). So the two problems should have the same solution.

Is there some way I can help Mathematica realize this? Maybe I need to specify something about the numbers not being complex or something?

(Note, I get the same results whether I'm using Mathematica 12.1.1.0 on my own machine, or Wolfram Cloud.)

Update: If I switch the order of the arguments, it also stops working with the GammaDistribution:

In[1]:= Probability[
 e1 - Log[c] <= t, {c \[Distributed] GammaDistribution[2, 1], 
  e1 \[Distributed] ExponentialDistribution[1]}]
Out[1]= Probability[
 e1 - Log[c] <= t, {c \[Distributed] GammaDistribution[2, 1], 
  e1 \[Distributed] ExponentialDistribution[1]}]

It's definitely very brittle.

$\endgroup$
5
  • 2
    $\begingroup$ Funny CDF[TransformedDistribution[ e1 - Log[e2 + e3], {e1 \[Distributed] ExponentialDistribution[1], e2 \[Distributed] ExponentialDistribution[1], e3 \[Distributed] ExponentialDistribution[1]}], t] works. $\endgroup$ Mar 15 at 8:45
  • 3
    $\begingroup$ If you add Assumptions -> t > 0, it works. (Windows 10 12.3.1.0 and 13.2.0) $\endgroup$
    – JimB
    Mar 15 at 13:17
  • $\begingroup$ Thanks! Both of these work! But JimB's solution is faster :) $\endgroup$ Mar 15 at 19:36
  • $\begingroup$ Is t being postive required? $\endgroup$ Mar 15 at 20:44
  • $\begingroup$ @ВалерийЗаподовников good point. The CDF is valid for all $t$, also negative. $\endgroup$ Mar 16 at 20:52

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy