2
$\begingroup$

While using QQ Plots, I always notice these 'groups' of points; many sets of points arranged in a straight line and sometimes in a curve as shown below:

exponential:

Exponential QQ Plot

normal:

Normal QQ Plot

The theoretical quantiles are from exactly the same distribution as the simulated random vectors. I used the following R code below for these plots:

ggplot(data.frame("Theo" = sort(qnorm(ppoints(50))), "Act" = sort(rnorm(50))), aes(x = Theo, y = Act)) + geom_point(color = "#FC717F", alpha = 0.8) + labs(title = "QQPlot", x = "Theoretical Quantiles", y = "Actual Quantiles")

...but you can achieve the same result with qqnorm(rnorm(50)).

My question is, what is the reason for this effect?

I'm guessing that these little 'runs' happen due to some consequence of the joint order statistics distribution, but I can't figure out how/why.

$\endgroup$
2
$\begingroup$

If you generate any kind of random noise and look at it long enough, you will always be able to see some kind of "pattern". This is called pareidolia, and it can lead people to believe that two-factor authentication codes are deliberately chosen to be easy to remember.

You see this very effect yourself, since you see the "pattern" in randomly generated data. Sometimes you'll see a "pattern" of clumps, then a "pattern" of non-clumps, i.e., equally spaced points. One of the two necessarily must happen, so it's not surprising that one does appear.

Thus: there is nothing noteworthy here. Sorry.

$\endgroup$
  • $\begingroup$ Interesting! I think you may be right, that the groups within themselves appear to be falsely linear, although the groups may be appear to be separated because there may be a large random separation simulated. So basically - if the the difference in two sorted samples itself follows some random distribution, and say that the probability that the separation is "large" is 0.1, then you may on average see "lines" of length 10 but the lines aren't really lines at all. This helped; thank you so much!!! $\endgroup$ – infx Dec 24 '17 at 23:27
2
$\begingroup$

You're seeing exactly what you should see.

Let's consider sampling from a uniform (what goes on when sampling from other continuous distributions follows by monotonic transformation).

When you sample values from a uniform distribution, these values are randomly distributed, so even though the expected order statistics are evenly spaced, the ordered data values won't be evenly spaced. Indeed, if they were, this would be a clear signal that the data were not random.

What should the distribution of gaps (spacings) between two consecutive order statistics look like?

When sampling from a standard uniform, it's simple to demonstrate that the distribution of the gaps should have the same distribution as the smallest observation, which a Beta$(1,n)$.

For typical sample sizes this is quite right skew. Here's an example for n=50:

beta density
$\qquad^\text{Density of spacings in samples of size 50 from a standard uniform}$

The median is 0.0138, the mean is 0.0196, but 5% of the time you will exceed 4.2 times the median -- in a typical sample, a few gaps will be quite large relative to the more common small gap. As a result, you'll see what looks like "clumping" - a number of small gaps followed by a relatively large one.

For other distributions, their spacings are not identically distributed but you can see what they should be in various parts of the display by transforming these uniform gaps by the inverse cdf.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.