## The Q-Q plot

So a Q-Q plot is a way of comparing two probability distributions:

http://en.wikipedia.org/wiki/Q-Q_plot

For different quantile values you plot the value of one distribution against the other. For sampled data this means if the two samples have the same sizes, you sort them and then plot the *i*th entry of one against the *i*th entry of the other, if one sample is a different size to the other, you need to do some sort of interpolation, in the simple C++ code below the quantiles are defined by the smaller sample and intepolation is used to find the corresponding value of the data with the larger sample. Obviously if two samples come from the same distribution, the points should more or less lie on the *x*=*y* line. If one is drawn from a distribution linear related to another, they will still be in a line, but not *x*=*y*.

I don’t really get it, I can see that it is a good visual aid and someone experienced with using these plots might find them very informative, but think about making from the Q-Q plot something quantitative and I assume you might as well do the Mann-Witney-Willcoxon U-test.

http://en.wikipedia.org/wiki/Mann-Whitney_U

I have some code called `Q-Q_plot.cpp`

at:

https://sourceforge.net/p/mnlgeneralcode/