Mathematica 6.0.1: problems with Beta Negative Binomial Distribution
- To: mathgroup at smc.vnet.net
- Subject: [mg84662] Mathematica 6.0.1: problems with Beta Negative Binomial Distribution
- From: "Nasser Abbasi" <nma at 12000.org>
- Date: Tue, 8 Jan 2008 03:38:50 -0500 (EST)
When alpha is less than 1, the mean does not work. These 2 commands below
should give the same answer:
Mean[BetaNegativeBinomialDistribution[0.3, 3, 10]]
Out[24]= -42.85714285714286
In[25]:= ExpectedValue[x, BetaNegativeBinomialDistribution[0.3, 3, 10], x]
During evaluation of In[25]:= Sum::div:Sum does not converge. >>
In addition, the mean given above as -42 is wrong, as clearly can be seen by
looking at the PDF. The mean must be positive
ListPlot[Table[PDF[BetaNegativeBinomialDistribution[0.3, 3, 10], k], {k, 0,
100}],
AxesOrigin -> {0, 0}]
A rough estimate of the expected value can be found:
tbl = Table[{k, PDF[BetaNegativeBinomialDistribution[0.3, 3, 10], k]}, {k,
1000000}];
mean = N[Sum[tbl[[k,1]]*tbl[[k,2]], {k, 1, 1000000}]]
Which gives about 20,000 and not -42
The Variance is also wrong:
In[105]:= Variance[BetaNegativeBinomialDistribution[0.3, 3, 10]]
Out[105]= -770.3481392557023
(Variance is negative??) Variance is the average of squared quantities, so
it can not be negative.
I think the formulas for the mean and variance shown in help are wrong.
Nasser
- Follow-Ups:
- Re: Mathematica 6.0.1: problems with Beta Negative Binomial
- From: Darren Glosemeyer <darreng@wolfram.com>
- Re: Mathematica 6.0.1: problems with Beta Negative Binomial