2016-04-09: This bug is indeed fixed (thank you, Stefan R.!) in 10.4. It may have been fixed in 10.3 or 10.3.1, but I haven't tried these versions.
dist=MultivariateHypergeometricDistribution[5,ConstantArray[2,10]];
prob=Probability[a==1,Distributed[{a,b,c,d,e,f,g,h,i,j},dist]]
We stuff an urn with coloured balls, ten colours, two balls of each colour, for a total of twenty. We draw five balls without replacing them; the list {a,…,j}
then (loosely speaking) represents what we just have drawn. The probability of picking exactly one ball of colour "a" P(a==1)
then comes out to 15/38, easily verified and computed in a snap by Mathematica.
What about P(a==1&&b==1)
, the probability of getting exactly one "a" and one "b" ball each? You can probably model this in your head, do the calculation with pencil and paper – and finish long before Mathematica 10.2, which hasn't finished yet in the time it took me to type all this.
Or just checking for P(a==1&&b<0)
? Neat, the answer is instantaneous and correct (p==0). And since the number of balls of colour "b" must obviously be at least 0, let's try this, too:
dist=MultivariateHypergeometricDistribution[5,{2,2,2,2,2,2,2,2,2,2}];
prob=Probability[a==1&&b>=0,Distributed[{a,b,c,d,e,f,g,h,i,j},dist]]
P(a==1||b>=0)
? No luck. P(a==b)
? Perhaps next week. P(a!=b)
? Nope.
Apparently, the cutoff is at five dimensions, that is, when the length of the list
that is passed to MultivariateHypergeometricDistribution[n,list]
becomes greater than five. Up to five, everything works as expected.
My question is, I fear, obvious and not very specific: What am I doing wrong? Or must I keep recalling my high-school maths and calculate my probabilities on an abacus?