I have $p \sim \text{Beta}(60, 30)$.
And I have to estimate $\operatorname{var}[P(X > 20) | p]$ while $X \sim \text{Binomial}(100, p)$.
I think I can sample $p$, calculate $P(X > 20)$ by sampling for $X$ for each sample of $p$, derive an array of calculations, and take variance of that array(using a software)
But this involves two processes of sampling, so I wonder if there is anyway to tackle this analytically. Is there any one to help me out?
I would have thought this variance is going to be very close to $0$. You seem to have
So as a random variable $\mathbb P(X \gt 20)$ is usually very close to $1$, making its variance small
Here is an numerical integration approach in R, which also estimates the variance of $\mathbb P(X \le 20)$, which should be the same but may avoid some precision errors in calculation. Essentially it splits the unit interval into a number of equal length subintervals, find the probability $p$ lies in each, finds $P(X \gt 20)$ conditioned on the value in the middle of each subinterval and estimates the variance from these
Trying different numbers of subintervals from $2$ to $2^{20}$ (just over a million) would give
which suggests to me that $\operatorname{var}[P(X > 20)] \approx 3 \times 10^{-15}$
Using the same method would suggest that $P(X > 20) \approx 1-2.76 \times 10^{-11}$