I saw this article on wikipedia https://en.wikipedia.org/wiki/Beta-binomial_distribution and there is even a small example for the math-dummies like me. However, there is something I am not getting which is how to estimate the second factorial moment. I've been fiddling with this a bit, but no matter what I try, I never get to 42.31. If someone could provide a line of code or a formula that computes this, that would be super helpful. For the ones that like python, here is the data:
import numpy as np
n = 12
x = np.array([3,24,104,286,670,1033,1343,1112,829,478,181,45,7])
c = np.array(range(n+1))
Thank you for your help!