# Quantile-quantile plot [closed]

Am I right that this code:

QuantilePlot[data, NormalDistribution[Mean[data], StandardDeviation[data]]


will return QQ plot of the sample quantiles of our data versus theoretical quantiles from a normal distribution with the same mean and variance as our data have?

## closed as off-topic by 2012rcampion, bbgodfrey, xzczd, Jens, Mr.Wizard♦May 6 '15 at 8:05

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – 2012rcampion, bbgodfrey, xzczd, Jens, Mr.Wizard
If this question can be reworded to fit the rules in the help center, please edit the question.

• Yes. $\phantom{}$ – J. M. is away May 4 '15 at 18:16
• @Guesswhoitis., thanks. And if I understand that correctly, the sample quantiles (based on our data) will be on vertical axis and the theoretical quantiles from a normal distribution will be on horizontal axes (based on the code above)? – Johny May 5 '15 at 12:03
• Yes, you can check that using the first example on the QuantilePlot page which has uniformly distributed data between 0 and 1. The y axis has the same range. See also the "Scope" section which has an example comparing uniformly distributed data with a theoretical distribution. – Sjoerd C. de Vries May 6 '15 at 8:50

Yes, your assumption is correct: QuantilePlot will plot quantiles of the reference distribution (i.e. theoretical quantiles) on the horizontal axis; and empirical (i.e. sample) quantiles on the vertical axis.
To convince yourself that Mathematica respects that common convention, you can find an example buried deep in the documentation page for QuantilePlot (look under "Scope" in the "Presentation" subsection) in which WRI has labeled the axes accordingly:
• @Guesswhoitis. Quite right. And the example following the one you mentioned, involving plotting data against a UniformDistribution, really drives the point home as well. I overlooked those two. The doc page for QuantilePlot is surprisingly vast: I still managed to learn something, so not all was lost. Anyway, I think I've already thoroughly flogged this dead horse as it is... – MarcoB May 6 '15 at 0:52