Using Bayes approach for hypothesis testing

39 Views Asked by At

I was given this question in an interview. I solved the first part using a frequentist approach. But there was no time for second part (using Bayesian).

Let's say we are given two jars with an infinite number of red and blue marbles in each one. We want to test whether the fraction of the number of red marbles in both jars is the same.

To do this, I can set up a hypothesis test. The null hypothesis is p1 = p2 where p1 is the fraction of red marbles in jar A and p2 the fraction of red marbles in jar B.

Now, let's say I'm given prior knowledge that there are 2/3 red marbles in jar A and 1/2 red marbles in jar B. How this change the problem? How can I use Bayes in this situation?