Bayesian hypothesis testing: How should I define a prior distribution for a hypothesis defined as an inequality?

62 Views Asked by At

Context: Bayesian hypothesis testing

Preface

Given a population of i.i.d. Bernoulli trials with probability of success $\pi$, let's first consider the case where we are interested in knowing whether $\pi$ is equal to some constant $\hat{\pi}$. Thus, we are interested in the following hypotheses:

$H_0: \pi = \hat{\pi}$

$H_1: \pi \neq \hat{\pi}$

For $H_0$ and $H_1$ respectively, I consider the following prior distributions of $\pi$: $$ \begin{equation*} f(x|H_0) = \begin{cases} 1, & x = \hat{\pi} \\ 0, & x \neq \hat{\pi} \end{cases} \quad \quad \quad f(x|H_1) = \begin{cases} 0, & x = \hat{\pi} \\ Beta(x;\frac{1}{2},\frac{1}{2}), & x \neq \hat{\pi} \end{cases} \end{equation*} $$

Where $Beta(x;\alpha,\beta)$ is the beta probability function (I am considering Jeffreys' prior in this case). From this point, a sample may be drawn to generate posterior distributions and calculate the Bayesian factor.


Question

Consider now the case where we are instead interested in whether $\pi$ is less than or equal to $\hat{\pi}$. Thusly:

$H_0: \pi \leq \hat{\pi}$

$H_1: \pi \gt \hat{\pi}$

What priors would you consider for these hypotheses? Are there equivalently invariant priors to be used? Is a conjugate prior possible given the range limitation? My best attempt would be to consider either a uniform or beta distribution constrained by the respective possible ranges of values allowed for each hypothesis, but I am not sure this is ideal.

Furthermore, in the case where I believe that the real value $\pi$ does not stray far from $\hat{\pi}$, I should consider priors that reflect this belief. How would you construct such a prior? I have thought about defining a prior belief $f(x)$ unconditional on the hypotheses such that $E(f) = \hat{\pi}$, then define $P(H_0)=\int_0^\hat{\pi}f(x)\,dx = 1-P(H_1)$ so that $$ \begin{equation*} f(x|H_0)= \begin{cases} \frac{f(x)}{P(H_0)}, & x \leq \hat{\pi} \\ 0, & x \gt \hat{\pi} \end{cases} \quad \quad \quad f(x|H_1) = \begin{cases} 0, & x \leq \hat{\pi} \\ \frac{f(x)}{P(H_1)}, & x \gt \hat{\pi} \end{cases} \end{equation*} $$

can be used as priors for $H_0$ and $H_1$ respectively. This can be achieved for $f(x) = Beta(x;\alpha,\beta)$ with $\alpha \propto \hat{\pi} \wedge \beta \propto 1-\hat{\pi}$ (same constant of proportionality). Does this approach seem reasonable?

Lastly, if $\hat{\pi}$ was estimated from an old sample, could I use a posterior distribution inferred from that sample as $f(x)$? In this case, I would be concerned with a positive trend in the value of $\pi$.

Thank you for your time!