LogLikelihood[MultinomialDistribution[100, {0.2, 0.3, 0.5}], {{10, 20, 70}}]
-12.8338
No problem at all.
n = 171
pj = {0.5678342897940185`, 0.05023062094430643`,
0.029299646238927373`, 0.023714945004969255`, 0.022954135971897396`,
0.02636142850073763`, 0.04033297983450963`, 0.23927195371850615`}
Tr[pj] (* check probabilities sum to 1 *)
data = {3, 56, 19, 28, 18, 24, 14, 9}
Tr[data] (* check data points sum to n *)
LogLikelihood[MultinomialDistribution[n, pj], {data}]
Does not working as expected?
I have checked
data = RandomVariate[MultinomialDistribution[n, pj]]
MultinomialDistribution::vprobprm: "The value {0.567834,0.0502306,0.0292996,0.0237149,<<21>>,0.0263614,0.040333,0.239272} at position 2 in MultinomialDistribution[171,{0.567834,0.0502306,0.0292996,<<21>>,<<21>>,0.0263614,0.040333,0.239272}] is expected to be a list of numbers greater than or equal to 0 and summing to 1."
Why is this? I have checked that Tr[pj] is 1.
Win 7 MMA 10.0.2 X64
Normalizeit automatically by now. – Chen Stats Yu Dec 26 '14 at 21:17