Why this probability approximation is true $P(X) \approx \frac{1}{n} \sum_i P(X|z_i)$ when we sample many $z_i$

38 Views Asked by At

$Z$ is the only hidden variable that $X$ depends on. Why $P(X) \approx \frac{1}{n} \sum_i P(X|z_i)$ is true if we sample many $z$?

1

There are 1 best solutions below

0
On

If you can approximate $P(z)$ via samples, then the sum approximates $\int P(X|z)P(z)dz= \int P(X,z)dz = P(X) $