***************************************************************************** * CHAPTER 16 - STATISTICS FOR BUSINESS & ECONOMICS, 5th Edition * ***************************************************************************** * Example 16.1, p. 627 * SAMPLE 1 20 READ(SIGNAL.DIF) / DIF * * The Sample Mean, XBAR, and Sample Standard Deviation, SSD, is calcualted * with the GENR command. * GENR XBAR=(OBS1+OBS2+OBS3+OBS4+OBS5)/5 GENR SSTD=(OBS1-XBAR)**2+(OBS2-XBAR)**2+(OBS3-XBAR)**2+(OBS4-XBAR)**2+& (OBS5-XBAR)**2 GENR SSD=SQRT(SSTD/4) * * The PRINT command is used to replicate Table 16.2, p. 629 * PRINT OBS1 OBS2 OBS3 OBS4 PRINT OBS5 XBAR SSD * * The Overall Sample Mean, SMEAN, and Average Sample Standard Deviation is * calculated with the MEAN= option on the STAT command. * STAT XBAR / MEAN=XDBAR STAT SSD / MEAN=SBAR PRINT XDBAR SBAR GEN1 C4=0.940 * * The Process Standard Deviation, SIGMA, is calculated with the formula * given on page 629. * GEN1 SIGMA=SBAR/C4 PRINT SIGMA * *---------------------------------------------------------------------------- * Example 16.2, p. 630 * * From the previous example, XDBAR=299.88 and SBAR=4.479169. The GENR * command is used to generate a time index defined as TIME beginning at 1. * The GEN1 command is used to calculate the Central Line, CLX, the Lower * Control Limit, LCLX, and the Upper Control Limit, UCLX for the X-chart. * GENR TIME=TIME(0) GEN1 A3=1.43 GEN1 CLX=XDBAR GEN1 LCLX=XDBAR-(A3*SBAR) GEN1 UCLX=XDBAR+(A3*SBAR) PRINT CLX LCLX UCLX * * The PLOT command is used to plot the X-chart for timing signal data in * Figure 16.2. The YMIN= and YMAX= options are specified to set the range * of the Y-axis equal to the Lower Control Limit, LCLX, and the Upper Control * Limit, UCLX as previously calculated with the GEN1 command. The NOPRETTY * option must be specified when the YMIN= and YMAX= options are used * otherwise, SHAZAM will set the range of the Y-axis based on the data. * PLOT XBAR TIME / NOPRETTY YMIN=LCLX YMAX=UCLX * *---------------------------------------------------------------------------- * Example 16.3, p. 632 * * From Example 16.1, SBAR=4.479169. The Central Line of the s-Chart is * defined as LCS, the Lower Control Limit is defined as LCLS and the Upper * Control Limit is defined as UCLS. * GENR S=SSD GEN1 B3=0 GEN1 B4=2.09 GEN1 CLS=SBAR GEN1 LCLS=B3*SBAR GEN1 UCLS=B4*SBAR PRINT CLS LCLS UCLS * * The PLOT command is used to plot s-Chart for the timing signal data in * Figure 16.3. The YMIN= and YMAX= options are specified to set * the range of the Y-axis equal to the Lower Control Limit, LCLS, and * the Upper Control Limit, UCLS as previously calculated with the GEN1 * command. The NOPRETTY option must be specified when the YMIN= and YMAX= * options are used otherwise, SHAZAM will set the range of the Y-axis based * on the data. * PLOT S TIME / NOPRETTY YMIN=LCLS YMAX=UCLS * *---------------------------------------------------------------------------- * Example 16.4, p. 637 * * Recall from Example 16.1 XDBAR=299.88 and SIGMA=4.765073. The GEN1 command * is used to generate the constants required for the calculation of the * Capability and CpK Indices. * GEN1 L=280 GEN1 U=320 GEN1 CP=(U-L)/(6*SIGMA) GEN1 CPK1=(U-XDBAR)/(3*SIGMA) GEN1 CPK2=(XDBAR-L)/(3*SIGMA) PRINT CP CPK1 CPK2 * *---------------------------------------------------------------------------- * Example 16.5, p. 640 * * It is not necessary to change the sample range for this example, since * in Example 16.1, the range was set to 1 20. The data found in the * ELECTRONIC.DIF file has the same sample range. * READ(ELECTRONIC.DIF) / DIF LIST * * The STAT command with the MEAN= option is used to save the mean value of * P in the constant PBAR. * STAT P / MEAN=PBAR * * The GEN1 command is used to calculate the p-chart Central Line, CLP, * Lower Control Limit, LCLP and Upper Control Limit, UCLP. * GEN1 CLP=PBAR GEN1 N=200 GEN1 LCLP=PBAR-3*(SQRT((PBAR*(1-PBAR))/N)) GEN1 UCLP=PBAR+S*(SQRT((PBAR*(1-PBAR))/N)) PRINT CLP LCLP UCLP * * The PLOT command is used to plot p-chart for the sample proportion of * nonconforming items in Figure 16.5. The YMIN= and YMAX= options are * specified to set the range of the Y-axis equal to the Lower Control Limit, * LCLP, and the Upper Control Limit, UCLP as previously calculated with the * GEN1 command. The NOPRETTY option must be specified when the YMIN= and * YMAX= options are used otherwise, SHAZAM will set the range of the Y-axis * based on the data. * PLOT P TIME / NOPRETTY YMIN=LCLP YMAX=UCLP * *---------------------------------------------------------------------------- * Example 16.6, p. 643 * * The sample range for the data on the Bolts of Cloth does not need to be * changed since it is the same as Example 16.1. * READ(CLOTH.DIF) / DIF LIST * * The STAT command is used to save the mean of the Number of Imperfections * in the constant CBAR. * STAT IMPERF / MEAN=CBAR * * The GEN1 command is used to generate the Central Line defined as CLC. * GEN1 CLC=CBAR * * The IF1 command is equivalent to using the SAMPLE 1 1 command and the * IF command. The IF command is a conditional GENR command. If the * expression in the parentheses is true or positive then the remainder * of the IF command is executed. In this example, the Lower Control Limit, * LCLC, is calculated based on the value of c-bar. The first IF1 command * determines if c-bar is less than or equal to 9. If this expression is * true then the remainder of the statement is executed. If the first IF1 * expression is not true then the second IF1 command is executed. * IF1(CBAR.LE.9) LCLC=0 IF1(CBAR.GT.9) LCLC=CBAR-(3*SQRT(CBAR)) * * The Upper Control Limit is defined as UCLC with the GEN1 command. * GEN1 UCLC=CBAR+(3*SQRT(CBAR)) PRINT CLC LCLC UCLC * * The PLOT command is used to plot c-Chart for the number of occurrences of * an event in Figure 16.6. The YMIN= and YMAX= options are specified to set * the range of the Y-axis equal to the Lower Control Limit, LCLC, and the * Upper Control Limit, UCLC as previously calculated with the GEN1 command. * The NOPRETTY option must be specified when the YMIN= and YMAX= options * are used otherwise, SHAZAM will set the range of the Y-axis based on the * data. * PLOT IMPERF TIME / NOPRETTY YMIN=LCLC YMAX=UCLC * DELETE / ALL *---------------------------------------------------------------------------- * STOP