PDF[BinomialDistribution[1,.5],{0,0.5,1}]
gives {0.5,0.63662,0.5}
and
PDF[BernoulliDistribution[.5],{0,0.5,1}]
gives {0.5,0,0.5}.
Obviously, BinomialDistribution[1,.5] and BernoulliDistribution[.5] are the same.
BinomialDistribution[1,.5]
BernoulliDistribution[.5]
Yes, somewhat strange, indeed! If you define you probability p as a pure function, then it works:
p
p = PDF[BinomialDistribution[2, 0.5]]; {p[0.5]} == p[{0.5}] (* Out: True *)
Maybe this helps. Just made it for myself. We need to study the documentation more thanks.
n=1 is not the point:
In[2]:= p[t_] := PDF[BinomialDistribution[2, 0.5], t]; {p[0.5]} == p[{0.5}] out[2] = False
strange input ( $n=1$ srsly ) $\Rightarrow$ strange output
r u testing robustness of mma function
Strange or not?
In[1]:= p[t_] := PDF[BinomialDistribution[1, 0.5], t]; {p[0.5]} == p[{0.5}] Out[1]= false
i havent studied distributions yet but this look very mathematical:
In[174]:= PDF[BinomialDistribution[1, 5/10], {0, 5/10, 1}] Out[174]= {1/2, 2/\[Pi], 1/2}
Good reminder to RTFM (for all parts of the code). But what multivariate distribution would result in
{0.5,0.63662,0.5}
from
The issue appears to be that
PDF[BinomialDistribution[n,p],{x}]
doesn't catch illegitimate values for x between 0 and n. And maybe "illegitimate" is a bit strong: it doesn't appropriately give a zero probability to values between 0 and n. It does give a zero probability for values larger than n and values less than 0. (Mathematica 12.2, Windows 10)
You should report this to Wolfram, Inc.