ks test simulation