For two independent continuous uniform variables on \([0,1]\) compute the maximal distance between the joint empirical cumulative distribution function and the product of the marginal empirical cumulative distribution functions using Monte-Carlo simulations.
simulecdf(n, N)Returns the e.c.d.f. based on the N Monte_Carlo simulations. The returned object
is a stepfun object obtained from the function ecdf.
the size of the sample.
the number of replications in the Monte-Carlo simulation.
Let \((x1,y1), ..., (x_n,y_n)\) be a bivariate sample of n independent continuous uniform variables.
Its corresponding bivariate e.c.d.f. (empirical cumulative distribution function)
Fn is defined as:
Fn(t1,t2) = #{xi<=t1,yi<=t2}/n = sum_{i=1}^n Indicator(xi<=t1,yi<=t2)/n.
Let Fn(t1) and Fn(t2) be the marginals e.c.d.f. Based on N Monte_Carlo simulations, the function computes the e.c.d.f. of $$n^(1/2) sup_{t1,t2} |Fn(t1,t2)-Fn(t1)*Fn(t2)|.$$
indeptest, stat_indeptest, ecdf2D.