All,
There have been a few questions regarding the negative binomial (NB) probability distribution used by SPSS. As I mentioned in an email last night, there is more than one NB probability distribution. The one I provided yesterday is an alternative to the one that SPSS uses.
Here is an example from a message posted previously where the OP was unable to obtain the same results when trying to compute pr(x<=2) using SPSS:
In the message above, the OP reported:
E(x) = 1.0815
V(x) = 1.7697
Using SPSS, he OP was unable to obtain pr(x<=2) = 0.8694, which was provided in his textbook.
In order to obtain that specific probability, one could use the alternative NB probability distribution that I provided last night. If you run the syntax BELOW my name, you will obtain pr(x<=2)=0.8694. I do not think one should try to connect the two parameterizations. Simply use the one that is most appropriate for your situation.
Best,
Ryan
--
DATA LIST LIST / lambda variance x.
BEGIN DATA.
1.0815 1.7697 0
1.0815 1.7697 1
1.0815 1.7697 2
END DATA.
compute k = lambda**2 / (variance - lambda).
compute prob_x = ((k / (k + lambda))**k) * (exp(lngamma(k + x)) / (exp(lngamma(x+1))*exp(lngamma(k)))) * (lambda / (k + lambda))**x.
execute.
AGGREGATE
/OUTFILE=* MODE=ADDVARIABLES
/BREAK=
/ cum_prob_x_2 =SUM(prob_x).