Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've noticed this strange behavior and I'm wondering if it's a bug.

I define a Cauchy distribution:

c = CauchyDistribution[0, 1];

If I evaluate Mean[c], I get Indeterminate, as expected.

If I evaluate Expectation[x, x \[Distributed] c], I get Expectation[x, x \[Distributed] CauchyDistribution[0, 1]]. I would have expected Indeterminate, too, but that's ok.

However, if I evaluate Expectation[x + y, {x \[Distributed] c, y \[Distributed] c}], I get 0.

The sum of two independent Cauchy distributed random variables should be another Cauchy distributed random variable, right? Why is the expectation 0?

share|improve this question
up vote 5 down vote accepted

You can check that :

TransformedDistribution[ x + y, {x \[Distributed] CauchyDistribution[0, 1], 
                                y \[Distributed] CauchyDistribution[0, 1]}]

(* CauchyDistribution[0, 2] *)  

Expectation[z, z \[Distributed] CauchyDistribution[0, 2]]
(* Expectation[z, z \[Distributed] CauchyDistribution[0, 2]] *)

Mean[TransformedDistribution[ x + y, {x \[Distributed] c, y \[Distributed] c}]]
(* Indeterminate *)
share|improve this answer
So, the conclusion is it's a bug? – Sjoerd C. de Vries Jan 11 '13 at 12:19
@SjoerdC.deVries Yes it looks like it. – b.gatessucks Jan 11 '13 at 12:42
@AndyRoss can you confirm this diagnosis? – rcollyer Jan 11 '13 at 15:48
@rcollyer I was hoping for news from him too. – b.gatessucks Jan 11 '13 at 16:31

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.