\(F^{-1}(u)\) can be obtained by integrating \(f(x)\), setting the result equal to \(u\), and solving for \(x\):

$$\begin{array}{c} f(x) = e{-x2/2^2}  

F(x) = f(x) dx = - e{-x2/2^2} = u 

F^{-1}(u) = \end{array}$$

Formula

Formula

# For given sigma the value can be estimated using antithetic Variables.
# When getting m samples, X1 represents value generated from m/2 samples from uniform distribution u1
# Similarly X-dash from anithetic sample u-dash = 1 - u
# X2 represents value generated from m/2 samples of uniform distribution u2

anti = function(m,sigma){
  u1 = runif(m/2)
  x1 = sigma * sqrt(-2 * log(u1))
  
  udash = 1 - u1
  xdash = sigma * sqrt(-2 * log(udash))
  
  #second samples
  u2 = runif(m/2)
  x2 = sigma * sqrt(-2 * log(u2))
  
  #Applying the variance formula
  vardash = (var(x1) + var(xdash) + 2 * cov(x1, xdash)/4)
  var2 = (var(x1) + var(x2) + 2 * cov(x1, x2)/4)
  
  #find the % reduction in varianace
  return((var2 - vardash)/var2)  
}

anti(1000,1)
## [1] 0.2021825

Reference : Referred other students discussion.