In cases where we want to estimate , we cannot use prior sampling, but we can use rejection sampling. We generate samples as in prior sampling and only keep samples where holds to build the estimate, otherwise we ignore the sample.