added chi square test to rng for beta_binomial