Okay, let's briefly go over some likelihood plots
and, and Bayesian analysis of two binomial proportions.
So, likelihood analysis requires the use of profile likelihoods or some other
technique to reduce the dimension down, if you want to do a 1D likelihood plot.
and we can actually show you later on away
you can use the so-called non-central hyper geometric distribution
to get an exact likelihood plot for the odds ratio.
But for the difference in the proportions it's a little harder.
Probably doing a profile likelihood would be the way to go.
So is a little hard, so let's, let's.
leave that discussion for, for elsewhere.
So, instead let's talk about being a Bayesian.
So imagine, so we talked about, for a single binomial proportion, butting
a beta prior on a, on a probability to get a posterior.
So so
imagine putting an independent beta alpha 1 beta 1
prior, and an inde, and a beta alpha 2 beta 2 prior.
p1 and p2 respectively, then the posterior so remember how the
calculation goes. You take likelihood times prior equals
posterior. so here the likelihood is p1
to the x1, 1 minus p1 to the n1 minus x1.
P2 to the y2, 1 minus p2 to the n2 minus y2 and
then the beta prior is p2 to the alpha 1 minus 1, 1
minus p1 to the beta 1 minus 1, p2 to the alpha 2
to the minus 1, 1 minus p2 to the beta 2 minus 1.
So if we multiply all those together we get this formula right here.
Which exactly shows that if we have two independent
binomials and then we multiply them by two independent betas, we
wind up with an independent a pair of independent Beta posteriors.
One Beta posterior for p1, one Beta posterior for p2 where now the
Beta parameter is no longer alpha one but alpha one plus x1 for p1.
And the beta parameter for, for p1 is n1 plus beta 1.
The, the alpha parameter
for p2 is y plus alpha 2. And the beta parameter for p2 is 1 minus.
Is, n2 plus beta 2.
So it's basically like, alpha and. Alpha 1 and beta 1 are the.
the, the, the beta, alpha and beta
parameters for p1, a priori, after you factor
in the data, the just, you add the
successes to alpha and the failures to beta,
you add, and, and, the same for, for p2,
and then you get the, the, the beta posteriors.
And the easiest way to explore this posterior is
with Monte Carlo simulation and I'll show that right here.