Class QQPlot
java.lang.Object
smile.plot.swing.Shape
smile.plot.swing.Plot
smile.plot.swing.QQPlot
A Q-Q plot ("Q" stands for quantile) is a probability plot, a kind of
graphical method for comparing two probability distributions, by
plotting their quantiles against each other. In addition, Q-Q plots
can be used as a graphical means of estimating parameters in a
location-scale family of distributions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[]Returns the lower bound of data.double[]Returns the upper bound of data.static QQPlotof(double[] x) One sample Q-Q plot to standard normal distribution.static QQPlotof(double[] x, double[] y) Two sample Q-Q plot.static QQPlotof(double[] x, Distribution d) One sample Q-Q plot to given distribution.static QQPlotof(int[] x, int[] y) Two sample Q-Q plot.static QQPlotof(int[] x, DiscreteDistribution d) One sample Q-Q plot to given discrete distribution.voidDraws the shape.
-
Constructor Details
-
QQPlot
public QQPlot(double[][] points) Constructor.- Parameters:
points- the points in the plot. A point (x, y) on the plot corresponds to one of the quantiles of the second distribution (y-coordinate) plotted against the same quantile of the first distribution (x-coordinate).
-
-
Method Details
-
paint
-
getLowerBound
public double[] getLowerBound()Description copied from class:PlotReturns the lower bound of data.- Specified by:
getLowerBoundin classPlot- Returns:
- the lower bound of data.
-
getUpperBound
public double[] getUpperBound()Description copied from class:PlotReturns the upper bound of data.- Specified by:
getUpperBoundin classPlot- Returns:
- the upper bound of data.
-
of
One sample Q-Q plot to standard normal distribution.- Parameters:
x- the data.- Returns:
- the Q-Q plot.
-
of
One sample Q-Q plot to given distribution.- Parameters:
x- the data.d- the distribution.- Returns:
- the Q-Q plot.
-
of
One sample Q-Q plot to given discrete distribution.- Parameters:
x- the data.d- the distribution.- Returns:
- the Q-Q plot.
-
of
Two sample Q-Q plot.- Parameters:
x- the data.y- another data.- Returns:
- the Q-Q plot.
-
of
Two sample Q-Q plot.- Parameters:
x- the data.y- another data.- Returns:
- the Q-Q plot.
-