Examples.ControlVariates
Class ControlVariateTest_2

java.lang.Object
  extended byExamples.ControlVariates.ControlVariateTest_2

public class ControlVariateTest_2
extends java.lang.Object

Compares a Monte Carlo mean to a Monte Carlo mean computed using a * control variate.

* *

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.

* *

We compute this correlation and also the mean of X both with and without * the use of the control variate from a sample of 100,000 observations of X. * The objective is to see how much closer the controlled mean is to the true * mean E(X)=1/2 than the uncontrolled mean.

* * @author Michael J. Meyer


Constructor Summary
ControlVariateTest_2()
           
 
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

ControlVariateTest_2

public ControlVariateTest_2()
Method Detail

main

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