Let’s define a binomial distribution with exact (and not too crazy big) parameters:
In[]:=
ℬ=BinomialDistribution500,;(*Mean[ℬ]equals83.*)Mean[ℬ]//N
1
6
3
Out[]=
83.3333
The probability that the random variable is between 70 and 97, i.e. within ~13 units from the mean, should be quite high. In fact, it is just over 90%:
X
In[]:=
Probability[70≤x≤97,xℬ]//N
Out[]=
0.907318
I have been using the NProbability[] function many times without problems, without surprise. I did notice that it performs slower than the Probability[]//N idiom, which i find weird in itself.
But never before did i get such an unexpected result, can anyone confirm?
Has been tested too on Mathematica 12.2 on Wolfram Cloud.
But never before did i get such an unexpected result, can anyone confirm?
Has been tested too on Mathematica 12.2 on Wolfram Cloud.
NProbability[70≤x≤97,xℬ](*zerosrsly?*)
Out[]=
0.
Even if this is not a bug and it could be “corrected” through user fine tuning the options of the function, there should imho at least be a warning admitting that the output result may be numerically off. Probabilities can have values between 0 and 1. So getting 0 instead of 90% is way off. Imho.