10
$\begingroup$

Bug introduced in 8.0 and fixed in 9.0

OrderDistribution is new in 8.0


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.

$\endgroup$
0

1 Answer 1

10
$\begingroup$

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?

$\endgroup$
1
  • $\begingroup$ 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. $\endgroup$
    – wolfies
    Commented Nov 8, 2012 at 12:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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