public void paretoProbabilityPlot(){
            this.lastMethod = 4;

            // Check for suffient data points
            this.paretoNumberOfParameters = 2;
            if(this.numberOfDataPoints<3)throw new IllegalArgumentException("There must be at least three data points - preferably considerably more");

            // Create instance of Regression
            Regression min = new Regression(this.sortedData, this.sortedData);
            double betaest = this.minimum;
            double alphaest = this.mean/(this.mean - betaest);
            double[] start = {alphaest, betaest};
            double[] step = {0.3*alphaest, 0.3*betaest};
            this.initialEstimates = start;
            double tolerance = 1e-10;

            // Create an instance of ParetoProbPlotFunc
            ParetoProbPlotFunc pppf = new ParetoProbPlotFunc();
            pppf.setDataArray(this.numberOfDataPoints);

            // Obtain best probability plot varying alpha and beta
            // by minimizing the sum of squares of the differences between the ordered data and the ordered statistic medians
            min.simplex(pppf, start, step, tolerance);

            // Get alpha and beta values
            this.paretoParam = min.getBestEstimates();

            // Get alpha and beta value errors
            this.paretoParamErrors = min.getBestEstimatesErrors();

            // Get sum of squares
            this.paretoSumOfSquares = min.getSumOfSquares();

            // Calculate Pareto order statistic medians
            this.paretoOrderMedians = Stat.paretoOrderStatisticMedians(this.paretoParam[0], this.paretoParam[1], this.numberOfDataPoints);

            // Regression of the ordered data on the Pareto order statistic medians
            Regression reg = new Regression(this.paretoOrderMedians, this.sortedData);
            reg.linear();

            // Intercept and gradient of best fit straight line
            this.paretoLine = reg.getBestEstimates();

            // Estimated erors of the intercept and gradient of best fit straight line
            this.paretoLineErrors = reg.getBestEstimatesErrors();

            // Correlation coefficient
            this.paretoCorrCoeff = reg.getSampleR();

            // Initialize data arrays for plotting
            double[][] data = PlotGraph.data(2,this.numberOfDataPoints);

            // Assign data to plotting arrays
            data[0] = this.paretoOrderMedians;
            data[1] = this.sortedData;

            data[2] = paretoOrderMedians;
            for(int i=0; i<this.numberOfDataPoints; i++){
                data[3][i] = this.paretoLine[0] + this.paretoLine[1]*paretoOrderMedians[i];
            }

            // Create instance of PlotGraph
            PlotGraph pg = new PlotGraph(data);
            int[] points = {4, 0};
            pg.setPoint(points);
            int[] lines = {0, 3};
            pg.setLine(lines);
            pg.setXaxisLegend("Pareto Order Statistic Medians");
            pg.setYaxisLegend("Ordered Data Values");
            pg.setGraphTitle("Pareto probability plot:   gradient = " + Fmath.truncate(this.paretoLine[1], 4) + ", intercept = "  +  Fmath.truncate(this.paretoLine[0], 4) + ",  R = " + Fmath.truncate(this.paretoCorrCoeff, 4));
            pg.setGraphTitle2("  alpha = " + Fmath.truncate(this.paretoParam[0], 4) + ", beta = "  +  Fmath.truncate(this.paretoParam[1], 4));

            // Plot
            pg.plot();

            this.paretoDone = true;
            this.probPlotDone = true;
        }