Simulation Project 3 Simulate Emergency Calls with Excel BSNS5230 J. Wang Name ________________________ The Willow Creek Emergency Rescue Squad receives 12 calls per day on average. The squad classifies an emergency call into one of three categories, minor, regular, or major, with probabilities 0.3, 0.56, and 0.14 respectively. The type of emergency call determines the size of the crew sent in response, so the squad wants to have an idea on distribution of the three types of calls. Simulate with Excel 84 emergency calls the squad receives in a week to see the distribution of three types of emergency calls. Summarize the information from the simulation on top of your worksheet. To determine the random number ranges for the three types of calls, develop the table below: Emergency Type Probability Minor Regular Major 0.3 0.56 0.14 Cumulative Probability 0.3 0.3+0.56=0.86 0.86+0.14=1.0 Random Number Range 0 ~ 0.3 0.3 ~ 0.86 0.86 ~ 1 Go to my website, www.stockton.edu/~wangji, and download the template of Excel workbook, which is named as Template-Emergency-Calls. Save it to your disk with name (your first name)-(your last name)-Emergency-Calls. For example, John-Smith-Emergency-Calls. Finish the worksheet based on the template. Your worksheet should simulate 84 emergency calls. Excel functions used in this worksheet: =RAND() Generate a number between 0 and 1 randomly; =IF(C,a,b) If condition C is true, then the value is a otherwise the value is b. Note: =IF(C,a,b) can be “nested”, which means that there may have a =IF() function inside =IF() function. For example, =IF(C,a,IF(D,h,j)) means: If condition C is true, then value of the current cell is a, otherwise If condition D is true, then value of the current cell is h, otherwise value of the current cell is j. =COUNTIF(R,C) Count number of cells in range R which satisfy condition C. For examples: =COUNTIF(C9:C56, “Minor”) To count number of cells in the range from C9 to C56 whose values are Minor. 1 The Template: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 A B Simulation of Emergency Calls: C Summary of simulation: Total number of calls simulated: Total number of Minor calls: Total number of Regular calls: Total number of Major calls: % of Minor calls: % of Regular calls: % of Major calls: D 84 Simulation: Call # Random Number Type of Emergency Call 1 2 Detailed Guidelines: Finish the “simulation” part (starting from row 12): (a) Cells A14, A15, … give the counting of the simulated calls. (b) For cell B14, enter the function to generate a number randomly between 0 and 1, =RAND(). (c) For cell C14, enter the formula to determine the type of the call based on the randomly generated number in cell B14: =IF(B14<0.3, “Minor”, IF(B14<0.86,“Regular”, “Major”) ). (d) Copy row 14 all the way down to the row of 84th call (row 97). Finish the “summary of simulation” part (row 3 to row 10): (e) For cell D5, enter the formula to calculate total number of “Minor”s in the 84 calls simulated, =COUNTIF(C14:C97, “Minor”). (f) Enter formulas in cells D6 and D7 to count number of “regular”s and “Major”s respectively, similar to item (e) above. (g) For cell D8, enter the formula to calculate % of Minor type, =D5/D4. Put it as % format. (h) For cells D9 and D10, enter formula to calculate % of Regular type and % of Major type respectively, similar to item (g) above. Each time you press F9 key on the keyboard, the current spreadsheet will be recalculated, which means that another set of 84-calls is simulated. 2 Run your simulation for eight times (each time 84 calls are simulated), and record your results in the table below. Calculate the average of each column with your calculator. Serial # of simulations of 84 calls 1 2 3 4 5 6 7 8 Average Number of Minor calls Number of Regular calls Number of Major calls % of Minor calls % of Regular calls % of Major calls How to turn in your work: (1) E-mail your Excel workbook as the attachment to me. The Subject (title) of your e-mail must be: BSNS5230-Project-Calls-(your full name). For example, BSNS5230-Project-Calls-JohnSmith. My e-mail address: jinchang.wang@stockton.edu (2) Turn in the hardcopy of this page with the records of your simulations. Tips of generating Excel worksheets: Use formula or Excel functions to let Excel do calculations, rather than doing calculations by yourself and put the results in the spreadsheet. Use relative or absolute cell addresses properly to facilitate the Excel worksheet generation. Use Copy-Paste in Excel as far as possible. 3