MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Mathematica 6.0.1: problems with Beta Negative Binomial

  • To: mathgroup at smc.vnet.net
  • Subject: [mg84681] Re: [mg84662] Mathematica 6.0.1: problems with Beta Negative Binomial
  • From: Darren Glosemeyer <darreng at wolfram.com>
  • Date: Wed, 9 Jan 2008 03:50:54 -0500 (EST)
  • References: <200801080838.DAA04403@smc.vnet.net>

Thank you for the report. The results should be conditional on the value 
of alpha (the ith moment is only finite for alpha>i). The Mean result is 
correct for alpha>1, Variance and StandardDeviation results for alpha>2, 
Skewness for alpha>3, and Kurtosis for alpha>4.

The missing condition will be fixed in a future release of Mathematica. 
I apologize for any inconvenience this may have caused.

Darren Glosemeyer
Wolfram Research

Nasser Abbasi wrote:
> 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 
>
>   



  • Prev by Date: Re: Module Behavior
  • Next by Date: Re: Re: Module Behavior
  • Previous by thread: Mathematica 6.0.1: problems with Beta Negative Binomial Distribution
  • Next by thread: Interpolation with vectors