Class ControlVariateTest_1

  extended byExamples.ControlVariates.ControlVariateTest_1

public class ControlVariateTest_1
extends java.lang.Object

We set up the random variable X=U+eN where U is uniform on [0,1], N standard normal and independent of U and e=0.1. As a control variate we use Y=U-eN. Then the correlation rho(X,Y)=(1-12e^2)/(1+12e^2)=0.78571.

The Monte Carlo mean and controlled Monte Carlo mean of X using a sample of size 100 are defined as random variables in their own right and the variance of these random variables computed.

The two variances are computed from a sample of size 100

The idea is to check if use of the control variate does reduce the variance

Constructor Summary
Method Summary
static void main(java.lang.String[] args)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public ControlVariateTest_1()
Method Detail


public static void main(java.lang.String[] args)