Control chart limits as percent of actual meanDear community,
I'm working in pharma industry and I would like to build a control chart according to pharmacopoeia guideline EP 2.9.5.
The test is as follow:
- weight 20 tablets
- mot more than 2 should deviate more than 7.5% from the observed mean
- none should deviate more than 15% from the observed mean
I there a way to set the limit in the control chart to 7.5% of the mean and 15% of the mean instead as based on sigma?
I know that as a surrogate I can normalized the data to 100% and add fixed ref line in graph builder, but I rather like to keep the original data not normalized to visualized the deviation from 100% (target) as well.

Thank for your support,
Clément
Data Exploration and VisualizationQuality and Process EngineeringRe: Control chart limits as percent of actual meanYou can also build this type of "grouped" lines in Graph Builder using for example Col Mean and Col Std Dev to calculate those statistics over groups
Re: Control chart limits as percent of actual meanTo set spec limits at +/-15% from the mean, use the following script as an example. This will allow you to easily check for and report any points beyond 15%.
// Based on txnelson's post from Nov 9, 2023.
// The usual frontmatter:
Open( "$SAMPLE_DATA/Quality Control/Diameter.jmp" );
Names Default To Here( 1 );
dt = Current Data Table();
// Change column property: DIAMETER
theMean = Col Mean(:DIAMETER);
Eval(
Substitute(
Expr(
dt:DIAMETER << set property(
"Spec Limits",
{LSL( _LSL_ ),
//Target( _Target_ ),
USL( _USL_ ),
Show Limits( 1 )}
)
),
Expr( _LSL_ ), 0.85*theMean,
//Expr( _Target_ ), theMean,
Expr( _USL_ ), 1.15*theMean
)
);
To simultaneously check for both points beyond 7.5% and points beyond 15%, that's a bit trickier. One way would be to set 7.5% as the known "historical sigma" of the process. Then you could use the built in Warnings functions in Control Chart Builder to check for points beyond 1 and 2 sigma, respectively.
Set 7.5% of the mean as the "historical" Sigma using the Red Triangle -> Set Sigma option. Then, you could right click the graph and use Warnings -> Customize Tests and change Test 1 to check for points beyond 1 sigma (or script these steps as shown below).
Then, set KSigma to 2, and now Test Beyond Limits will also check for points beyond 15%.
This isn't usually how control charts are used, but it would get the job done.
To do so, append this to the script above:
// Control chart builder with manually set historical sigma
Eval(
Substitute(
Expr(
Control Chart Builder(
Variables( Y( :DIAMETER ) ),
Set Sigma( _sigma_ ),
K Sigma( 2 ),
Customize Tests( Test 1( 1, "1" ) ),
Chart( Position( 1 ), Limits( Spec Limits( 1 ) ) )
);
),
Expr( _sigma_ ), 0.075*theMean,
)
);
Re: Control chart limits as percent of actual meanJust to be clear, what you are attempting to do is not a control chart. Control chart limits have nothing to do with specifications which are independently derived from the actual process variation. Reacting to specification as if it is assignable/special cause will likely increase variability in the long run (See Deming and Shewhart).
This doesn't mean you can't plot data against specification, but this is not a control chart and you will need to be careful in your reaction to these limits.
Re: Control chart limits as percent of actual meanI tried to do it in graph builder and went that far (I did not succeed in control chart platform).
I created 5 new columns:
- Mean by category
- T2 neg = :mean by category*0.85
- T2 pos = :mean by category*1.15
- T1 neg = :mean by category*0.925
- T1 pos = :mean by category*1.075
Then I used the following script
Graph Builder(
Spacing Borders( 1 ),
Variables(
Y( :Weight in % of target ),
Y( :T2 neg, Position( 1 ) ),
Y( :T2 pos, Position( 1 ) ),
//Y( :T1 neg, Position( 1 ) ),
//Y( :T1 pos, Position( 1 ) ),
Group X( :"Concatenate[Batch,Tray]"n )
),
Elements(
Points( Y( 1 ) ),
Line( Y( 2 ) ),
Line( Y( 3 ) ),
//Line(Y( 4 )),
//Line(Y( 5 ))
)
);
*Note: JSL moved into JSL Box by txnelson
With only two lines activated, it work well:

but when I activate the four lines (removing the // in the script), i got weird graph:

Any idea ?
Re: Control chart limits as percent of actual meanMaybe the Y-axis is getting grouped together as JMP might do that when you have multiple columns in Y-axis

Graph Builder(
Size(788, 927),
Variables(
Y(:NPN1, Combine("Merged")),
Y(:neg1, Position(1), Combine("Merged")),
Y(:pos1, Position(1), Combine("Merged")),
Y(:neg2, Position(1), Combine("Merged")),
Y(:pos2, Position(1), Combine("Merged")),
Group X(:wafer)
),
Elements(Points(Y(1), Legend(40)), Line(Y(2), Y(3), Y(4), Y(5), Legend(41))),
SendToReport(
Dispatch({"Points"}, "", OutlineBox, {Close(0)}),
Dispatch({"Line"}, "", OutlineBox, {Close(0)})
)
);Re: Control chart limits as percent of actual meanPerfect, Thank you all for the answers.
It works great.
Have a nice day.
Clément