Vba Tool for Spc

  • Upload
    sushmax

  • View
    229

  • Download
    0

Embed Size (px)

Citation preview

  • 7/28/2019 Vba Tool for Spc

    1/14

    I N F O R M S

    Transactions on Education

    Vol. 5, No. 3, May 2005, pp. 1932issn 1532-0545 05 0503 0019 informs

    doi10.1287/ited.5.3.19 2005 INFORMS

    An Interactive VBA Tool for TeachingStatistical Process Control (SPC) and

    Process Management Issues

    Jaydeep Balakrishnan, Sherry L. OhOperations Management Area, Haskayne School of Business, University of Calgary, Calgary,

    Alberta T2N 1N4, Canada {[email protected], [email protected]}

    With a global emphasis on improved quality, Statistical Process Control (SPC) is an important process man-agement tool with renewed significance. In order to address this issue, we have developed an interactiveVBA Tool for teaching SPC and process management issues. Students can experiment with the tool to inter-actively examine the various issues that affect SPC and gain insight into the important issues in managing aprocess. The graphical nature of the interface should allow students to visually see the effect of changes inprocess parameters. A detailed Instructors Manual and a Student Lab Manual accompany the software.

    1. IntroductionWith a renewed emphasis on managing processes inOperations Management (OM), discussion of Statis-tical Process Control (SPC) is often included as anintegral part of the OM course. Also, what was oncethought of as a statistical tool used mainly for produc-tion control in manufacturing has now achieved main-

    stream status in an increasing number of Fortune-500companies (including service-based).

    To assist in the teaching of SPC and business processmanagement, we have developed an Excel VBA toolthat can be used in class. The following concepts areexplored through guided use of the teaching model:

    1. False out-of-control and false in-controlindications

    2. The role of reduced variability on improved pro-cess control

    3. Process capability4. The role of reduced variation in ensuring better

    process capability

    5. Six Sigma6. Understanding the role and differences between

    control and specification limits7. Information from control charts

    As we discuss in the next section, this VBA tool canbe more than an SPC teaching tool, it can also helpdemonstrate process management principles.

    2. RationaleWith a global emphasis on improved quality, SPChas become a process management tool with renewed

    importance. Many current business philosophies makespecific use of SPC. For example, Just-In-Time (JIT)concepts have become pervasive in business world-wide. JIT espouses SPC as a form of defect prevention.Further, SPC as well as process capability are crucialto the concept of Six Sigma quality programs atglobal corporations such as GE and Motorola. SPC is

    also seen as integral to the Total Quality Management(TQM) philosophy and the ISO quality standards.Increasingly, managers must think in terms of pro-cesses rather than functions, and a thorough under-standing of SPC will be valuable for future managersof processes.

    At the same time, in our experience, SPC is also oneof the more difficult concepts for students to compre-hend. The theory behind SPC is based on probabilityand statistics, topics many business students are notknown to excel in, or have great interest in. Thus,concepts such as process control limits and processcapability, often taught back-to-back, are frequently

    confusing for many students. Similarly, explaining theeffect of different z values on errors and the interpre-tation of sample statistics is difficult without simulat-ing actual process measures. While the issues can bediscussed with classical visual aids such as a boardor overhead, an interactive computer tool teaches thedesired concepts more effectively and quickly.

    The SPC tool first evolved from an Excel-baseddemonstration of how to create statistical processcontrol charts to a VBA-enabled spreadsheet modelrepresenting situations of Type I/II errors, and then to

    19

    mailto:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]
  • 7/28/2019 Vba Tool for Spc

    2/14

    Balakrishnan and Oh: An Interactive VBA Tool for Teaching SPC and Process Management Issues20 INFORMS Transactions on Education 5(3), pp. 1932, 2005 INFORMS

    its current format demonstrating both process controland capability concepts. The choice of using VBA wasnatural as the mathematical calculations are handledeasily and it allows modifications to be made quickly

    by anyone with access to Excel on their computer. Thegraphical demonstration could have been attainedwith a package such as Macromedia FLASH, but the

    interactive nature of the tool would have been moredifficult to achieve as so much of the graphics are

    based on user inputs and subsequent calculations.Many statistical packages, such as Minitab, have

    the ability to produce a wide array of control chartsquickly and easily. While the mechanics of creating acontrol chart are straight forward, it is important forstudents to recognize that implementing SPC requiresthe understanding of the theory behind control chartsand the practical implications of that theory. We

    believe that an interactive visual tool will be muchmore effective in understanding this concept that

    relies on a knowledge of probability theory. This toolcan also be used to link theory to managerial practice.

    3. Previous WorkWhile interactive exercises in quality control haveexisted for some time (see Heineke and Meile 1995,for examples), the use of computer software inteaching is becoming more popular as studentsaccess to software and hardware increases. Many OMtextbooks now include a CD ROM with software thatcan be used to solve problems in a variety of topicsand often with graphical and simulation capabilities.

    Excel-based software is one of the more popular for-mats because of the ease of use and the availabilityof Excel. Of interest to this paper are the previousinteractive software programs that have appeared inthe fields of statistics, decision analysis, and opera-tions management as SPC and process improvementfall under these fields of study.

    The topic of SPC is generally dealt with in Oper-ations Management, Decision Analysis, and BusinessStatistics textbooks. SPC is not usually a topic coveredin general-purpose (not business-oriented) statisticstextbooks. While textbooks in these three areas coverthe basics of preparing and interpreting control charts,

    only a few (one example is Krajewski and Ritzman2002) explain aspects such as the relationship of vari-ance and control limit spread to Type I and Type IIerrors and other managerial issues. Operations Man-agement textbooks also generally explain processcapability through the index formula; however, theydo not relate the notion of process capability backto managing the process through process control.In general, the software available with textbooks inthe three categories is limited to basic plotting of pro-cess control charts.

    Advanced quality management and control text-books often deal with the more sophisticated conceptsdescribed above, but these textbooks tend not toinclude any interactive software. One text that didinclude a CD-ROM (Summers 2003) had a limitedversion of a commercial product with excellent graph-ics capabilities which allows students to generatevarious reports. However, it is not well-suited toin-class, hands-on demonstration. For example, it doesnot generate data to demonstrate in-control or out-of control points (the data set has to be created), nordoes it create two overlapping distributions in case ofa mean shift to illustrate Type II error or the magni-tude of the shift. Thus, the focus is not on the basicprinciples of SPC and its managerial implications butrather, on control chart preparation and interpretation.Another advanced quality management textbook byEvans and Lindsay (2002) includes only Excel basedcharts to plot control data.

    Statistics textbooks are also available in online orCD-ROM format. Visual Statistics 2.0 (Doane et al.2001) is an example. Again, the focus in this text is oncontrol chart plotting and interpretation rather thanon the illustration of basic principles such the inter-relationships between variation, control limit spreadand errors, and process improvement.

    The student-run website, http://www.freequality.org/, has a variety of useful software programs andquality tools aimed at professionals looking for assis-tance in solving quality and process managementproblems. These programs would not be effectivein the interactive demonstration of SPC and process

    management.A search of the Journal of Statistics Education did

    not reveal any article that described software thatdoes what we propose to do in this article. Further,a survey paper by Mills (2002) in this journal catego-rized the computer simulation methods used to teachstatistics. They included areas such as the central limittheorem, t-distribution, and confidence intervals butnone on SPC.

    Pappas et al. (1982) describe a computer-based SPCteaching tool developed and used in 1980 with their3rd year mechanical engineering students. They illus-

    trate a teaching tool called PEPEVO that generatesprocess attributes from a normal distribution as wellas either gradual or sudden shifts in the process mean.The student can then apply different process chartrules that give an out-of-control indication, such asone point outside the limit or seven successive pointson one side on the mean and so on. The user alsohas the ability to specify other parameters such as thesampling frequency and sample size. The objective isto find the testing procedure that minimizes the costof the system, including those of sampling, stopping,

    http://www.freequality.org/http://www.freequality.org/http://www.freequality.org/http://www.freequality.org/http://www.freequality.org/
  • 7/28/2019 Vba Tool for Spc

    3/14

    Balakrishnan and Oh: An Interactive VBA Tool for Teaching SPC and Process Management IssuesINFORMS Transactions on Education 5(3), pp. 1932, 2005 INFORMS 21

    and resetting the machine and the undetected defec-tives, for the set process parameters.

    The focus of PEPEVO is on the design of the sam-pling system and its implications. Its output includesrudimentary graphics in the form of control charts,

    but it does not report nearly the same level of inter-action as our software. PEPEVOs design is modular

    and it requires students have the ability to modifythe code in order to create new testing proceduresand specify processes parameters before running thesimulation to view outputs. The authors suggest thatits optimal use requires approximately 12 hours ofclassroom time. The level of technical skill and timerequired to implement PEPEVO would preclude thistool from use in most introductory Operations Man-agement courses.

    In summary, it appears that while software-basedSPC teaching tools exist, the focus has generally beenon plotting and interpreting control charts. Our focus

    is unique in that we aim to link control chart issueswith their managerial implications. Through this tool,we hope students will attain a better understandingof issues such as:

    How does increasing the z-value impact thefrequency of unnecessary process stoppages or theamount of time out-of-control processes remainundetected?

    How does focusing on training employees andbetter equipment improve the control of the process?

    What is the difference between a control limitand a specification limit?We believe that the advantage of our software is that

    these and other SPC managerial issues can be inves-tigated using a single, interactive teaching tool that issimple enough for students to use on their own, or asa guided classroom activity.

    4. LearningAn effective teaching tool will help transform busi-ness questions into a theoretical framework and thenlink that theory back into practice. For example, con-sider the question: Why does the Type II error decreasewith greater shifts in the process mean? With the clickof a button using this VBA tool, students can see

    that the overlap between the distributions decreases,thus understanding why there is a decreased prob-ability that a sample reading from one distributionwill be mistakenly assumed to be from the other. Thisis the theory, how do we link it to practice? Going

    back a step, one might ask, why is discussing thevalue of the shift in the mean important? Consider acall centre manager who wants to control the meantime that a customer is put on hold. For such amanager, small shifts in the mean and the associatedhigh Type II error may be inconsequential. However,

    a large shift in the mean implies that customer servicehas dropped considerably and thus, the magnitude ofthe Type II error becomes an important considerationwhen making process control decisions.

    Similarly, the tool can be used to emphasize themanagerial tradeoffs that exist in process control andprocess capability. Graphically, is it is easy to see that

    increasing the sample size results in less distribu-tion spread. Thus the overlap between the samplingdistributions is decreased and detecting shifts in theprocess becomes easier. This strategy however wouldincrease sampling time and costs, and would have no

    beneficial effect on process capability. Alternatively,a reduction in process variance will also increase theability to detect shifts in the process while at the sametime, improve process capability. Through manipula-tion of process variables, students will appreciate thepositive managerial implications of reduced varianceand recognize for themselves how it may be a lessexpensive long-term option than increased sampling.In practice, reduced variance implies more consis-tency in the process (process improvement) achievedthrough employee training, less system breakdowns,fewer mistakes that need to be fixed, advanced tech-nology and the like. This links the theory to practice.Within the JIT context, you have reduced waste andvariance.

    Consider our call centre manager who wants toensure that no customer waits more than a certaintime. With a graphical tool presenting the process dis-tribution and the waiting time specification limit, itcan easily be demonstrated that for a given mean,

    higher variance/process inconsistency increases theprobability of violating this waiting time limit. Toensure that performance goals are met, the processmanager could lower the mean waiting time by hiringextra staff, resulting in waste through lower staff uti-lization. The graphics can also be used to discuss a

    better option, namely the concept of Six Sigma andhow a Six Sigma process is less wasteful and less vul-nerable to small changes in process mean.

    Thus, we believe that in addition to being a simplequality control teaching tool, the interactive VBA toolalso allows the instructor to discuss more general pro-cess management principles. Managing processes and

    their improvement straddles different functional areassuch as human resources (employee training), infor-mation systems (technology), and accounting (audit).Given that this tool can foster a discussion of processmanagement issues over a wide spectrum of func-tional areas, its greatest contribution may be madewith a more mature audience. We see it as beingmost effective at the MBA level (it has been tried atthe Executive MBA level with good results) or in anelective class on quality management. At the intro-ductory undergraduate level, students may find this

  • 7/28/2019 Vba Tool for Spc

    4/14

    Balakrishnan and Oh: An Interactive VBA Tool for Teaching SPC and Process Management Issues22 INFORMS Transactions on Education 5(3), pp. 1932, 2005 INFORMS

    a useful tool for them to grasp the more abstract con-cepts of process distribution versus distribution ofsample means, Type I versus Type II error, and pro-cess capability.

    This tool can be used after the concepts of varia-tion and control limits are introduced. An exercise todemonstrate the concept of variation (the coin-and-

    tube exercise) can be found in Heineke and Meile(1995). The proposed hands-on activity also assumesa basic understanding of probability distributionsand sampling. The interface of the VBA tool inviteshands-on exploration of the concepts; its use would

    be best suited to a lab or classroom with enough com-puters so that the students can experiment along withthe instructor.

    5. Using the ToolExhibit 1 is a screen print of what the user seesupon opening the VBA spreadsheet. The software

    allows the user to specify a situation requiring pro-cess control. The example shown is from a call centrewhere the average time a customer is put on hold ismeasured, but any process parameter may be used

    by changing the value in the process parameter textbox. The screen allows the user to specify two setsof process parameters (both normally distributed forsimplicity) through the and . The software graphsthe distributions automatically. The process, as it wasdesigned and set up, is called the Planned Process.The second distribution, called the Current Process,represents the process as it is actually working. Ifthe process is working as planned (in control), the

    Planned Process and the Current Process are shown tobe identical (same and ). The TAB key is used tomove between controls as is the ENTER key. Exhibit 2is a screen print of the Process Control Sheet andExhibit 3 is used for Process Capability issues. Thetitle in Exhibit 1 and Exhibit 2 will state Distribu-tion of Individual Observations or Distribution ofSample Means depending on whether the samplesize is 1 or greater.

    Exhibit 1 Process Parameter Sheet

    Exhibit 4 Annotated Student Lab Manual

    Set n= 1, z= 1. Click the Generate Sample button. This generates asample and calculates the sample mean. Since the sample size is 1,the mean is just the individual value. This value is shown on the

    bottom right of the chart and it is represented as a green dot ifwithin the UCL and LCL and as a red square if outside the UCLand LCL. (Note A sample size of one would usually not be used for SPCin practice, but required for the purpose of this demonstration).

    Click it a few more times until you get a red square. In practice,if you were managing this process what would you do when youget a red square?

    You would stop the process to investigate the cause of a samplemean outside the UCL/LCL.

    Does the call on hold violate company guidelines (defective)?

    Probably not a red square is displayed if the generated valueexceeds 11.5, while it would need to exceed 15 minutes in order to

    be defective

    The tool actually consists of three parts: this doc-ument for the instructor, a Student Lab Manual forstudents to work through, and the software. Theinstructor document explains the software and theconcepts that can be taught through its use. It isexpected that the instructor would be projecting thesoftware image on a screen in the classroom. The Stu-dent Lab Manual (Exhibit 4 shows a part of theannotated instructor version) is a detailed step-by-step series of exercises that the students can followthrough with the instructor, with space for them totake notes about the results of each exercise and classdiscussion. The manual and the software may beposted on websites so that students can downloadand work through them outside the classroom, if nec-

    essary. The instructor version of Student Lab Manualhas also been prepared where the space for studentnotes has been filled in with expected results andsuggested discussion (shown in bold in Exhibit 4).Since all the documents accompanying the softwareare in MS Word, they can easily be modified shouldthe instructor choose another example (rather than

    Exhibit 2 Process Control Sheet

  • 7/28/2019 Vba Tool for Spc

    5/14

    Balakrishnan and Oh: An Interactive VBA Tool for Teaching SPC and Process Management IssuesINFORMS Transactions on Education 5(3), pp. 1932, 2005 INFORMS 23

    Exhibit 3 Process Specification (Capability) Sheet

    the call centre) to discuss the process managementconcepts.

    5.1. Process Control IssuesAfter clicking on the control tab, the z dropdownlistbox in Exhibit 2 is used to set z to 1, 2, or 3. TheLower Control Limit (LCL) and Upper Control Limit(UCL) vertical lines are automatically generated andshown in orange. Sample size n may be specifiedin the given textbox and defaults to 1 if contents arenon-numeric or non-positive. If the n is 1, the softwareuses Distribution of Individual Observations as thescreen title whereas if n is greater that 1, the titleDistribution of Sample Means is used. This servesto emphasize that SPC generally uses the samplingdistribution. The Generate Sample from Current Pro-cess button is used to generate a sample mean fromthe current process. If the value generated (displayedon bottom right of chart) is within the LCL andUCL, a green dot is correctly placed along the hor-izontal axis, indicating an in-control reading. If thevalue generated is outside these limits, a red squareis placed, indicating an out-of-control reading. Thetotal number of values generated and the numberof these values outside the limits are tallied in thetotal and out textboxes respectively. By clickingthe Generate Sample from Current Process buttonand then keeping the Enter key pressed down, up

    to one hundred samples can be generated. This pro-cess can also be rapidly simulated by pressing theGenerate 100 Samples button. The Reset buttonclears tallies to re-start the sampling process.

    5.1.1. False Out-of-Control Indication (a orType I Error). Assuming that the process is in con-trol, a false out-of-control indication occurs when thesample mean falls outside of the control limits (indi-cated by the red square). It can be seen that this willoccur about 33% of the time when z = 1. Changingz to 2 and then 3 will clearly show that we can reduce

    the Type I error by increasing z. Students can be askedto repeat the process with various values ofn to con-firm that larger samples will not help to lower thefalse out-of-control indication. Thus, adjusting z is theonly way to reduce the frequency of Type I errors.

    5.1.2. False In-Control Indication (b or Type II

    Error). A false in-control indication occurs when theCurrent Process is no longer the same as the PlannedProcess, but the sample indicates that the processis still working as planned. To demonstrate this, setn= 10, z = 3 and make a minor change in for theCurrent Process. With the process now out-of-control,the sampling would correctly indicate this with a redsquare, representing the mean, falling outside of thecontrol limits. It can be seen that since the Plannedand Current distributions overlap considerably, mostreadings will fall within the control limits, resulting ingreen dots (now a false in-control indicator). In fact,with z= 3, running a simulation of 100 samples willshow that the error rate is almost 100%.

    The next step would be to discuss how this errormay be controlled. The VBA teaching tool can demon-strate it in three ways:

    1. Reduce z. This will lower the probability of falsein-control. However this will also increase the proba-

    bility of a false out-of-control (Type I error).2. Increase sample size, n. Since increased n reduces

    sample variance, students will note the narrowing ofthe distributions and the resulting decrease in theoverlap between the Current and Planned distribu-tions. The control limits will also narrow as a resultand the probability of a false in-control indication

    will decrease. Since n has no effect on false out-of-control (Type I error), this is a good option. How-ever, it comes at the cost of increased sampling andas mentioned previously, has no benefit with respectto process capability.

    3. Only be concerned about larger shifts in the mean . Bymaking the Current Process mean significantly differ-ently from the Planned Process mean, it can be shownthat the probability of a false in-control depends onhow much out-of-control the process actually is.A combined strategy using the latter two approachescan also be presenteddetermine how much of a shift(given the particular example) is enough to cause con-cern and then choose a sufficiently large sample toreduce the probability of a false in-control readingto an acceptable level. What if the resulting n is toolarge? The next section answers this.

    5.1.3. Reduced Process Variability. The role ofreduced variability in improved process control can

    be demonstrated using the same settings describedin the previous section. With the process out-of-control, the can be reduced for both the Plannedand Current Process, preferably with an explanation

  • 7/28/2019 Vba Tool for Spc

    6/14

    Balakrishnan and Oh: An Interactive VBA Tool for Teaching SPC and Process Management Issues24 INFORMS Transactions on Education 5(3), pp. 1932, 2005 INFORMS

    about achieving lower through better training, moreadvanced technology, better management, and thelike. If one used the coin-and-tube game previouslymentioned, one could relate back to this by asking thestudents to think about how variability could have

    been reduced, perhaps by using a narrower tube orplacing the tube much closer to the target. Students

    will observe that the two resulting distributions willoverlap less and as a result, the probability of the falsein-control decreases. Thus, a reduction in variabilityhas the same positive effect on Type II error withoutthe ongoing cost of more sizeable sampling.

    It is probably during the discussion of the effectsof z on the probability of a Type I or Type II errorthat the instructor can help students avoid a commonmisconception. We have often found that when stu-dents are asked during exams about the choice of z,they often erroneously state use z= 3 instead ofz= 2

    because it implies better quality control since moresample means will fall within the limits. It is ourhope that through hands-on experimentation, moststudents will avoid this mistake.

    5.2. Process CapabilityThe issue of process capability can be explained byusing the Specification sheet (Exhibit 3) where thecontrol limits are not shown and n defaults to 1,

    because process capability is by definition based onindividual units. From a customers perspective, itis the possibility of receiving a defective good orservice. The , , and specification limits can be set byentering appropriate values on the process parameter

    and specification sheets. While generating units of theproduct or service, a green dot would indicate a goodunit, whereas a red square would denote a defectiveunit. Initially, , the Upper Specification Limit (USL)and the Lower Specification Limit (LSL) can be setsuch that process capability is low, for example where15% of the units are defective. By simulating 100 unitsor observations, students will observe a large propor-tion of the units will fall outside the USL/LSL. Sucha process with high defectives is not generally viablein practice.

    Students will also be able to graphically see the neg-ative effect of shifts in the process mean on process

    capability. As seen in the Process Specification sheet(Exhibit 3), the distribution displayed can be set to theCurrent Process using the Planned Process/CurrentProcess toggle button. For a given USL/LSL, a shiftin the Current Process mean results in the distribu-tion graphically moving closer to the USL or LSLand more units falling outside one of the specificationlimits.

    One method of reducing the defect rate would beto move the LSL/USL farther away from the mean.Students will quickly point out that this does not

    really solve the problem as it implies lower qualitystandards. Assuming that the customer is not willingto accept lower quality, how can the situation beimproved?

    5.2.1. Reduced Process Variability, Revisited.The effect of reduced variability on the defect rate can

    be demonstrated by going to the process parametersheet and reducing so that the specification limitsare close to 3 standard deviations away from the pro-cess mean. A few 100-unit simulations will show thatless than 1% of units will be defective since almost theentire distribution falls within the USL/LSL. It should

    be noted that this solution is superior; specificationlimits have not been changed (implying the samelevel of quality). Also in many cases, the customer orregulatory bodies determine specifications limits andthus these cannot be allowed to deteriorate.

    By reducing the further to make the USL/LSL6 away from the mean, the concept of Six Sigmacan be explained by showing that the USL= 6.One could run a few 100-unit simulations to showthat there is virtually no chance of a defective product(even with minor shifts in the mean). It might beuseful to point out two aspects of Six Sigma aspracticed by organizations. The term Six Sigma asoriginally coined by Motorola has a slightly differentstatistical interpretation than 6 as it allows for 15shifts in the mean before calculating the probability ofan error, which results in 3.4 defects per million. Sec-ondly, it is important to emphasize that Six Sigma inorganizations is a process improvement philosophy ofwhich statistical methods are just one aspect (Chase

    et al. 2004 is an introductory Operations Managementtext has a detailed section on Six Sigma methodology).To quote former GE CEO Jack Welch (2001), The bigmyth is that Six Sigma is about quality control andstatistics. It is thatbut its much more. Ultimately, itdrives leadership to be better by providing tools tothink through tough issues.

    5.3. Differentiating Between USL/LSL andUCL/LCL

    This tool also helps to differentiate between theUSL/LSL and UCL/LCL, which is often confusingto students. On the control limits screen, if the n

    is set to 1, the distribution shown is for individualobservations and the option to show the USL/LSL (in

    blue) on the same graph becomes available. Settingn> 1 results in the removal of the specification limits,demonstrating that they are not relevant when sampleaverages are plotted. A discussion of the differences

    between the two types of limits (control versus speci-fication) as well as the effect of customer requirementson USL/LSL would be appropriate at this time.

    To demonstrate the differences, start with a processthat is in control (Current Process and to be the

  • 7/28/2019 Vba Tool for Spc

    7/14

    Balakrishnan and Oh: An Interactive VBA Tool for Teaching SPC and Process Management IssuesINFORMS Transactions on Education 5(3), pp. 1932, 2005 INFORMS 25

    same as that of the Planned Process) set z= 3, n= 1,and on the specification screen, adjust the specifica-tion limits so that they are approximately 1 fromthe mean. The instructor should point out that a sam-

    ple size of one would NOT typically be used for SPCin practice, but is required for the purpose of thisdemonstration only. Returning to the control limits

    screen and selecting show specification limits, onecan demonstrate how an individual measure can fallwithin control limits, but still not meet specifications(is defective) since the UCL is outside the USL. Nat-urally, this situation is not desirable in practice, as itwill result in defective products left undetected.

    A highly desirable system is one in which the SPCmechanism detects an out of control process long

    before defectives, as designated by the specificationlimits, are produced. How can this achieved? This isa good place to reemphasize the attractiveness of SixSigma. Through process improvement, assume thatthe has been reduced enough such that the USL is6 away from the target. When the show specifica-tion limits is selected in the Control sheet, the USLwill fall outside the UCL, which is desirable. To showwhy this is desirable, shift the current process meanslightly away from the planned process mean. Whensamples n= 1 are generated, indications to stop andcorrect the process (red squares) should occur beforeactual defective products are observed, i.e., a warn-ing system. Under a Six Sigma Quality system, it isuncommon for moderate shifts in the mean to resultin defective product, and furthermore, these shiftsshould trigger the SPC mechanism to detect and ini-tiate measures to correct the process.

    It can also be demonstrated that control limits areautomatically adjusted when one or more of z, n, ,or are changed, while specification limits are exter-nally set and thus are not affected by the processparameters. Students should be asked how the specifi-cation limits would be setin our call centre example,it may be set by management beliefs based on cus-tomer preferences. Students will then be able to moreclearly see differences between the two types of limitsand how each are quite independent of one another.In summary, the UCL/LCL is used to manage the pro-cess while the USL/LSL is used to determine whether

    the product is defective or nottwo separate issues.

    6. ConclusionsWe have presented an Excel VBA tool that can beused to enhance students understanding of manage-rial issues in Statistical Process Control (SPC), processvariability and Six Sigma. We believe that its ease ofuse, combined with its graphical interface, make it aneffective classroom teaching tool.

    The development of the software and manual hasbeen iterative over the past few years and has been

    based on student and instructor feedback. Colleagueswho have used all or part of the SPC tool have feltthat it was effective in improving instruction.

    AcknowledgmentsThe authors wish to thank their colleague JaniceBodnarchuk Eliasson, Tom Grossman of the University of

    San Francisco, the anonymous reviewers, and the AssociateEditor for their valuable comments on this article. Financialsupport was provided by the Natural Sciences and Engi-neering Research Council (NSERC) of Canada.

    References

    Chase, R. B., F. R. Jacobs, N. J. Aquilano. 2004. Operations Manage-ment for Competitive Advantage. McGraw Hill, New York.

    Doane, D., K. Mathieson, R. Tracy. 2001. Visual Statistics 2.0.McGraw Hill, New York.

    Evans, J. R., W. M. Lindsay. 2002. The Management and Control ofQuality. Southwestern, Cincinnati.

    Heineke, J. H., L. C. Meile. 1995. Games and Exercise for Operations

    Management. Prentice Hall, Englewood Cliffs, NJ.Krajewski, L. J., L. P. Ritzman. 2002. Operations Management: Strategy

    and Analysis. Prentice Hall, Upper Saddle River, NJ.

    Mills, J. D. 2002. Using computer simulation methods to teachstatistics. J. Statist. Ed. 10(1).

    Pappas, I. A., K. Maniatopoulos, S. Protosigelos, A. Vakalapoulos.1982. A tool for teaching Monte-Carlo simulation withoutreally meaning it. Eur. J. Oper. Res. 11(2) 217211.

    Summers, D. C. S. 2003. Quality. Prentice Hall, Upper SaddleRiver, NJ.

    Welch, J. 2001. Straight from the Gut. Warner Business Books,New York, 330.

    LAB MANUAL http://archive.ite.journal.informs.org/Vol5No3/BalakrishnanOh/lab_manual_nov05_instr.doc

    An Interactive VBA Tool for TeachingStatistical Process Control (SPC) IssuesThe following are the concepts covered in thisexercise:

    1. Process capability.2. The role of reduced variation in ensuring better

    process capability.3. Upper Specification Limit (USL) and Lower

    Specification Limit (LSL) and differentiating thesefrom Upper Control Limit (UCL) and Lower ControlLimit (LCL).

    4. False out of control and false in controlindications.

    5. The role of z in the Type I and II error.6. The role of sample size in Type I and II error.7. The role of reduced variability on improved pro-

    cess control.

    http://archive.ite.journal.informs.org/Vol5No3/BalakrishnanOh/lab_manual_nov05_instr.dochttp://archive.ite.journal.informs.org/Vol5No3/BalakrishnanOh/lab_manual_nov05_instr.dochttp://archive.ite.journal.informs.org/Vol5No3/BalakrishnanOh/lab_manual_nov05_instr.dochttp://archive.ite.journal.informs.org/Vol5No3/BalakrishnanOh/lab_manual_nov05_instr.dochttp://archive.ite.journal.informs.org/Vol5No3/BalakrishnanOh/lab_manual_nov05_instr.dochttp://archive.ite.journal.informs.org/Vol5No3/BalakrishnanOh/lab_manual_nov05_instr.dochttp://archive.ite.journal.informs.org/Vol5No3/BalakrishnanOh/lab_manual_nov05_instr.dochttp://archive.ite.journal.informs.org/Vol5No3/BalakrishnanOh/lab_manual_nov05_instr.doc
  • 7/28/2019 Vba Tool for Spc

    8/14

  • 7/28/2019 Vba Tool for Spc

    9/14

    Balakrishnan and Oh: An Interactive VBA Tool for Teaching SPC and Process Management IssuesINFORMS Transactions on Education 5(3), pp. 1932, 2005 INFORMS 27

    is a red square, it indicates that the caller was put onhold for more than the USL, i.e. a violation of the callcenter guidelines;a defective service!

    In the Spec sheet, the Simulation Stats display givesthe number of total calls and the number of defec-tive calls (in red). In the Control sheet, the Simula-tion Stat buttons gives the number of total samples

    taken and the number of sample means (in red) out-side the LCL and UCL. On either sheet, you alsohave the option of generating 100 samples or observa-tions to see the statistics displayed instantly. The titlein Exhibit 1 and Exhibit 2 will state Distribution ofIndividual Observations or Distribution of SampleMeans depending on whether the sample size is 1 orgreater.

    Note:1. Hit Tab or Enter after any changes in values to

    ensure that it is recognized2. After finishing a sampling experiment, use the

    Simulation Stat Reset button before proceeding.

    2. Process CapabilityConsider the following example. You are in chargeof a call center for the Internet division of a major

    bank. Historically, the mean time ( that a caller hasbeen placed on hold is 10 minutes and the standarddeviation ( has been 5 minutes. Top managementdictates that all calls have to be fielded within 15 min-utes, (i.e., cannot be put on hold for longer that that).This is your USL. Your call center would be consid-ered capable if there was very little chance of a callexceeding this time. Now consider whether the fol-

    lowing cases are capable:

    Case IIs the call center currently capable? To answer this,in the Process sheet set the Planned Process to 10minutes and to 5. Select the Process in Control but-ton to ensure that the process is in control. Only onenormal distribution will be seen. As the variability isfairly high relative to the mean, the distribution will

    be truncated on the left-hand side, and any simu-lated calls with negative call times will be counted ashaving a wait time equal to zero.

    In the Spec sheet, increase the specification limit to

    +/ 50%. For a of 10, it means that the USL is 50%greater (15 minutes). Since management considersonly long waits as defective, click the two-sidedtoggle button to switch to a one-sided test. This willmake it correspond to the call center example. Nowclick the Generate Single Observation button to gener-ate a normally distributed call on hold time alongthe x-axis of the graph. If the marker is a green dot,it means that that the caller was on hold for a timeless than the USL of 15 minutes. If it is a red square,it indicates that the caller was put on hold for more

    than the USL of 15 minutes, i.e. a violation of the callcenter guidelinesa defective service!

    Click Run 100 iterations to generate 100 calls. Basedon the results displayed in the Simulation Stat box,how many calls took more than 15 minutes toanswer?

    Approximately 16%

    This can also be calculated mathematically usingthe properties of the normal distribution. For a given and , the z value corresponding to the probabilitythat a value greater than X will be generated is given

    by Equation (1).

    z= X

    (1)

    Therefore, if X= 15, = 10 minutes, and = 5 min-utes, what is the value of z?

    z= X

    = 15 105

    = 1 z= 1

    Given thisz, using a normal distribution table, whatis the probability that X > 15?

    Pr(X > 1.0) = 1 08413 @ 16%. This value shouldbe approximately the same as that obtained throughsimulating the 100 calls.

    Is this likely acceptable (i.e. is the call centrecapable)?

    No, with 16% of calls exceeding the USL, probablynot.

    The value of z indicates how many s the spec-ification limit (maximum allowed wait) is from theprocess mean, . We refer to this as the level of theprocess and it is shown near the USL on the chart dis-

    played with the Spec sheet (Exhibit 3). The higher the level, the less likely that we will get an observationoutside the limit.

    What is the level of this process?

    Case IIReduced VariabilityAssume that the mean on hold time is still 10 min-utes, but by installing more user friendly softwareand better employee training, the variation in the timerequired to help customers is reduced. Thus the onhold standard deviation has also been reduced. Thenew is 1.5 minutes. With these improvements, theprocess is now more consistent, but is the process now

    more capable?To answer this, set the of the Planned Process in

    the Process sheet to 1.5 minutes and switching to theSpec sheet, observe the USL. Is there any change inthe area of the curve that is above the specificationlimit compared to Case I? (You may need to switch

    back to = 5 to verify) What does this imply for thelikelihood of a defective product?

    When less of the process distribution curve is abovethe USL it implies that there is a lower probability ofdefectives.

  • 7/28/2019 Vba Tool for Spc

    10/14

    Balakrishnan and Oh: An Interactive VBA Tool for Teaching SPC and Process Management Issues28 INFORMS Transactions on Education 5(3), pp. 1932, 2005 INFORMS

    Tables of the Normal Distribution

    Click Run 100 iterations in the Spec sheet to gener-

    ate 100 calls. Based on the results displayed in theSimulation Stat box, how many calls took more than15 minutes to answer?

    Close to 0%.Calculate the probability of defects mathemati-

    cally using Equation (1) and the Normal Distributiontable given below. What is the level? Is the processmore capable?

    Case IIIShift in the MeanFor some reason, the mean on hold time hasrecently risen to 13 minutes. The is still 1.5 minutes.

    Is the process still capable? To answer this, in the Pro-cess sheet, unselect the Process in Control button andchange ofCurrent Process to 13. This means that theprocess has shifted and people on average are put onhold for 13 minutes (though as a manager, you maynot detect this until you take a sample).

    Observe in the Spec sheet the new distribution with= 13. Make sure that you are viewing the currentprocess by clicking on the process toggle button sothat it displays the current processWould you expectmore defects when compared to Case II? Why?

    Yes. There is a significant portion of the distribution

    curve above 15 minutes.Click Run 100 iterations to generate 100 calls from

    the Current process distribution. What is the defectiverate?

    Close to 10%.Calculate the probability of defects mathemati-

    cally using Equation (1). What is the level? Is theprocess capable?

    Case IVYou have instituted process improvement measuressuch that the mean on hold time is back to 10 min-

    utes and the has been reduced to 0.8 minutes. Isthe planned process capable? To answer this, in theCurrent Process in the Process sheet, change the backto 10 and to 0.8, and select the Process in Control

    button. This implies that the process is very consis-tent. Click Process in Control and return to the SpecSheet to view the planned process distribution.

    Would you expect more or less defects when com-pared to Cases I, II, and III? Why?

    Fewer. There is hardly any portion of the distribu-tion above 15 minutes.

  • 7/28/2019 Vba Tool for Spc

    11/14

    Balakrishnan and Oh: An Interactive VBA Tool for Teaching SPC and Process Management IssuesINFORMS Transactions on Education 5(3), pp. 1932, 2005 INFORMS 29

    Click Run 100 iterations to generate 100 calls fromthe Planned process distribution. What is the defectiverate?

    Should be 0%.Calculate the probability of defects mathemati-

    cally using Equation (1). What is the level? Is theprocess capable?

    z= X

    = 15 1008

    = 625

    level= Pr(X > 625 < 9866 1010 soYES, the process is very capable.What does 6 imply for process accuracy and

    capability?6 implies that the process is very accurate and

    i.e, most people are put on hold for about 10 min-utes with very little variation. Thus hardly, hardly,hardly anybody will be on hold for more that 15 min-utes. Students can be asked to change the mean to11 minutes and examine the defective rate. It will still

    be zero, thus showing that with a Six Sigma process,slight shifts in the mean will not cause defectives.

    Note:6 is similar in concept but not the same as Six

    Sigma. The term Six Sigma as originally coined byMotorola has a slightly different statistical interpre-tation as it allows for 1.5 shifts in the mean beforecalculating the probability of an error which resultsin 3.4 defects per million. Secondly, it is important toemphasize that Six Sigma in organizations is a processimprovement philosophy of which statistical methodsare just one aspect. To quote former GE CEO JackWelch (2001), The big myth is that Six Sigma is aboutquality control and statistics. It is thatbut its muchmore. Ultimately, it drives leadership to be better byproviding tools to think through tough issues.

    3. Difference Between USL/LSL andUCL/LCL

    In the Process sheet, set = 10 minutes and= 15 minutes for the Planned Process and select the

    Process in Control button. This means that process isworking as it should. In the Spec sheet, ensure thatUSL/LSL is at 50%. In the Control sheet, set z to 1,sample size n = 1 and select the Show SpecificationLimits button. Note that the USL and LSL (in blue)are seen and are different from the UCL and LCL(in orange). The software is calculating the UCL/LCLfrom the SPC formulae for variables (shown belowin Equations (2) and (3)) while the USL is companypolicy.

    UCL =+ z

    n

    (2)

    LCL= z

    n

    (3)

    Click z = 2. What happens to UCL/LCL in termsof spread?As z increases, the control limits widen.

    What happens to USL/LSL?Nothing, the specifications limits do not change.What is the significance?The UCL/LCL can be controlled by z while

    USL/LSL is externally set (company policy, govern-ment safety, or consumer regulations etc).

    Set z back to 1 and increase sample size n to 5.What happens to the spread of UCL/LCL as the

    sample size increases?The spread between LCL & UCL narrows.What happens to the specification USL/LSL?

    Why?The specification limits disappear and the show

    specification limits button becomes grey becauseprocess capability is based only on individual values.It is also externally set (company policy, governmentsafety, or consumer regulations etc). So just as in thecase ofz, the UCL/LCL can be controlled by samplesize.

    Set n = 1, z = 1. Click the Generate Sample button.This generates a sample and calculates the samplemean. It also plots this mean along the x-axis of the

  • 7/28/2019 Vba Tool for Spc

    12/14

    Balakrishnan and Oh: An Interactive VBA Tool for Teaching SPC and Process Management Issues30 INFORMS Transactions on Education 5(3), pp. 1932, 2005 INFORMS

    graph. It is represented as a green dot if within theUCL and LCL and as a red square if outside the UCLand LCL. The calculated mean value is shown on the

    bottom right of the chart (Exhibit 2). Since the sam-ple size is 1, the mean is just the individual value.(Note A sample size of one would usually not be used

    for SPC in practice, but required for the purpose of thisdemonstration).

    Click it a few more times till you get a red square.In practice, if you were managing this process whatwould you do when you get a red square?

    You would stop the process to investigate the causeof a sample mean outside the UCL/LCL.

    Does the call on hold violate company guidelinesif the red square was above the UCL? In other wordsis the generated on hold time a defect?

    Probably not a red square is displayed if the gen-erated value exceeds 11.5, while it would need toexceed 15 minutes in order to be defective

    Now, in the Control sheet, set z= 3, n= 1. In the Specsheet, adjust the specification limits so that they areapproximately 1 from the mean (corresponding to16% in the Spec Limits). After returning to the Controlsheet, click the Generate Sample button till you get agreen dot that is above the USL but below the UCL.

    What does this indicate? Is this a desirablesituation?

    An individual reading can fall within control limits,but still not meet specifications (is defective) since theUCL is outside the USL. Naturally, this is a situationthat is NOT desirable in practice as it will result indefectives being undetected.

    On the other hand, it is desirable is to have a systemwhere even when the process is out of control, defec-tives will not be produced before the SPC mechanismdetects it. To illustrate the desired system, in the Pro-cess sheet, unselect the Process in Control button, set of the Planned Process to 10 minutes and of the Cur-rent Process to 11 minutes. Set of both processes to0.6 minute. In the Spec sheet, change USL to 50%. Inthe Spec Sheet, what level is this?

    8.3In the Control sheet, select the Show Specification

    Limits button. Click the Generate Sample button until

    you get a red square. You would naturally stop theprocess to investigate. How many clicks did youneed to get a red square? Is sample defective?

    The UCL is 11.8, 3 away from the planned pro-cess mean. The current process mean is 11, only 1.33away from the calculated UCL. This corresponds tothe situation in case III, where approximately 9% ofthe samples indicate an out of control process andon average, 11 clicks will be required to generate ared square. In this case though, the sample is NOTdefective as samples fall well below the USL.

    What is the probability that calls will bedefective?

    Practically 0 as it is a 6 (similar to a Six Sigma)process.

    Why is this a desirable situation?The USL is much farther out than the UCL. When

    the process mean has shifted to 11 minutes, your SPC

    limits will detect it soon. Better yet, hardly any callviolates the 15 minute limit. So the process will befixed when needed and no defectives will be pro-duced. This shows the attractiveness of 6 (similar toSix Sigma)rarely producing a defect while helpingthe SPC mechanism detect shifts in the mean.

    How does this demonstrate differences betweenControl and Specification Limits?

    4. Managerial Issues in ProcessControl

    The Effect of z on Type I /Type II ErrorA Type I error occurs when the process is in control

    but the sample indicates that the process is out ofcontrol. A Type II error occurs when the sample indi-cates that the process is still in control while it fact itis no longer in control. For this example, we want tostart with a process that is operating as planned. Inthe Process sheet, set = 10 minutes and = 5 min-utes for the Planned Process and select the Process inControl box. In practice, SPC uses the statistics fromsamples (n> 1) gathered to evaluated the process andin this example, we will assume a sample size of fourcalls. In the Control sheet, set z

    =1, n

    =4 and unselect

    the Show Specification Limits, if necessary. Rememberthat the process is working as it should and the cor-rect managerial decision is to NOT stop the process.When samples are generated, green dots are the cor-rect indicators while the red squares incorrectly indi-cate that the process is out of control. You can try thisout by generating a few samples using the GenerateSample button.

    Now generate 100 samples. The number in redin the Simulation Stats box indicates the number oftimes the sample mean would have fallen outside theLCL/UCL. Each time this happens we would have

    stopped the process in ERROR (Type I error)What is the approximate error rate (Type I) and is

    it acceptable?33%. Naturally, this would not be acceptable

    because you would frequently investigate problemsthat did not exist. The cost is wasted time andresources.

    Now set z= 2 and generate 100 samples. Note theType I error compared to z= 1.

    Set z= 3 and generate another 100 samples. Whatis the effect of z on Type I error?

  • 7/28/2019 Vba Tool for Spc

    13/14

    Balakrishnan and Oh: An Interactive VBA Tool for Teaching SPC and Process Management IssuesINFORMS Transactions on Education 5(3), pp. 1932, 2005 INFORMS 31

    When z = 2, approximately 5% of the values willfall outside the control limits. When z= 3, no (or per-haps 1) Type I errors occur. Larger z values reduce theprobability of a Type I error.

    Next we examine the Type II error. In the Pro-cess sheet, unselect the Process in Control button andchange of the Current Process to 11. Note that the

    process is now out of control and now you have twodistributions: one is the planned process and the otherthe current, shifted process. Assume that we do notknow it has shifted and will be relying on samples todecide whether it is in or out of control. This is the sit-uation that process managers face when determiningwhether or not the process is in control. You can trythis out by generating a few samples using the Gen-erate Sample button.

    In the Control sheet, with z= 3 and n= 4, generate100 samples. Note that now a red square is the correctindicator, i.e, we should be stopping the process. Thegreen dot is actually a Type II error. How often (%)

    does a Type II error occur?Usually 100%.Repeat for z = 2 and z=1. Compare the Type II

    errors. Which is better? Why?The error rate is much higher for z= 3, so smaller

    z values are better from a Type II error perspec-tive. Since the distributions overlap very much, z= 3covers both distributions and all points fall within theLCL/UCL, thus incorrectly indicating that the processis in control. With z = 1, many points fall outside asit covers less of the distribution, correctly indicatinga shift in the mean.

    What is the dilemma that you observe with

    respect to Type I and Type II error and the valueof z?

    Increasing z to improve Type I error will result ina higher Type II error and vice versa. In other wordsz= 3 DOES NOT mean that our quality control is bet-ter than when z= 1.

    Given that many companies choose to use z=3,there are generally two different methods to reducethe possibility of a Type II error and ensure the accu-racy of the monitoring:

    Method A: Use a larger sample size by changingn = 100. Set z = 3 and generate 100 samples. Whathappens to the sampling distribution?

    The distribution spread decreases.Has the error probability decreased? How do

    larger samples help?Yes. Larger samples will reduce the spread in the

    sampling distributions as shown in the Control sheet.As a result, when the process mean shifts, there isless overlap between the two distributions (plannedvs. current). With less overlap, there is a higherprobability that the samples from the shifted distribu-tion will fall outside the limits based on the plannedprocess, reducing the probability of a Type II error.

    What is the disadvantage of larger samples?Larger samples will cost more money to implement,

    especially if destructive testing is required. So what isanother approach?

    Method B: Set n back to 4. In the Process sheet,for both processes set = 05 minute. This indicatesless variability through better equipment, training of

    employees and so on. In the Control sheet, generate100 samples. What is the Type II error probability?What is the overlap between distributions?

    Low error rate (about 13 to 20%) and low overlapbetween distributions

    How do both of these methods help to reduceType II error?

    As with larger samples, lower process variancereduces the spread in the sampling distributions.When the process mean shifts, there is less overlap

    between the two distributions, resulting in a higherprobability that the samples from the shifted distribu-tion will fall outside the LCL/UCL. This CORRECTLYindicates an out of control process and results in man-agement stopping the process and taking correctiveaction.

    Both of these methods to reduce Type II error willcost moneywhich is better?

    Although reducing variability costs money initially,over the long term it is better to have a more accurateprocess than to spend more money indefinitely withlarger samples to achieve the same low error rate.

    No matter how accurate the process, there is alwaysa trade-off between Type I and Type II error. The issueof how low the error rates should be is a managerial

    decision based on the costs of allowing the error tocontinue versus the costs to detect it.

    Other Information from Control ChartsIn the Process sheet, set of the Planned Process to10 minutes, set of the Current Process to 11 minutes,of both to 1.5 minutes. In the Control sheet, set n= 4,and z= 3. Reset the Simulation Statistics and generatetwelve samples from the current process. After gen-erating each sample, roughly plot the sample mean(as displayed in the bottom right corner of graph inExhibit 2) in Exhibit 4 below.

    Are the plotted points randomly scattered above

    and below the planned process mean of 10?No, they are predominantly above the meanWhat does this imply for managers looking for an

    indication of an out of control process?

    Exhibit 4

    UCL

    10

    LCL

    Mean of plannedprocess

  • 7/28/2019 Vba Tool for Spc

    14/14

    Balakrishnan and Oh: An Interactive VBA Tool for Teaching SPC and Process Management Issues32 INFORMS Transactions on Education 5(3), pp. 1932, 2005 INFORMS

    It will be seen that most of the values are above themean indicating non-randomness and that we shouldinvestigate. This implies that we need not wait for ared square (sample mean above UCL); non-randomgreen dots are a sign that the process may not be incontrol.

    The Magnitude of the ShiftEnsure that I i n the Process sheet, set of the

    Planned Process to is 10 minutes, set of the CurrentProcess to is 11 minutes, and set of both to pro-cesses is 1.5 minutes. In the Control sheet, ensure thatset n = 4, and z = 3, and now generate 100 samples.Recall that since the process is out of control, a redsquare is the correct indicator. What is the resultingprobability of a Type II error?

    HighIn the Process sheet change of the Current Process

    to 15. In the Control sheet generate 100 samples. Whatis the Type II error compared to the previous case?

    Close to zero

    What does this imply for managers that are con-cerned about type Type II error?

    For the same n and z, the larger the shift, the morelikely you are to catch it. If a shift of the process meanfrom 10 to 11 is not important to you (customers maynot notice), then you may not need to increase sam-ple size or variance to reduce Type II error since the

    effort and cost may not be worth the benefit. You maydecide that a shift of 5 is very important to detect (cus-tomers may start screaming!). In that case, you willwant to spend money increasing the sample size orreducing variance so that you have a high probabilityof detecting the shift.

    Once again, it is a managerial decision as towhether or not resources need to be deployed toreduce the probability of a Type II error for smallshifts in the process. It may be adequate to allocateresources only for large shifts in process mean. Man-agers will need to understand the cost of process con-trol versus the cost of not detecting process shifts.