GNU Octave Manual Version 3by John W. Eaton, David Bateman, Søren Hauberg Paperback (6"x9"), 568 pages ISBN 095461206X RRP £24.95 ($39.95) |

## 24.3 Statistical Plots

Octave can create Quantile Plots (QQ-Plots), and Probability Plots (PP-Plots). These are simple graphical tests for determining if a data set comes from a certain distribution.

Note that Octave can also show histograms of data
using the `hist`

function as described in
section 15.1.1 Two-Dimensional Plots.

__Function File:__[`q`,`s`] =**qqplot***(*`x`,`dist`,`params`)- Perform a QQ-plot (quantile plot).
If F is the CDF of the distribution

`dist`with parameters`params`and G its inverse, and`x`a sample vector of length`n`, the QQ-plot graphs ordinate`s`(`i`) =`i`-th largest element of x versus abscissa`q`(`i`f) = G((`i`- 0.5)/`n`).If the sample comes from F except for a transformation of location and scale, the pairs will approximately follow a straight line.

The default for

`dist`is the standard normal distribution. The optional argument`params`contains a list of parameters of`dist`. For example, for a quantile plot of the uniform distribution on [2,4] and`x`, useqqplot (x, "uniform", 2, 4)

`dist`can be any string for which a function`dist_inv`that calculates the inverse CDF of distribution`dist`exists.If no output arguments are given, the data are plotted directly.

__Function File:__[`p`,`y`] =**ppplot***(*`x`,`dist`,`params`)- Perform a PP-plot (probability plot).
If F is the CDF of the distribution

`dist`with parameters`params`and`x`a sample vector of length`n`, the PP-plot graphs ordinate`y`(`i`) = F (`i`-th largest element of`x`) versus abscissa`p`(`i`) = (`i`- 0.5)/`n`. If the sample comes from F, the pairs will approximately follow a straight line.The default for

`dist`is the standard normal distribution. The optional argument`params`contains a list of parameters of`dist`. For example, for a probability plot of the uniform distribution on [2,4] and`x`, useppplot (x, "uniform", 2, 4)

`dist`can be any string for which a function`dist_cdf`that calculates the CDF of distribution`dist`exists.If no output arguments are given, the data are plotted directly.

ISBN 095461206X | GNU Octave Manual Version 3 | See the print edition |