Hi there,

I am using Sobol sequences to generate say 10,000 draws from the Multivariate Normal with dimension 100, mean vector 0 and covariance matrix equal to the identity matrix.

Generating the sequence is fine, but I find that the distribution of the resulting points is highly concentrated. That is, the density of each draw, relative to that of the other draws, is almost zero for 99% of points, then several orders of magnitude higher for just a few points. I’d expect the relative densities to be a little more even.

Example below. Any ideas what I’m doing wrong?

Thanks

```
using Sobol
using Distributions
using UnicodePlots
function generate_z(K::Int, nr::Int)
# Initialize result with draws from the Uniform distribution over the unit cube [0, 1]^K.
result = fill(0.0, K, nr)
s = SobolSeq(K)
skip(s, nr)
for r = 1:nr
result[:, r] .= next!(s)
end
# Convert to draws from MVN(z | 0_k, I_k) using the inverse CDF
d = Normal(0.0, 1.0)
for r = 1:nr
for i = 1:K
result[i, r] = quantile(d, result[i, r])
end
end
result
end
function zdensity(z::Array{Float64, 2})
K, nr = size(z)
result = fill(1.0, nr)
d = Normal(0.0, 1.0)
totaldens = 0.0
for r = 1:nr
for i = 1:K
result[r] *= pdf(d, z[i, r])
end
totaldens += result[r]
end
result ./= totaldens
end
z = generate_z(100, 10_000);
dens = zdensity(z)
lineplot(dens)
describe(dens)
```