Class ControlVariates
- java.lang.Object
-
- dev.nm.stat.random.variancereduction.ControlVariates
-
- All Implemented Interfaces:
MeanEstimator
public class ControlVariates extends Object implements MeanEstimator
Control variates method is a variance reduction technique that exploits information about the errors in estimates of known quantities to reduce the error of an estimate of an unknown quantity. We estimate the mean of \(f_i(x;b) = f_i(x) - b(g_i(x) - E(g))\).- See Also:
- "Wikipedia: Control variates"
- Glasserman, Paul. "Chapter 4.1. Control Variates," Monte Carlo Methods in Financial Engineering. 2003
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ControlVariates.Estimator
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
cov()
ControlVariates.Estimator
estimate(int n)
Gets an estimator.
-
-
-
Constructor Detail
-
ControlVariates
public 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.- Parameters:
f
- the random function to evaluate the expectation ofg
- the random function with known valueEg
- the expectation of gb
- a coefficientX
- a random number generator
-
-
Method Detail
-
cov
public double cov()
-
estimate
public ControlVariates.Estimator estimate(int n)
Description copied from interface:MeanEstimator
Gets an estimator.- Specified by:
estimate
in interfaceMeanEstimator
- Parameters:
n
- the number of samples to draw for the estimation- Returns:
- an estimator
-
-