# Sufficient large probability of true alternative hypothesis

Let $$\textbf{X}=(X_1,\ldots,X_{n_1})$$ be a random sample such that: $$X_i|\mu,\sigma^2\sim N(\mu,\sigma^2)$$ where $$\sigma^2$$ is known.

We assume a prior for $$\mu$$: $$\mu|\sigma^2\sim N\left(\mu_0,\frac{\sigma^2}{n_0}\right).$$

So we get that the posterior of $$\mu|\textbf{X}$$ is: $$\mu|\textbf{X}\sim N\left(\frac{n_0\mu_0+n_1\bar{X}}{n_0+n_1},\frac{\sigma^2}{n_0+n_1}\right)$$

Also, we assume the following hypothesis test:$$H_0:\mu=0 \quad \text{versus} \quad H_1:\mu>0$$

How can we find the value of $$\bar{X}$$ for which $$P(\mu>0|\textbf{X})>\eta$$ ?

We need to transform $$\mu|\textbf{X}\sim N\left(\frac{n_0\mu_0+n_1\bar{X}}{n_0+n_1},\frac{\sigma^2}{n_0+n_1}\right)$$ to $$Z\sim N(0,1)$$
Therefore, $$P(\mu>0|\textbf{X})=$$ $$P\left(\frac{\mu-\frac{n_0\mu_0+n_1\bar{X}}{n_0+n_1}}{\sqrt{\frac{\sigma^2}{n_0+n_1}}}>\frac{0-\frac{n_0\mu_0+n_1\bar{X}}{n_0+n_1}}{\sqrt{\frac{\sigma^2}{n_0+n_1}}}|\textbf{X}\right)=$$ $$P\left(Z>-\frac{n_0\mu_0+n_1\bar{X}}{\sigma\sqrt{n_0+n_1}}|\textbf{X}\right)=$$ $$1-P\left(Z\le-\frac{n_0\mu_0+n_1\bar{X}}{\sigma\sqrt{n_0+n_1}}|\textbf{X}\right)=$$ $$1-\Phi\left(-\frac{n_0\mu_0+n_1\bar{X}}{\sigma\sqrt{n_0+n_1}}\right)$$
So, $$1-\Phi\left(-\frac{n_0\mu_0+n_1\bar{X}}{\sigma\sqrt{n_0+n_1}}\right)>\eta\Leftrightarrow$$ $$\Phi\left(-\frac{n_0\mu_0+n_1\bar{X}}{\sigma\sqrt{n_0+n_1}}\right)<1-\eta\Leftrightarrow$$ $$-\frac{n_0\mu_0+n_1\bar{X}}{\sigma\sqrt{n_0+n_1}} $$\bar{X}>-\frac{\sigma\sqrt{n_0+n_1}z_{1-\eta}+n_0\mu_0}{n_1}$$