bayesplain.core.gamma_poisson.ratio_posterior¶
-
bayesplain.core.gamma_poisson.ratio_posterior(events1, exposure1, events2, exposure2, a=
0.5, b=0.0)[source]¶ Exact posterior for the ratio of two rates, group 2 over group 1.
- Parameters:¶
- Returns:¶
((b + t1) / (b + t2)) * BetaPrime(a + y2, a + y1).- Return type:¶
scipy.stats.rv_continuous_frozen
Examples
>>> post = ratio_posterior(10, 2.0, 20, 2.0) >>> round(float(post.median()), 2) 1.98