octave: Statistical Plots

 
 26.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 SeeTwo-Dimensional Plots.
 
  -- : [Q, S] = qqplot (X)
  -- : [Q, S] = qqplot (X, Y)
  -- : [Q, S] = qqplot (X, DIST)
  -- : [Q, S] = qqplot (X, Y, PARAMS)
  -- : qqplot (...)
      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(If) = 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.
 
      If the second argument is a vector Y the empirical CDF of Y is used
      as DIST.
 
      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, use
 
           qqplot (x, "unif", 2, 4)
 
      DIST can be any string for which a function DISTINV or DIST_INV
      exists that calculates the inverse CDF of distribution DIST.
 
      If no output arguments are given, the data are plotted directly.
 
  -- : [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, use
 
           ppplot (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 is requested then the data are plotted immediately.