OPTIONS NODATE NONUMBER LS=80 PS=60; *******************************************************; *** np-chart (with unequal sample sizes) ***; *** The response is the number of failing batteries ***; *** from 25 lots of varying size ***; *******************************************************; data battery; input lot $ nfailed sampsize @@;; label nfailed ='Number Failed' lot ='Lot Identifier' sampsize='Number Sampled'; cards; AE3 6 151 AE4 5 142 AE9 6 145 BR3 9 149 BR7 3 150 BR8 0 156 BR9 4 150 DB1 9 158 DB2 4 152 DB3 0 162 DB5 9 140 DB6 7 161 DS4 6 154 DS6 1 144 DS8 5 154 JG1 3 151 MC3 8 148 MC4 2 143 MK6 4 150 MM1 4 147 MM2 0 150 RT5 2 154 RT9 8 149 SP1 3 160 SP3 9 153 ; symbol v=dot w=3; title 'Control Limits for Battery Failures'; proc shewhart data=battery graphics; npchart nfailed*lot / subgroupn = sampsize tests = 1 to 8 ltests = 20 zonelabels tabletests tablelegend; label nfailed='Proportion Failed' lot = 'Lot ID'; run;