# Latest content was relocated to https://bintanvictor.wordpress.com. This old blog will be shutdown soon.

## Tuesday, December 9, 2014

### Q-Q plot learning notes

Based on http://en.wikipedia.org/wiki/Q%E2%80%93Q_plot

2 simple use cases. First look at 2 distinct continuous distributions,
like Normal vs Gamma, or LogNormal vs Exponential. Be concrete -- Use
real numbers to replace the abstract parameters.

We (won't but) could plot the two CDF curves, both strongly increasing
from 0 to 1. To keep things simple we will restrict the random
variables to be (0, +inf).

Now invert both CDF functions to get so-called quantile function. So
for each q value between 0 and 1, like 0.25, we can look up the
corresponding "quantile" value that the random variable can take on.

We look up both quantile functions to get 2 such quantile values. Use
them as (x,y) coordinate and plot a point. If we pick enough q values,
we will see a curve emerging -- the Q-Q plot. X-axis will be the range
values of one distribution and Y-axis the other distribution. Both
could be 0 to inf.

Now 2nd use case (more useful) -- comparing an empirical distribution
(Y) against a theoretical model (X). We still can look up the quantile
value for any q value between 0 and 1, so we still can get a Q-Q plot.