TStatProbSeries Class

TPointSeries→TStatProbSeries

type type TStatProbSeries=class(TPointSeries);

Probability plot.

The TStatProbSeries inherits all TPointSeries properties/methods and introduces some new properies. TStatProbSeries can be used to construct "special" statistical plots: Normal probability plot, Quantile-Quantile plot, Weibull probability plot. Exponential probability plot. <Example>In the following example Weibull probabilities plot is built from "scratch" - without adding any series to chart at design time. <code lang="Delphi"> Uses MtxVec, MtxVecTee, StatSeries, Math387; var Data, XVec, YVec: Vector; x1,y1,x2,y2: double; begin Chart1.FreeAllSeries(nil); Chart1.AddSeries(TStatProbSeries.Create(Chart1)); // generate some random values for Data vec Data.Size(100); RandomWeibull(1.2,3,Data); // Random Weibull with a=1.2, b=3.0 StatWeibullPlot(Data,XVec,YVec,x1,x2,y1,y2,false); With TStatProbSeries(Chart1.Series[0]) do begin ProbSeriesType := stWeibullSeries; MinX := x1; MinY := y1; MaxX := x2; MaxY := y2; end; DrawValues(XVec,YVec,Chart1.Series[0]); end; </code> <code lang="C++"> #include "MtxExpr.hpp" #include "Math387.hpp" #include "MtxVecTee.hpp" #include "StatSeries.hpp" void __fastcall WeibullPlot() { sVector Data,XVec,YVec; double x1,y1,x2,y2; Chart1->FreeAllSeries(NULL); Chart1->AddSeries(new TStatProbSeries(Chart1)); // generate some random values for Data vec Data.Size(100,false); RandomWeibull(1.2, 3, Data); // Random Weibull with a=1.2, b=3.0 StatWeibullPlot(Data,XVec,YVec,x1,x2,y1,y2,false); TStatProbSeries s = dynamic_cast<TStatProbSeries> (Chart1->Series[0]); s->ProbSeriesType = stWeibullSeries; s->MinX = x1; s->MinY = y1; s->MaxX = x2; s->MaxY = y2; DrawValues(XVec,YVec,s,false); } </code> </Example>

Examples

delphi
Uses MtxVec, MtxVecTee, StatSeries, Math387;
var Data, XVec, YVec: Vector;
x1,y1,x2,y2: double;
begin
    Chart1.FreeAllSeries(nil);
    Chart1.AddSeries(TStatProbSeries.Create(Chart1));
    // generate some random values for Data vec
    Data.Size(100);
    RandomWeibull(1.2,3,Data); // Random Weibull with a=1.2, b=3.0
    StatWeibullPlot(Data,XVec,YVec,x1,x2,y1,y2,false);
    With TStatProbSeries(Chart1.Series[0]) do
begin
    ProbSeriesType := stWeibullSeries;
    MinX := x1;
    MinY := y1;
    MaxX := x2;
    MaxY := y2;
end;
DrawValues(XVec,YVec,Chart1.Series[0]);
end;

Methods

NameDescription
Create
Destroy

Constants

NameTypeDescription
MaxXdoubleDefine the slope line end point.
MaxYdouble
MinXdoubleDefine the slope line start point.
MinYdouble