StatControlCharts.QCPChart Method

Overload List

#SignatureDescription
1procedure QCPChart(const Data: TVec; const SampleSize: TVec; const DrawVec: TVec; out CL: Double; const UCL: TVec; const LCL: TVec; Confidence: Double);In this case each sample can have different size. You must store sizes in SampleSize vector.
2procedure QCPChart(const Data: TVec; SampleSize: Integer; const DrawVec: TVec; out CL: Double; out UCL: Double; out LCL: Double; Confidence: Double);P-Chart.

Overload 1: procedure QCPChart(const Data: TVec; const SampleSize: TVec; const DrawVec: TVec; out CL: Double; const UCL: TVec; const LCL: TVec; Confidence: Double);

In this case each sample can have different size. You must store sizes in SampleSize vector.

#NameDescription
1DataData to be analyzed. Each value represents number of defects.
2ConfidenceConfidence level for upper and lower control limit. Confidence must lie in the (0,1) interval.
3SampleSizeSample size. Can be integer or vector.
4DrawVecReturns values to be drawn.
5CLReturns control Chart centerline.
6UCLReturns control Chart upper control limit.
7LCLReturns control Chart lower control limit.

Result: stored in self (calling object)

Remarks:

An exeption is raised if Data and SampleSize length do not match.

See Also: !:TQCSeries, QCSeries, StatControlCharts.QCNPChart, StatControlCharts.QCUChart, StatControlCharts.QCCChart

Overload 2: procedure QCPChart(const Data: TVec; SampleSize: Integer; const DrawVec: TVec; out CL: Double; out UCL: Double; out LCL: Double; Confidence: Double);

P-Chart.

#NameTypeDescription
1DataTVec
2SampleSizeInteger
3DrawVecTVec
4CLDouble
5UCLDouble
6LCLDouble
7ConfidenceDoublescalar

Result: stored in self (calling object)

Remarks:

Calculates the P-Chart (Control chart for proportions) drawing values, center line, upper and lower control limits. Control limits are based on the normal approximation to the binomial distribution. When p is small, the normal approximation may not always be adequate. In such cases, we may use control limits obtained directly from a table of binomial probabilities. If P is small, the lower control limit obtained from the normal approximation may be a negative number. If this should occur, it is customary to consider zero as the lower control limit.

Note
The assumption is all samples have the same SampleSize.

Examples
Uses StatControlCharts, MtxExp, Math387, MtxVecTee, StatSeries;
procedure Example(Series1: TQCSeries);
var CL, UCL, LCL : double;
Data: Matrix;
DrawVec: Vector;
begin
    Data.LoadFromFile('data.mtx');
    QCPChart(Data,10, DrawVec,CL,UCL,LCL,0.05);
    // setup limit lines
    Series1.UCL := UCL;
    Series1.LCL := LCL;
    Series1.CL := CL;
    // now draw actual data
    DrawValues(DrawVec,Series1);
end;