StatProbPlots.StatWeibullPlot Method

void StatWeibullPlot(TVec Data, TVec XDrawVec, TVec YDrawVec, ref Double MinX, ref Double MaxX, ref Double MinY, ref Double MaxY, Boolean DataSorted)

Constructs the Weibull Probability Chart.

#NameDescription
1DataData to be drawn.
2DataSortedIf true, algorithm assumes Data is already sorted in ascending order. If Data is not sorted, you must set this parameter to false so that internal algorithm will automatically do the sorting.
3XDrawVecReturns vector of X values to be drawn - > Data estimated quantiles or in this case ordered data values.
4YDrawVecReturns vector of Y values to be drawn - > theretical Weibull probability values or in this case ln(ln(1/(1-p)), where p are predefined theoretical probabilities.
5MinXReturns slope line start X point, XDrawVec 25th percentile. These value are used by Dew.Stats.Tee.ProbabilityPlot series.
6MinYReturns slope line start Y point, YDrawVec 25th percentile. These value are used by Dew.Stats.Tee.ProbabilityPlot series.
7MaxXReturns slope line end X point, XDrawVec 75th percentile. These value are used by Dew.Stats.Tee.ProbabilityPlot series.
8MaxYReturns slope line end Y point, YDrawVec 75th percentile. These value are used by Dew.Stats.Tee.ProbabilityPlot series.

Result: stored in self (calling object)

Remarks:

Constructs the Weibull Probability Chart. Use Dew.Stats.Tee.ProbabilityPlot to visualize/plot constructed values. The Weibull plot is a graphical technique for determining if a data set comes from a population that would logically be fitted by a 2-parameter Weibull distribution (the location is assumed to be zero).

The Weibull plot has special scales that are designed so that if the data do in fact follow a Weibull distribution, the points will be linear (or nearly linear). The least squares fit of this line yields estimates for the shape and scale parameters of the Weibull distribution. Weibull distribution (the location is assumed to be zero).

How to construct Weibull distribution probability plot?

  • If needed, Data values are sorted (DataSorted parameter set to false).
  • Abscissa drawing values are formed by estimated data quantiles - ordered Data values. After calculation they are copied to XDrawVec. Dew.Math.TMtxVecBase.Length and Dew.Math.TMtxVec.Complex properties of XDrawVec are adjusted automatically.
  • Ordinate drawing values are formed by using theoretical probability p to p - > ln[ln[1/(1-p)]]. After calculation they are copied to YDrawVec. Dew.Math.TMtxVecBase.Length and Dew.Math.TMtxVec.Complex properties of YDrawVec are adjusted automatically.
  • XDrawVec and YDrawVec 25th and 75th percentile points are used to construct a reference line. Drawing points departures from this straight line indicate departures from Weibull distribution.

The Weibull plot can be used to answer the following questions:

  • Do the data follow a 2-parameter Weibull distribution?
  • What is the best estimate of the shape parameter for the 2-parameter Weibull distribution?
  • What is the best estimate of the scale (= variation) parameter for the 2-parameter Weibull distribution?
Examples
using Dew.Math;
using Dew.Math.Units;
using Dew.Stats.Units;
namespace Dew.Examples
{
    private void Example(ProbabilityPlot Series1)
    {
        double x1,x2;
        double y1,y2;

        Vector data = new Vector(100,false);
        Vector xvec = new Vector(0);
        Vector yvec = new Vector(0);

        StatRandom.RandomWeibull(3.0, 1.2,data,-1); // some random values
        StatProbPlots.StatWeibullPlot(data, xvec, yvec, out x1, out x2, out y1, out y2, false);
        Series1.MinX = x1;
        Series1.MaxX = x2;
        Series1.MinY = y1;
        Series1.MaxY = y2;
        MtxVecTee.DrawValues(xvec,yvec,Series1,false);
    }
}
See Also: ProbabilityPlot