public void gumbelMaxProbabilityPlot(){
            this.lastMethod = 6;

            // Check for suffient data points
            this.gumbelMaxNumberOfParameters = 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 muest = mean;
            if(muest==0.0)muest = this.standardDeviation/3.0;
            double sigmaest = this.standardDeviation;
            double[] start = {muest, sigmaest};
            this.initialEstimates = start;
            double[] step = {0.3*muest, 0.3*sigmaest};
            double tolerance = 1e-10;

             // Add constraint; sigma>0
            min.addConstraint(1, -1, 0);

            // Create an instance of Gumbel (maximum order statistic)ProbPlotFunc
            GumbelMaxProbPlotFunc gmappf = new GumbelMaxProbPlotFunc();
            gmappf.setDataArray(this.numberOfDataPoints);

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

              // Get mu and sigma values
            this.gumbelMaxParam = min.getBestEstimates();

            // Get mu and sigma value errors
            this.gumbelMaxParamErrors = min.getBestEstimatesErrors();

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

            // Calculate Gumbel (maximum order statistic) order statistic medians
            this.gumbelMaxOrderMedians = Stat.gumbelMaxOrderStatisticMedians(this.gumbelMaxParam[0], this.gumbelMaxParam[1], this.numberOfDataPoints);

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

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

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

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

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

            data[2] = gumbelMaxOrderMedians;
            for(int i=0; i<this.numberOfDataPoints; i++){
                data[3][i] = this.gumbelMaxLine[0] + this.gumbelMaxLine[1]*gumbelMaxOrderMedians[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("Gumbel (maximum order statistic) Order Statistic Medians");
            pg.setYaxisLegend("Ordered Data Values");
            pg.setGraphTitle("Gumbel (maximum order statistic) probability plot:   gradient = " + Fmath.truncate(this.gumbelMaxLine[1], 4) + ", intercept = "  +  Fmath.truncate(this.gumbelMaxLine[0], 4) + ",  R = " + Fmath.truncate(this.gumbelMaxCorrCoeff, 4));
            pg.setGraphTitle2("  mu = " + Fmath.truncate(this.gumbelMaxParam[0], 4) + ", sigma = "  +  Fmath.truncate(this.gumbelMaxParam[1], 4));

            // Plot
            pg.plot();

            this.gumbelMaxDone = true;
            this.probPlotDone = true;
        }