public class ControlVariates extends Object implements MeanEstimator
| Modifier and Type | Class and Description |
|---|---|
static interface |
ControlVariates.Estimator |
| Constructor and Description |
|---|
ControlVariates(UnivariateRealFunction f,
UnivariateRealFunction g,
double Eg,
double b,
RandomNumberGenerator X)
Estimates \(E(f(X_1))\), where f is a function of a random
variable.
|
| Modifier and Type | Method and Description |
|---|---|
double |
cov() |
ControlVariates.Estimator |
estimate(int n)
Gets an estimator.
|
public ControlVariates(UnivariateRealFunction f, UnivariateRealFunction g, double Eg, double b, RandomNumberGenerator X)
f - the random function to evaluate the expectation ofg - the random function with known valueEg - the expectation of gb - a coefficientX - a random number generatorpublic double cov()
public ControlVariates.Estimator estimate(int n)
MeanEstimatorestimate in interface MeanEstimatorn - the number of samples to draw for the estimationCopyright © 2010-2026 NM Group. All Rights Reserved.