Class AntitheticVariates
- java.lang.Object
-
- dev.nm.stat.random.variancereduction.AntitheticVariates
-
- All Implemented Interfaces:
MeanEstimator
public class AntitheticVariates extends Object implements MeanEstimator
The antithetic variates technique consists, for every sample path obtained, in taking its antithetic path - that is given a path \(\varepsilon_1,\dots,\varepsilon_M\) to also take, for example, \(-\varepsilon_1,\dots,-\varepsilon_M\) or \(1-\varepsilon_1,\dots,1-\varepsilon_M\). The advantage of this technique is twofold: it reduces the number of normal samples to be taken to generate N paths, and it reduces the variance of the sample paths, improving the accuracy.- See Also:
- "Wikipedia: Antithetic variates"
- Glasserman, Paul. "Chapter 4.2. Antithetic Variates," Monte Carlo Methods in Financial Engineering. 2003
-
-
Field Summary
Fields Modifier and Type Field Description static UnivariateRealFunction
INVERSE
static UnivariateRealFunction
REFLECTION
-
Constructor Summary
Constructors Constructor Description AntitheticVariates(UnivariateRealFunction f, RandomNumberGenerator X1)
Estimates \(E(f(X_1))\) and use INVERSE as the default antithetic path.AntitheticVariates(UnivariateRealFunction f, RandomNumberGenerator X1, UnivariateRealFunction X2)
Estimates \(E(f(X_1))\), where f is a function of a random variable.
-
-
-
Field Detail
-
INVERSE
public static final UnivariateRealFunction INVERSE
-
REFLECTION
public static final UnivariateRealFunction REFLECTION
-
-
Constructor Detail
-
AntitheticVariates
public AntitheticVariates(UnivariateRealFunction f, RandomNumberGenerator X1, UnivariateRealFunction X2)
Estimates \(E(f(X_1))\), where f is a function of a random variable.- Parameters:
f
- the random function to evaluate the expectation ofX1
- a random number generatorX2
- the antithetic function, givenX
-
AntitheticVariates
public AntitheticVariates(UnivariateRealFunction f, RandomNumberGenerator X1)
Estimates \(E(f(X_1))\) and use INVERSE as the default antithetic path.- Parameters:
f
- the random function to evaluate the expectation ofX1
- a random number generator
-
-
Method Detail
-
cov
public double cov()
-
estimate
public 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
-
-