Bayesian Statistics - Zero Inflated Binomial Model - Calculate Posterior Conditional Distribution
Looking at solving question a) as attached. Even if is not fully solved, some help on where to begin would also be appreciated.
Thanks
Answer
You want to calculate:
$$P(z_i=1\mid x_i,\omega,p)$$
the definition of the $z_i$ is so that $z_i=0\implies x_i=0$. So if $x_i\neq0$ you must have that $z_i=1$, i.e.:
$$P(z_i=1\mid x_i\neq0, \omega,p)=1$$
and, as the text remarks, the onlything to calculate is
$$P(z_i=1\mid x_i=0, \omega,p)$$
First we apply Bayes Theorem to get:
$$P(z_i=1\mid x_i=0,\omega,p) = \frac{P(x_i=0\mid z_i=1, p,\omega)\cdot P(z_i=1\mid p,\omega)}{P(x_i=0\mid p,\omega)}$$
We know that $(x_i|z_i=1)\sim BIN(7;p)$, so $P(x_i=0\mid z_i=1,p,\omega) = (1-p)^7$. We further calculate:
$$P(x_i=0\mid p,\omega) = P(x_i=0\mid z_i=1,p,\omega)\cdot P(z_i=1\mid p,\omega)+P(x_i=0\mid z_i=0,p,\omega)\cdot P(z_i=0\mid p,\omega)$$
which we evaluate to:
$$P(x_i=0\mid p,\omega) = (1-p)^7\cdot \omega+1\cdot(1-\omega)$$
This leaves us with:
$$P(z_i=1\mid x_i=0,p,\omega)=\frac{(1-p)^7\cdot \omega}{(1-p)^7\cdot \omega + (1-\omega)}$$
And in total:
$$P(z_i=1\mid x_i=0,\omega) = \int_0^1 P(z_i=1\mid x_i=0, p,\omega) \underline{p}(p)\,dp$$
where $\underline p(p) = \dfrac{p^{a-1}\cdot (1-p)^{b-1}}{B(a,b)}$ is the Beta distribution. This doesn't look like it would be any fun to evaluate - the text probably would accept this expression as an answer.
- answered
- 1389 views
- $14.76
Related Questions
- Equation Required/Formula
- Compute the cumulative density function of X
- Computing mean, median, inter-quartile range, and standard deviation
- Multiple comparisons problem
- Currently studying a grad level Statistical Inference course. I'd just like some clarification regarding how to obtain the Rao-Cramer Lower Bound for a statistic.
- Writing a conclusion about data shown in Xbar and R control charts
- Let $X$ be a single observation from the density $f(x) = (2θx + 1 − θ)I[0,1](x)$ with $−1≤ θ ≤ 1$. Find the most powerful test of size $α$ and its power
- Introductory statistics, probability (standard distribution, binomial distribution)