Class ImportanceSampling

  • All Implemented Interfaces:
    MeanEstimator

    public class ImportanceSampling
    extends Object
    implements MeanEstimator
    Importance sampling is a general technique for estimating properties of a particular distribution, while only having samples generated from a different distribution rather than the distribution of interest. Specifically, \[ E_F(h(s)) = \int h(s)f(s) ds = \int h(s)\frac{f(s)}{g(s)}g(s)ds = \int h(s)w(s)g(s)ds = E_G(h(s)w(s)) \]
    See Also:
    Wikipedia: Importance sampling
    • Method Detail

      • estimate

        public Estimator estimate​(int n)
        Description copied from interface: MeanEstimator
        Gets an estimator.
        Specified by:
        estimate in interface MeanEstimator
        Parameters:
        n - the number of samples to draw for the estimation
        Returns:
        an estimator