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
Table[Mean[OrderDistribution[{NormalDistribution[], 4}, i]], {i, 1, 4}] // N
(* {-1.02938, -6.47326, 0.297011, 1.02938} *)

Above are the means of order statistics from a random sample of size $n=4$ from a standard normal distribution. Now, the problem is that the second element in the output is wrong; it should be -0.2970111 because of symmetry. Also, the first and last elements of this array are equal in magnitude, but opposite in sign, due to symmetry. I'm using Mathematica 8.0.

share|improve this question

Most definitely a bug in either Mean[] or OrderDistribution[], as

Table[NExpectation[x, x \[Distributed] OrderDistribution[{NormalDistribution[], 4}, k]],
      {k, 4}]
{-1.02938, -0.297011, 0.297011, 1.02938}

gives the correct results.

Note that

Mean[OrderDistribution[{NormalDistribution[], 4}, 2]]
-6/Sqrt[Pi] - (18*ArcTan[Sqrt[2]])/Pi^(3/2)

when the result ought to be -6/Sqrt[Pi] + (18*ArcTan[Sqrt[2]])/Pi^(3/2). Maybe somebody forgot to put in a minus sign somewhere?

share|improve this answer
Oddly enough, as this example illustrates quite nicely, the Mathematica statistics distribution packages generally do not actually calculate their answers in the usual Mathematica way ... rather, the answers are often pre-typed in, much like a textbook appendix. – wolfies Nov 8 '12 at 12:36

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.