Testing difference between two Negative Binomial distributions

Huh. I have no recollection of the above thread, so this is based on a super quick look at what is above. But there may be a typo in the original code (or the follow-up). There is both pre_mu and pre_mean running around, which is always a bit confusing (to me). The scalar pre_mu is used in the likelihood, but post_mu` is not. I suspect that they should be switched inside the likelihood:

    group1 = pm.NegativeBinomial("pre",
                                 mu=pre_mean,
                                 alpha=pre_sd,
                                 observed=pre_nzk
                                 )
    group2 = pm.NegativeBinomial("post",
                                 mu=post_mean,
                                 alpha=post_std,
                                 observed=post_nzk
                                 )

Otherwise, pre_mean and post_mean don’t actually do anything. Does that make sense? If not, I can have a closer look.