Sigh. I think this is a misunderstanding of what uniformly random means. A fairly common one too. Since you seem not interested in showing your code, one can only guess the problem though. There can be no certain answer if I do not see your code. (addendum: The OP has since added a comment that indicates my conjecture is exactly on target.)
You are generating numbers uniformly random with a target interval [1e-6,1].
A uniform distribution implies that for ANY sub-interval of fixed width that is contained in the global window [1.e-6,1] (so assume a sub-interval [a,b]) where we have
then the expected number of events we will observe should be:
If you will generate N samples, then the expected number of events in the sub-interval is:
So expect to see a number of events that are proportional to the sub-interval width. You won't seee exactly that many, since this is a random sampling.
So a uniform random sampling on the interval [0,1] would have roughly 10% of the samples in each bin [0,0.1], [0.1,0.2], [0.2,0.3], etc.
Now in your case, you are sampling on the interval [1e-6,1]. You find that very few samples occur right down at the bottom end, say between [1e-6,1e-5].
Lets use the rule above to see what fraction of the samples SHOULD occur in that interval. Lets say that we generate a sample size of 1000 values in the overall interval. Seems pretty big to me.
1000*(1e-5 - 1e-6)/(1 - 1e-6)
Hmm. I only expect to see 0.009 samples in that sub-interval, whereas I would have expected to see
1000*(1 - 0.9)/(1 - 1e-6)
So 100 events in the subinterval [0.9,1].
Is this truly uniform sampling? YES!!!!!!!!! Of course it is! You need to understand that the first interval I showed is a terribly tiny interval.
If you asked to generate a sampling that is uniformly probable over that region, but what you REALLY wanted was some sort of sampling that is uniform in a log space, then you needed to use a proper random sampling scheme!
For example, try this:
R = 10.^(rand(1,1000)*6 - 6);
Look at some percentiles of this sampling scheme:
It is NOT uniform, at least not in the domain [1e-6,1]. But the log10 of those numbers WILL be uniformly distributed. So, we will expect roughly 50% of the log10 values to be less than -3.
Again, it won't be perfect. But a sample size of 1000 is not really that huge. These predictions only become valid in the limit as N grows to a really large number.
Again, it is just a wild guess.