Overload List
| # | Signature | Description |
|---|---|---|
| 1 | void QCPChart(TVec Data, TVec SampleSize, TVec DrawVec, ref Double CL, TVec UCL, TVec LCL, Double Confidence) | In this case each sample can have different size. You must store sizes in SampleSize vector. |
| 2 | void QCPChart(TVec Data, Int32 SampleSize, TVec DrawVec, ref Double CL, ref Double UCL, ref Double LCL, Double Confidence) | P-Chart. |
Overload 1: void QCPChart(TVec Data, TVec SampleSize, TVec DrawVec, ref Double CL, TVec UCL, TVec LCL, Double Confidence)
In this case each sample can have different size. You must store sizes in SampleSize vector.
| # | Name | Description |
|---|---|---|
| 1 | Data | Data to be analyzed. Each value represents number of defects. |
| 2 | Confidence | Confidence level for upper and lower control limit. Confidence must lie in the (0,1) interval. |
| 3 | SampleSize | Sample size. Can be integer or vector. |
| 4 | DrawVec | Returns values to be drawn. |
| 5 | CL | Returns control Chart centerline. |
| 6 | UCL | Returns control Chart upper control limit. |
| 7 | LCL | Returns control Chart lower control limit. |
Result: stored in self (calling object)
An exeption is raised if Data and SampleSize length do not match.
using Dew.Math;
using Dew.Math.Units;
using Dew.Stats.Units;
namespace Dew.Examples
{
private void Example(Dew.Stats.QCSeries QCSeries1)
{
Vector drawvec = new Vector(0);
Matrix data = new Matrix(0,0);
double cl,lcl,ucl;
StatControlCharts.QCPChart(data,drawvec,out cl,out ucl,out lcl,0.05);
// Setup series properties
QCSeries->UCL = ucl;
QCSeries->LCL = lcl;
QCSeries->CL = cl;
MtxVecTee.DrawValues(drawVec,QCSeries1,0,1,false);
}
}
Overload 2: void QCPChart(TVec Data, Int32 SampleSize, TVec DrawVec, ref Double CL, ref Double UCL, ref Double LCL, Double Confidence)
P-Chart.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Data | TVec | source TVec |
| 2 | SampleSize | Int32 | |
| 3 | DrawVec | TVec | source TVec |
| 4 | CL | Double (ref) | output |
| 5 | UCL | Double (ref) | output |
| 6 | LCL | Double (ref) | output |
| 7 | Confidence | Double | scalar |
Result: stored in self (calling object)
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.