Dew Stats Master .NET
StatWeibullPlot Routine
Summary
Constructs the Weibull Probability Chart.

Unit
StatProbPlots

Declaration
Procedure StatWeibullPlot(Data: TVec; XDrawVec, YDrawVec: TVec; out MinX, MaxX, MinY, MaxY: TSample; DataSorted: boolean = true);
 Parameter  Description 
Data Data to be drawn. 
DataSorted If 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. 
XDrawVec Retunrs vector of X values to be drawn. 
YDrawVec Returns vector of Y values to be drawn. 
minX,minY Returns slope line start point. These value are used by TStatProbSeries series. 
maxX,maxY Returns slope line end point. These value are used by TStatProbSeries series. 

Description

Constructs the Weibull Probability Chart. Use TStatProbSeries 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 fit 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).

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

Categories
Probability plots
 See Also 
TStatProbSeries 

Example 1

Uses MtxExpr, StatProbPlots, StatSeries, Math387, MtxVecTee; procedure Example(Series1: TStatProbSeries); var Data, XVec, YVec: Vector; X1,Y1,X2,Y2: TSample; begin // generate some random values for Data vec Data.Size(100); RandomWeibull(3,1.2,Data); StatWeibullPlot(Data,XVec,YVec,X1,X2,Y1,Y2,false); With Series1 do begin MinX := X1; MinY := Y1; MaxX := X2; MaxY := Y2; end; DrawValues(XVec,YVec,Series1); end;
#include "Math387.hpp" #include "MtxVecCpp.h" #include "StatProbPlots.hpp" #include "StatSeries.hpp" #include "MtxVecTee.hpp" void __fastcall Example(TStatProbSeries * Series1); { Vector data,xvec,yvec; double x1,x2,y1,y2; data->Size(100,false); RandomWeibull(3, 1.2, data); StatWeibullPlot(data,xvec,yvec,x1,x2,y1,y2,false); Series1->MinX = x1; Series1->MaxX = x2; Series1->MinY = y1; Series1->MaxY = y2; DrawValues(xvec,yvec,Series1); }
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); data.RandomWeibull(3.0, 1.2); // 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); } }

Copyright 2008 Dew Research
http://www.dewresearch.com