Introduction to Simulation
|
|
|
- Sheila Hodge
- 10 years ago
- Views:
Transcription
1 ancmat03.qxd 11/16/06 3:28 PM Page C1 SUPPLEMENT Introduction to Simulation C LEARNING OBJECTIVES After completing this supplement you should be able to Explain why simulation is a valuable tool for decision making. Define the steps involved in the simulation modeling process. Generate random numbers from various distributions in Excel. Develop and run a simulation model in Excel. Analyze the results from a simulation in Excel. SUPPLEMENT OUTLINE Uncertainty and Risk in Decision Making C2 Simulation Overview and Software C2 Simulation Modeling Process C3 Random Number Generation in Excel C4 WHAT S IN ACC Continuous Probability Distributions C8 Application of Simulation to Decision Making C12 Other Applications of Simulation C21 Simulation within OM: Putting It All Together C21 OM FOR ME? FIN MKT OM HRM MIS C1
2 ancmat03.qxd 11/16/06 3:28 PM Page C2 C2 SUPPLEMENT C INTRODUCTION TO SIMULATION How do you deal with uncertainty in your everyday life? For example, you need to complete several assignments for different classes. You might estimate the time that each assignment will take in order to budget your time. You have probably encountered a situation in which an assignment actually took longer than you or your instructor estimated. This may have had an effect on your performance on other assignments. When there is uncertainty present, such as uncertainty in the amount of time necessary to complete an assignment, decisions become more complex. No longer can we rely on fixed values. We must be willing to consider variation in estimates. For example, you might estimate that an assignment will take between two and four hours. If you do this for several assignments, the key question is how long it will take to complete all assignments. Simulation is a tool that can directly take into account the uncertainty in a situation, incorporating the uncertainties from multiple sources. It has become one of the most useful analytical techniques in operations management for analyzing facility layouts, testing scheduling methods, and other important questions. UNCERTAINTY AND RISK IN DECISION MAKING Computer simulation A methodology that evaluates the performance of a system when one or more input values are uncertain. Managers face decisions every day involving uncertainty. If a company is considering expanding a facility, there is uncertainty about whether future demand will be high enough to make the expansion financially attractive. The decision to expand, however, must be made before it is known what future demand will be. The uncertainty in demand implies the risk that the company will be hurt financially. Quantitative models can provide tremendous insight and assistance in decision making. Unfortunately, many quantitative models ignore the uncertainty present in the real situations. Sometimes this uncertainty is taken into account after a model is built when some different what-if scenarios are considered, or a sensitivity analysis is conducted, using methods similar to those discussed in Supplement A. However, oftentimes there is uncertainty about a number of factors, and it is difficult to do a complete scenario analysis. Computer simulation is a methodology that allows one to model the uncertainty directly and obtain a clear picture of the effect of that uncertainty on the output quantities of a model. That is, simulation allows a decision maker to accurately determine the effects of the uncertainty present in a situation. SIMULATION OVERVIEW AND SOFTWARE A computer simulation is a model that mimics what might happen in reality. In the broadest sense, every mathematical model is really a simulation. However, in this supplement we restrict ourselves to situations in which there is some uncertainty or randomness about some aspect of the system under consideration and we want to model that uncertainty directly. For example, future demand is uncertain in most business planning situations. Customers arrive to a restaurant drive-through window according to some random process rather than being equally spaced in time. Simula-
3 ancmat03.qxd 11/16/06 3:28 PM Page C3 SIMULATION MODELING PROCESS C3 tion allows us to model this random behavior and compute system performance measures, providing valuable information for decision makers. Simulation is one of the most commonly used analytical tools for complex systems. This supplement focuses on spreadsheet-based simulation models. Spreadsheet simulation is well suited to analyze many operational problems. We will apply Monte- Carlo Simulation, which repeatedly takes samples from known probability distributions for the random parameters in a problem and computes the resulting output measures. Examples of decision situations amenable to Monte-Carlo Simulation include location and expansion decisions, inventory analyses, project planning, and relatively simple waiting line (queuing) systems. All of these situations typically involve uncertainty. In this supplement we will develop, run, and analyze these simulation models using only built-in Excel functionality. However, you should be aware that there are Excel add-ins available for simulation that provide more functions for probability distributions and analysis of the simulation results and eliminate some of the routine tasks involved in running the simulation model. Two leading Excel add-ins are Crystal Ball ( ( Although relatively complex systems can be analyzed in spreadsheets, there are many software products available that are better able to handle large, complex systems. Many of these products employ what is known as discrete-event simulation, which is a methodology for modeling how the state of the system under investigation changes as different events (such as customer arrivals or departures) occur. For example, if you were planning the layout and operation of an entire new production or service facility, modeling the supply chain of a company, or reengineering complex business processes, a stand-alone simulation product using discrete-event simulation would be a better choice than a spreadsheet model. Products more suitable for complex systems modeling include ProModel ( Extend ( and ProcessModel ( OR/MS Today ( a publication of the Institute for Operations Research and Management Science (INFORMS), periodically publishes simulation software surveys. Monte-Carlo Simulation A simulation that repeatedly samples from probability distributions and computes the resulting performance measures of the system. Discrete-event simulation A methodology that models the state of a system as it changes as a result of certain events that occur randomly in time. The process of developing and using a spreadsheet-based simulation model is similar to that for a regular spreadsheet model (see Supplement A). The key difference is that a simulation model directly incorporates the randomness or uncertainty present in the situation. Therefore, the output of a simulation model is not a single number, but rather a probability distribution. Figure C-1 shows a schematic of a simulation model. Typically, there are certain inputs that are fixed, that is, not subject to uncertainty. For example, we may know for certain the price we must pay for a product. In addition, there are also one or more inputs that are random. For example, we may not know the exact level of demand, but we can use our knowledge of the situation to describe the possible values of demand using a probability distribution (just as we do not know the outcome of a single roll of a die beforehand, but we can describe the probability distribution of possible outcomes). Since at least one of the inputs is random, this implies that the output of the model is also random. The output of a simulation analysis is really the probability distribution of possible output values, rather than a single number. This gives the decision maker a much clearer picture of the risk involved in a situation than is possible with a regular model. SIMULATION MODELING PROCESS
4 ancmat03.qxd 11/16/06 3:28 PM Page C4 C4 SUPPLEMENT C INTRODUCTION TO SIMULATION FIGURE C-1 Fixed (Known) Inputs Simulation model schematic Random (Uncertain) Inputs Simulation Model Outputs/Performance Measures Decision Variables Briefly, the simulation modeling process in a spreadsheet involves the following steps. Just as in any modeling and analysis activity, sometimes it is necessary to loop back to a previous step. Deterministic spreadsheet model A logically correct and complete model, but without any randomness built into it. Develop a deterministic spreadsheet model. Determine the appropriate probability distributions to use for the random inputs to the model. Modify the deterministic model by incorporating the random inputs using the probability distributions. Recalculate the model many times to generate many possible values of the model output(s). Each single recalculation is called a trial or replication. Analyze the possible output values by considering the summary statistics and the probability distribution of the output(s). RANDOM NUMBER GENERATION IN EXCEL The foundation of any simulation model is random number generation. In order to create simulations of real systems, we must have a way to mimic how they behave in the real world. For example, consider the act of tossing a coin. There are two possible outcomes, heads and tails, with equal probability. How can we simulate this activity, generating outcomes that mimic what might happen if we tossed a real coin? While this is a very simple situation, the basic concept applied here is exactly the same as is used for more complex situations. The key to modeling any random event hinges on generating random values uniformly distributed between 0 and 1. We ll let X be a specific random value from this distribution between 0 and 1, denoted U(0, 1). If we can generate values of X, then logic and mathematics can be applied to convert these values into the real outcomes. For example, if X is between 0.0 and 0.5, we would consider that to be a heads, and if X is between 0.5 and 1.0, we would consider it to be tails (the reverse definition of heads and tails also works because of the equal probability of the event). Fortunately, Excel has a built-in function to generate values from the U(0, 1) distribution. This function is written RAND(), where the parentheses are required and nothing is put between them. The parentheses are there to indicate to Excel that we are entering a function. Each time the RAND function is calculated, a different number between 0 and 1 is the result.
5 ancmat03.qxd 11/16/06 3:28 PM Page C5 RANDOM NUMBER GENERATION IN EXCEL C A B C D E 50 Random Numbers Between 0 and 1 Using =RAND() Function A4: =RAND() Copied to A4:E13 FIGURE C-2 Fifty U(0,1) random numbers Figure C-2 shows fifty numbers generated using the RAND function. The function was entered into one cell and copied to all the others. So, although exactly the same function is entered into each of these cells, each resulting value is different. To recalculate the set of numbers again, press the F9 key. Excel independently calculates each one of the functions. Therefore, we can use each of these values to determine a heads or a tails. Problem-Solving Tip: If you are working through this supplement at the computer, your numerical results for all the examples will differ from what is shown in the text. This is the nature of random numbers and simulation. A histogram of values from the RAND function should show the values to be approximately uniformly distributed between 0 and 1. Figure C-3 shows a histogram based on fifty values of the RAND function. There are ten bins in this histogram, and the labels on the horizontal axis are the upper end point of each bin. Therefore, the column for 0.2 indicates there were four values 0.10 but If the values Frequency Histogram (50 Random Values from = RAND() function) FIGURE C-3 Histogram of fifty values from RAND() function Upper End of Category
6 ancmat03.qxd 11/16/06 3:28 PM Page C6 C6 SUPPLEMENT C INTRODUCTION TO SIMULATION were perfectly uniformly distributed, there would be five observations in each of these ranges. However, as you know, if you flip a coin fifty times, you will generally not get exactly twenty-five heads and twenty-five tails. As more values from RAND are generated, the resulting histogram should become more and more uniform. Figure C-4 is a histogram generated from 5000 values of the RAND function. Notice that these columns are much more even in height than for the 50-value histogram. Just as a pollster obtains a better representation of the views of the entire population by interviewing more people, we obtain a truer picture of the real system if we compute many replications of a simulation model. Bernoulli Distribution: Simulating the Flip of a Coin Returning to the coin flip, how do we simulate this? Taking one value from U(0, 1), if that value is 0.5, we can consider that a heads ; otherwise, we ll consider it a tails. This can be done in Excel using the IF function, as shown in Figure C-5. This figure also shows the results from 100 coin flips, by copying the respective formulas down and counting the numbers of heads and tails. Note that in this figure some of the rows have been hidden (Format/Row/Hide). We use the COUNTIF function to count the numbers of heads and tails. The first argument in this function is the count range and FIGURE C-4 Histogram of 5000 values from RAND function Histogram (5000 Random Values from = RAND() function) Frequency Upper End of Category FIGURE C-5 Spreadsheet for coin flip example: Bernoulli distribution A B C D E F G H Coin Toss Simulation A4: =RAND() U(0,1) H/T Heads Heads B4: =IF(A4<0.5,"Heads","Tails") Tails Tails Heads Number Heads Tails Number Tails Tails Total Heads Heads Tails E8: =COUNTIF(B$4:B$103,"Heads") E9: =COUNTIF(B$4:B$103,"Tails")
7 ancmat03.qxd 11/16/06 3:28 PM Page C7 RANDOM NUMBER GENERATION IN EXCEL C7 the second is the criteria. In this particular set of 100 coin flips, we had 43 heads and 57 tails. If we recalculate the spreadsheet (by hitting the F9 key), we will generate 100 new coin flips, and our total heads and tails will probably be different. There is nothing special about the 0.5 probability used in the coin flip situation. We might be simulating a customer service operation, where the probability of a customer making a complaint is In a model, a complaint would likely trigger a conflict-resolution process, which would involve additional employee resources, time, and costs. Any situation involving two outcomes can be modeled in this way. Another example is if we have a process that produces defective items with some probability. A random variable that can have two outcomes is called a Bernoulli random variable. Discrete Uniform Distribution: Simulating the Roll of a Die What if there are more than two outcomes? For example, how would we model the outcome from a normal six-sided die? The outcomes from a single die come from a discrete uniform distribution, since there is a finite number of outcomes, each having the same probability. Conceptually, the random number generation process is the same as for the coin flip. We generate a U(0,1) random number (say, X) and then translate that number into one of the numbers 1, 2,...,6 with equal likelihood. Therefore, if 0 X (i.e., 1/6), then the die outcome is 1. If X 0.333, then the die outcome is 2, and so on, up through if X 1, the die outcome is 6. This could be accomplished in Excel by modifying the IF statement used for the coin flip example. However, we would need to nest multiple IF functions to accomplish this. Fortunately, there is a better way using Excel s VLOOKUP function. The VLOOKUP (vertical lookup) function looks up a value in a table and returns a corresponding value from the same row. For example, we could use it to look up a customer number and return the number of items that customer has purchased. The VLOOKUP function has the form Bernoulli random variable A random variable that can assume only two values. Discrete uniform distribution A probability distribution in which there are a finite number of equally spaced outcomes, each with equal probability. VLOOKUP(lookup_value, table_array, col_index_num) The lookup_value is the value to be found in the first column of the table_array. The table_array is the table of information in which data is looked up. The col_index_num is the column number in the table_array from which the matching value is returned. A col_index_num of 1 returns the value in the first column in table_array; a col_index_num of 2 returns the value in the second column in table_array, and so on. For more information, see the Excel help system. Figure C-6 shows how the simulation of a die roll can be conducted. As before, we have copied the logic down to represent 100 rolls of the die (some rows have been hidden) and counted the number of each outcome. We know in a limited sample we will not have exactly percent of the rolls corresponding to each possible outcome. The VLOOKUP function in cell B4, VLOOKUP(A4,E$7:G$12,3), converts the U(0,1) random number in cell A4 (the lookup_value) to a simulated outcome of the die. It looks in the first column of the table_array E$7:G$12. Specifically, it looks in cells E$7:E$12 for the greatest value that is less than or equal to the value in A4. Since A4 contains the value 0.607, the VLOOKUP function stops at the in cell E10, this being the greatest value that is also less than or equal to Then, since 3 is the col_index_num, the VLOOKUP function returns the value in column 3 of the table, in the same row as the value (i.e., the value 4 in cell G10). Similarly,
8 ancmat03.qxd 11/16/06 3:28 PM Page C8 C8 SUPPLEMENT C INTRODUCTION TO SIMULATION FIGURE C-6 Spreadsheet for die roll example: discrete uniform distribution A B C D E F G Die Roll Simulation U(0,1) Roll B4: =VLOOKUP(A4,E$7:G$12,3) Cumulative Probability Distrib Probability Begin End Outcome Results of Simulation Roll Frequency Fraction A4: =RAND() (copied down) E23: =SUM(E17:E22) E17: =COUNTIF(B$4:B$103,D17) (copied down) F17: =E17/E$23 (copied down) E8: =F7 F7: =E7+D7 (copied down) cell B5 has the value of 1, since the value in A5 is The VLOOKUP functions stops at E$7 and returns the value in the third column, G$7. General discrete distribution A probability distribution with (usually) a finite number of possible outcomes, not necessarily with equal probabilities. General Discrete Distribution Just as there was nothing special about the 0.5 probability for the coin flip example, there is nothing special about the equal probability of each outcome in the roll of the die. The outcomes could be the demand for a product with different probabilities for each. Figure C-7 shows an example. The only difference is that there are now seven possible outcomes, and the probabilities for the outcomes are not all the same. Such a distribution is called a general discrete distribution. Demand can be one of the values 100, 150,...,400, with individual probabilities shown in cells D7:D13. Obviously, an important thing to do is to make sure the probabilities sum to 1. CONTINUOUS PROBABILITY DISTRIBUTIONS The three examples so far have been of discrete distributions, which are distributions that have a countable number of possible outcomes. Loosely speaking, most people think of discrete distributions as having a finite number of possible outcomes, but a
9 ancmat03.qxd 11/16/06 3:28 PM Page C9 CONTINUOUS PROBABILITY DISTRIBUTIONS C A B C D E F G General Discrete Distribution A4: =RAND() U(0,1) Demand Cumulative Distribution B4: =VLOOKUP(A4,E$7:G$13,3) 100 Probability Begin End Demand Results of Simulation Demand Frequency Fraction FIGURE C-7 Spreadsheet for general discrete distribution distribution with outcomes 0, 1, 2,...is also considered to be discrete. Discrete distributions are valuable for simulating events such as whether we get awarded a contract or not, the number of days required for some task, or the number of customers arriving in a store in some given period of time. The other major type of probability distribution is a continuous distribution, which can take on any value, perhaps within some range. Actually, the RAND function generates a continuous uniform distribution between 0 and 1. There are many continuous distributions, but some common ones used in simulation include the uniform distribution, the normal distribution, and the exponential distribution. Figure C-8 illustrates these types of distributions. Discrete distribution A distribution that has a countable number of possible outcomes. Continuous distribution A probability distribution that can take on any fractional or whole value. Simulating Continuous Probability Distributions The RAND function is a continuous uniform probability distribution between 0 and 1, or U(0,1). In general, a continuous uniform distribution can be between any two values, for instance, a and b. We would refer to this as U(a, b). To generate a U(a, b) random number in Excel, we can use the formula a (b a)*rand() The quantity (b a) is the total range of the distribution. Multiplying by RAND() is essentially taking a fraction of this range. Adding a to this value then results in a Continuous uniform distribution A probability distribution that ranges between a minimum and maximum value, with any value in between equally likely to occur.
10 ancmat03.qxd 11/16/06 3:29 PM Page C10 C10 SUPPLEMENT C FIGURE C-8 INTRODUCTION TO SIMULATION Normal Distribution, mean = 80, stdev = 10 Examples of continuous probability distributions Uniform Distribution, minimum = 10, maximum = Exponential Distribution, mean = number between a and b. For example, if the time to complete a task was uniformly distributed between 10 and 50 minutes, we would generate a U(10, 50) random number to represent this time. Then the corresponding formula would be 10 (50 10)*RAND() If RAND() equals 0, this formula results in a time of 10 minutes; if RAND() equals 1, the formula computes to 50 minutes. Similarly, if RAND() equals 0.5, the formula computes to 30, which is halfway between 10 and 50. Essentially, RAND() is acting like a fraction, and adding a fraction of the value (b a) to the minimum value a. Figure C-9 shows a histogram of 250 simulated values from a U(10, 50) distribution. Note the general shape of this distribution is rectangular, indicating a relatively even distribution of values across this range. The previous section showed how to generate values from a general discrete distribution using the VLOOKUP function. If a discrete distribution is between two integers, with each value equally likely, a simpler approach is possible. This approach takes advantage of the logic for the continuous uniform distribution but rounds the
11 ancmat03.qxd 11/16/06 3:29 PM Page C11 CONTINUOUS PROBABILITY DISTRIBUTIONS C % 12.0% 10.0% 8.0% 6.0% 4.0% 2.0% 0.0% Frequency (%, n = 250) Midpoint of Range FIGURE C-9 Histogram of 250 simulated values from a U(10, 50) distribution result down to the nearest integer. If we want to generate a discrete uniform distribution between 10 and 50, with only integer values possible, we can use the following formula: INT (10 ( )*RAND()) The INT function rounds any value down to the nearest integer. Besides the use of this function, the only change is in the ( ) portion. The 1 is needed because of this rounding down, so that all values between 10 and 50 (including 10 and 50 themselves) are possible. Simulating other distributions is conceptually the same as we have seen. First a U(0, 1) random number is generated, and this number is transformed into a random number from the desired distribution. For other distributions, the mathematics of the process becomes more difficult, but for two additional distributions Excel functions can be readily used. The normal distribution is often used to model many real-world phenomena, such as the delivery time from a supplier, the demand for a product or service, or the cost of raw material. To generate normally distributed random numbers in Excel, you need to know the mean,, and standard deviation, s. Then the following formula generates a normal random number, denoted N(, ): NORMINV(RAND(),, ) The NORMINV function is the inverse normal function. RAND() acts like a probability in this function (note that it is between 0 and 1), and the NORMINV function returns the value of the distribution corresponding to the point at which the area under the curve is equal to the value from RAND. Figure C-10 shows a histogram from 250 simulated values from a N(80, 10) distribution. Note the familiar bell shape of this histogram. The exponential distribution is a very common distribution in the modeling of customer arrivals to service systems, such as a call center or a drive-through window. Specifically, it is used to represent the time between successive customer arrivals, called the interarrival time. The mean interarrival time is denoted, and we would refer to such a distribution as EXP( ). To generate exponentially-distributed random numbers, the following formula should be used: Normal distribution A distribution characterized by a mean and standard deviation, indicated by the familiar bell shape with a large density around the mean and with diminished density as one moves further from the mean. Exponential distribution A distribution characterized by a mean, with possible outcomes all positive. *LN(RAND())
12 ancmat03.qxd 11/16/06 3:29 PM Page C12 C12 SUPPLEMENT C INTRODUCTION TO SIMULATION FIGURE C-10 Histogram of 250 simulated values from a N(80, 10) distribution 30.0% 25.0% 20.0% 15.0% 10.0% 5.0% 0.0% Frequency (%, n = 250) Midpoint of Range In this formula, LN is the Excel function for the natural logarithm. The minus sign is needed because the natural logarithm of a number between 0 and 1 is negative. Figure C-11 shows a histogram of 250 simulated values from an EXP(10) distribution. All values are greater than zero. The distribution starts off with a high frequency of observations near zero, but quickly tails off. This tends to match the arrival behavior of many service systems, where frequently the time between successive customer arrivals is quite small. For reference, Table C-1 summarizes the formulas needed to generate the probability distributions discussed here. Commercial add-ins such as Crystal Ball can generate many other distributions, but the ones provided here are some of the most common. APPLICATION OF SIMULATION TO DECISION MAKING In this section we show how spreadsheet-based simulation can be used to analyze a situation involving uncertainty and risk. We will set up and solve a relatively simple newsvendor problem. The newsvendor problem is one in which a retailer, for instance, needs to purchase some quantity of an item prior to demand being known. If too few are ordered, it will forgo potential profit. However, if too many are ordered, the excess over the amount demanded must be heavily discounted. This fundamental problem commonly occurs in retailing, such as when a store needs to order seasonal or perishable merchandise. However, it also exists for manufacturers of products that decline in value FIGURE C-11 Histogram of 250 simulated values from an EXP(10) distribution 50.0% 40.0% 30.0% 20.0% 10.0% Frequency (%, n = 250) 0.0% Midpoint of Range
13 ancmat03.qxd 11/16/06 3:29 PM Page C13 APPLICATION OF SIMULATION TO DECISION MAKING C13 Distribution Excel Function Description Bernoulli IF(RAND() p,1,0) Returns the result, either 0 or 1, of a single Bernoulli trial, where p is the probability of success. Used to model random events with only two outcomes. General Discrete VLOOKUP(RAND(), Returns one of the values Lookup_Array,3) in the third column of the Lookup_Array. The first two columns must contain the ranges corresponding to the cumulative probability distribution, as shown in the examples. Continuous Uniform a (b a)*rand() Returns a value in the range from a to b. Each value in this range is equally likely to occur. Exponential *LN(RAND()) Returns a value from an exponential distribution with mean. Often used to model the time between events or the lifetime of a device with a constant probability of failure. Normal NORMINV(RAND(),, ) Returns a value from a normal distribution with mean and standard deviation. Discrete Uniform INT (a (b a 1) Returns one of the integers *RAND()) between a and b, inclusive. Each value is equally likely to occur. TABLE C-1 Excel Formulas to Generate Common Probability Distributions after they are produced. For example, in the fast-changing electronics industry, if a company commits to manufacturing too many handheld computers, it will be left with product that is worth only a fraction of what it was worth when produced. Even transportation services such as airlines face a form of this problem, since airlines must decide ahead of time how frequently to fly a given route and which type of aircraft to use. DG Outerwear must decide how many of a particular style and size of winter coat to order for the coming season. Lead times in the industry are such that the order must be placed in June, well before the actual realization of demand. Coats cost $75 for DG to purchase, and the planned sales price is $100. If not enough coats are ordered, assume that the potential customer leaves without purchasing a substitute coat. If too many coats are ordered, DG must discount the coats in order to sell them at the salvage value. The demand for this size and style of coat is estimated to be between 20 and 40, with each possibility equally likely. If coats must be salvaged, the salvage price may be $15, $20, $25, or $30 with probabilities 0.05, 0.30, 0.50, and 0.15, respectively. Assume that all remaining coats will sell at this salvage price. The approach DG has used in the past is to estimate the expected demand and to order somewhat more than that number of coats. For this year, DG is considering ordering 35 coats, but wonders if that is really the best decision. EXAMPLE C.1 DG Outerwear
14 ancmat03.qxd 11/16/06 3:29 PM Page C14 C14 SUPPLEMENT C INTRODUCTION TO SIMULATION Before You Begin: In this problem, determine how many of a particular winter coat to order for the coming season. You can place only one order because of the long lead time for this coat. Your objective is to order the number of this type of coat that will provide the highest expected payoff. There is considerable uncertainty to model. Demand is represented by a uniform distribution, with a low of 20 coats up to a maximum of 40. Salvage value for the coats is also uncertain, with values ranging from $15 up to $30. Use a simulation model to provide insight into what might happen if 35 coats are ordered. Deterministic Model We know several things in this problem: The purchase price is $75, and the regular sales price is $100. The salvage price can be one of four quantities. Before the season begins we do not know which value will be necessary to liquidate any remaining coats. Demand is also uncertain, but we estimate that it will be between 20 and 40. We need a model to be able to evaluate different purchase quantities. That is, purchase quantity is the decision variable. The first step in setting up a simulation model is to build the model logic. We initially ignore the uncertainty and focus on the spreadsheet logic. In particular, the logic needs to compare the quantity purchased with the demand. The quantity sold at the regular price, $100, will necessarily be the smaller of these two quantities, since we cannot sell more than we purchase and we also cannot sell more than what customers are willing to buy at the regular price. Once the quantity sold at the regular price is determined, we can compute the number (if any) of remaining coats. These coats will be sold at the salvage price. The model can then compute the total revenue, the total costs, and the profit. Figure C-12 shows a deterministic model of this situation. For the demand and salvage price cells (cells D17 and G17), we have just entered sample values. The focus here is developing the correct logic for the situation. The formulas are listed here: E17 MIN(B$8,D17) F17 B$8 E17 H17 B$5*E17 FIGURE C-12 Deterministic model for DG Outerwear problem A B C D E F G H I J DG Winter Coats Fixed Inputs Demand Distribution (Discrete Uniform) Purchase Price of Coat $75 Minimum 20 Regular Sales Price $100 Maximum 40 Decision Variable Salvage Price Distribution (Discrete) Purchase Quantity 35 Cumulative Distribution Probability Begin End Price $ $ $ $ Simulation Logic Demand Reg Sales Qty Salv Sales Qty Salv Price Reg Rev Salv Rev Profit $25 $3,000 $125 $500
15 ancmat03.qxd 11/16/06 3:29 PM Page C15 I17 G17*F17 J17 H17 I17 (B$8*B$4) APPLICATION OF SIMULATION TO DECISION MAKING C15 The formula in cell E17 results in 30, since there were only 30 customers willing to purchase the coat at the regular price. Cell F17 computes the amount remaining as the purchase quantity less the number sold at the regular price. Then the regular and salvage revenues can be computed, followed finally by the profit. This model can certainly be used to do what-if analysis, but it does not take into account the uncertainty of demand and salvage price. Simulation Model The model becomes a simulation model when we directly incorporate the uncertainty of demand and salvage price. Figure C-13 shows this additional logic. Notice that we have added columns for Replication and RN1, and RN2. for two random numbers from the U(0, 1) distribution. Other changes to the model are in the demand and salvage price cells. The demand cell now generates a random integer uniformly distributed between 20 and 40, and the salvage price cell generates a random price from the salvage price distribution. The new formulas are listed here: Replicating the Model B17: RAND() C17: RAND() D17: INT(E$4 (E$5 E$4 1)*B17) G17: VLOOKUP(C17,E$10:G$13,3) Figure C-13 shows one replication of the simulation logic. A replication consists of a single sampling of the random values from the applicable distributions, calculating the output of the model, and recording that result. That is, a single replication represents one possible value of the profit. Just as a political pollster would never Replication Replication of a simulation model consists of sampling inputs from respective probability distributions, computing the logic of the model, and recording the resulting output value A B C D E F G H I J DG Winter Coats Fixed Inputs Demand Distribution (Discrete Uniform) Purchase Price of Coat $75 Minimum 20 Regular Sales Price $100 Maximum 40 Decision Variable Salvage Price Distribution (Discrete) Purchase Quantity 35 Cumulative Distribution Probability Begin End Price $ $ $ $ Simulation Logic Replication RN1 RN2 Demand Reg Sales Qty Salv Sales Qty Salv Price Reg Rev Salv Rev Profit $30 $2,000 $450 ($175) FIGURE C-13 Simulation logic for DG Outerwear problem (one replication)
16 ancmat03.qxd 11/16/06 3:29 PM Page C16 C16 SUPPLEMENT C INTRODUCTION TO SIMULATION consider speaking to a single person to develop predictions on how the public at large will vote, a simulation model never consists of just one replication. Rather, we must perform many replications of the model in order to get a clearer picture as to the likelihood of different profit levels. In Figure C-14, we have copied the logic for a single replication down to generate 250 replications. Notice that the random numbers change for each replication, resulting in different demand, salvage price, and profit values. We are really simulating the upcoming winter sales season 250 times in order to obtain more insight into the likelihood of profit levels, assuming we purchase 35 coats. Problem-Solving Tip: How many replications should you run for a simulation? We have used 250 as a sample size. However, there is no simple answer to this question, although more is always better in terms of the precision of the estimates. This is a statistical question, no different from the question pollsters face in determining how many people to interview in order to achieve some level of precision in a survey. Obviously, it is easy to run additional replications of a simple model, but for complex simulation models, the computation time of additional replications can become significant. (Some simulations can run for hours or even days.) FIGURE C-14 Completed simulation model for DG Outerwear problem A B C D E F G H I J DG Winter Coats Fixed Inputs Demand Distribution (Discrete Uniform) Purchase Price of Coat $75 Minimum 20 Regular Sales Price $100 Maximum 40 Decision Variable Salvage Price Distribution (Discrete) Purchase Quantity 35 Cumulative Distribution Probability Begin End Price $ $ $ $ Simulation Logic Replication RN1 RN2 Demand Reg Sales Qty Salv Sales Qty Salv Price Reg Rev Salv Rev Profit $25 $3,500 $0 $ $25 $2,500 $250 $ $25 $2,100 $350 ($175) $25 $3,200 $75 $ $25 $2,800 $175 $ $20 $3,500 $0 $ $25 $3,100 $100 $ $25 $2,100 $350 ($175) Average $435 Standard Deviation $392 Minimum ($325) Maximum $875 95% Confidence Interval on Average Lower CL $386 Upper CL $483
17 ancmat03.qxd 11/16/06 3:29 PM Page C17 APPLICATION OF SIMULATION TO DECISION MAKING C17 Recall from statistics that as the sample size is increased, precision improves, but at a decreasing rate. This is because in the formula for the confidence interval for the mean of a population, the square root of the sample size appears in the denominator. Therefore, as this sample size increases, the benefit of increased precision takes more and more samples to obtain. For the problems covered here, a sample size of 250 is usually sufficient, but 500 or even 1000 is even better. You should experiment and see how much the width of the confidence interval changes with a larger sample size. Commercial add-in products allow you to specify a precision level, with the simulation automatically stopping when this level is reached. Analyzing the Results After we have replicated the model, we need to compute summary statistics. These are shown in Figure C-14. Generally speaking, it is a good idea to compute the average, standard deviation, minimum, and maximum values of the simulation output(s). We have also calculated a confidence interval for the true average profit. Formulas for these summary statistics are provided here: J268: AVERAGE(J$17:J$266) J269: STDEV(J$17:J$266) J270: MIN(J$17:J$266) J271: MAX(J$17:J$266) J274: J$ *J$269/SQRT(250) J275: J$ *J$269/SQRT(250) If we purchase 35 coats, we see that our average, or expected, profit is $435. However, there is a relatively large standard deviation of $392. This implies that in any given year, there is a significant amount of uncertainty in the profit we will earn. Over the course of 250 replications, the worst case is a loss of $325 and the best case a profit of $875. We are 95 percent confident that the true average profit lies somewhere in the interval from $386 to $483. Our estimate of the average profit is based on these 250 trials; if we were to perform additional replications, our estimate would become more precise. Problem-Solving Tip: After running a simulation model for the number of replications you desire, oftentimes it is a good idea to freeze the random numbers upon which the simulation is based. If you don t do this, the entire simulation will recalculate any time you change a value in a cell or even open or close the file. To freeze the random numbers, first highlight the cells to be frozen, choose Edit/Copy and then Edit/Paste Special. In the Paste Special dialog box, select Values, and click OK. Any functions, such as RAND(), in the cells you selected, will be replaced by the values that were in there when you did the copy/paste operation. In this way you can run a simulation, freeze the results, and then perform more detailed analysis on the results. That being said, sometimes you will want to leave the results of a simulation live so that every time you make a change to a cell, the results will update. This is the case if you want to try out different values for a decision quantity, for example.
18 ancmat03.qxd 11/16/06 3:29 PM Page C18 C18 SUPPLEMENT C INTRODUCTION TO SIMULATION We now have valuable information for DG, if it decides to purchase 35 coats. In making this decision, DG must be willing to accept the uncertainty in profit as outlined. Is this the best order quantity? Since we have a flexible simulation model, it is quite easy to try different quantities. The simulation results will automatically calculate, along with the summary statistics. For the sake of simplicity, suppose DG can order in increments of 5 coats. Therefore, DG will consider order quantities of 20, 25, 30, 35, and 40 coats. Summary statistics for these values are provided in Table C-2. From the table, we see that if 20 coats are ordered, a guaranteed $500 profit can be achieved. This is not surprising, since we assume that demand is between 20 and 40 coats. For a 25-coat purchase quantity, average profit increases to $568, but standard deviation of profit also increases, to $117. Simultaneously, minimum profit gets worse, and maximum profit gets better. This should be intuitive after considering that we are investing additional money in inventory, so there is a greater potential gain, but at the same time the possibility of doing worse. If we purchase 30 coats, average profit declines from the 25-coat option, but the standard deviation continues to rise. As we move to the 35- and 40-coat purchases, average profit continues to decline, with the standard deviation increasing. Problem-Solving Tip: To recalculate a spreadsheet, press the F9 key. In a simulation model, this will force all cells involving the RAND() function to recalculate, as well as any cells that depend on them. In light of these values, it would appear that purchasing 20 or 25 coats is the best alternative. Purchasing 20 coats involves no uncertainty, and purchasing 25 allows maximizing expected profit. Surprisingly, even though 30 coats is the average of the demand distribution, it is better in this case (because of the revenues and costs) to purchase somewhat less than this quantity. Suppose we decide to purchase 25 coats. What does the actual distribution of possible profit values look like? To determine this, we can generate a histogram of the profit values, using the Tools/Data Analysis/Histogram tool. If Data Analysis does not appear in the Tools menu of Excel, go to Tools/Add Ins, and put a check beside the Analysis Tool Pack item. This histogram is shown in Figure C-15. The histogram is really the probability distribution of profit, after considering the uncertainty in demand and salvage price. At first, this histogram appears very odd. The vast majority (193 out of 250) of the observations have profit values greater than $598, with the remainder being spread out rather evenly over the range from $225 to TABLE C-2 Purchase Standard Quantity Average Deviation Minimum Maximum Summary Statistics of Profit for DG Outerwear Coat Problem 20 $500 $0 $500 $ $568 $117 $225 $ $551 $264 $50 $ $435 $392 $325 $ $230 $460 $600 $1000
19 ancmat03.qxd 11/16/06 3:29 PM Page C19 APPLICATION OF SIMULATION TO DECISION MAKING C19 Bin Frequency $225 3 $ $278 1 $305 3 $332 5 $358 1 $385 5 $412 6 $438 2 $465 4 $492 4 $518 0 $545 6 $572 4 $598 0 More 193 Frequency Histogram of Profit Values for Purchase Quantity = 25 (250 total replications) $225 $252 $278 $305 $332 $358 $385 $412 $438 $465 $492 $518 $545 $572 $598 More FIGURE C-15 Histogram of profit values for a purchase quantity of 25 Upper End of Category $598. Why is this? Recalling that the distribution of demand is uniform, it would seem that the profit distribution should be uniform as well. However, this is clearly not the case. The key point is that since we are purchasing 25 coats, there is sufficient demand to sell all of those coats most of the time. In fact, demand will be 25 coats or more approximately 75 percent of the time (since demand ranges from 20 to 40 coats). As we see, 193 times out of 250 (77 percent of the time) we appear to be earning the maximum possible profit of $625. The other 23 percent of the time (when demand is between 20 and 24 coats), profit is spread across the other possible values. Using a Data Table to Run a Simulation In this example, we developed the logic for a single replication and then copied that entire logic down in order to run 250 replications. This worked because the logic for this model was relatively simple and could be put into a single row. Most models are more complex. Another way to run many replications is to use Excel s Data Table feature, covered in Supplement A, where it is used for sensitivity analysis. Here we use it to have Excel recalculate the logic many times, each time with different random numbers, and store the results in a table. Figure C-16 shows the model with a Data Table used to do the replications. To do this, we have started with the single-replication model, which was shown in Figure C- 13. The steps involved in using a Data Table for the simulation are as follows, assuming the logic for a single replication is already complete: 1. Label two columns, one for replications and one for profit. In the replications column, from A22 to A271, enter the numbers This is done easily with the Edit/Fill/Series command, with Series in Columns, Step value of 1, and Stop value of 250. Note that we do not put anything in cell A In cell B21, enter the formula J17. This simply references the profit value from the simulation logic. 3. Select the range A21:B271. Be sure to include the top row in the selection. It is really the formula in cell B21 that tells the Data Table what value you re interested in.
20 ancmat03.qxd 11/16/06 3:29 PM Page C20 C20 SUPPLEMENT C FIGURE C-16 DG Outerwear simulation using Data Table INTRODUCTION TO SIMULATION A B C D E F G H I J Decision Variable Salvage Price Distribution (Discrete) Purchase Quantity 35 Cumulative Distribution Probability Begin End Price $ $ $ $ Simulation Logic RN1 RN2 Demand Reg Sales Qty Salv Sales Qty Salv Price Reg Rev Salv Rev Profit $20 $2,800 $140 $315 Data Table for Simulation Replications B21: =J17 Replications Profit $ 315 Summary Statistics 1 $ 875 Average $ $ 35 StdDev $ $ 795 Minimum $ (400) 4 $ (325) Maximum $ $ 75 6 $ (100) 95% Confidence Interval 7 $ 200 Lower CL $ $ 200 Upper CL $ $ (35) 10 $ (250) 11 $ (400) 249 $ $ Keeping the range from #3 selected, go to Data/Table in the Excel menu. In the resulting dialog box, leave the Row Input Cell field blank, and click on cell A21 (or any blank cell on the worksheet) for the Column Input Cell. Click OK. The results from 250 replications should now be showing in cells B22:B271. Note: Recall in Supplement A the Column Input Cell was set to vary an input parameter of the model, but here we are using it simply to force Excel to recalculate the model. 5. If all the values in B22:B271 are the same, press the F9 key to force recalculation of the worksheet. This can occur if Excel s recalculation settings have been changed. You can change these settings at Tools/Options/Calculation. Supplement A and the Excel help system contain additional information about the Data Table command. 6. Compute summary statistics from the results in cells B22:B If desired, freeze the results from the simulation in cells B22:B271 using Edit/Copy, Edit/Paste Special/Values. Using the Data Table command to run simulations is normally easier, once you get the hang of it, than copying all of the simulation logic. It also allows you to run more complex models. Recap In this example we have begun to see the power of spreadsheet simulation. Simulation models allow us to incorporate our uncertainty directly into the model, run the model many times, and compute summary statistics. Rather than relying on a single point es-
21 ancmat03.qxd 11/16/06 3:29 PM Page C21 timate of profit, we can actually determine the uncertainty of profit (or whatever the output of our model is). This quantification of uncertainty is extremely important in managerial decision making. SUPPLEMENT HIGHLIGHTS C21 OTHER APPLICATIONS OF SIMULATION There are almost limitless ways the power of simulation can be used to bring insight into managerial decision making, both in traditional OM areas and throughout the organization. A few decision situations in which simulation can and has been used effectively are listed here. Financial analysis for new products, expansions, or any effort involving the expenditure of funds now in the hope of future (but uncertain) payoffs. Project planning and scheduling. Activity times are almost always uncertain, which causes the actual completion time of the project to be uncertain. Determining the customer service impacts of adding or removing serving capacity. For example, what will be the effect of adding a second drive-through window at a banking facility? Evaluating different inventory policies while taking into account demand uncertainty. Evaluating different plant and supply chain policies, such as scheduling and route assignments. SIMULATION WITHIN OM: PUTTING IT ALL TOGETHER Simulation is truly an analytical tool with applications across the enterprise. Consider a capital investment situation such as the launch of a new product. Engineering is involved in the product design, during which simulation can be used to compare different design configurations without having to actually build the product. For example, automakers use computer simulation of cars to test design concepts. Operations is involved in facility design, supply chain configuration and management, manufacturing, and distribution. All of these areas lend themselves to simulation, which is probably the most common tool used in comparing different facility layouts and operating plans. Marketing is involved in the market development, distribution, sales, and customer support aspects of the new product. Since there is typically much uncertainty in the launch of a new product, simulation is a valuable tool for analyzing the effects of uncertainties in market size, price sensitivities, and other factors. Of course, finance is involved in the overall financial attractiveness of the launch of the new product, as well as in questions relating to the financing of the capital investment. These decisions involve much uncertainty, and simulation is a tool to help evaluate the risk level of the project. Supplement Highlights 1 2 A computer simulation is a model that mimics what might happen in reality. Computer simulations model the uncertainty present problem and provide outputs that show how the input uncertainty translates into uncertainty in the output measure. in a system by generating random numbers from known 4 Monte-Carlo Simulation can be conducted using Excel probability distributions. without any add-ins. Commercial add-ins such as Crystal 3 Simulation is a valuable tool because it can simultaneously consider the uncertainty present in many factors of a Ball provide additional functionality that is more difficult to employ using stand-alone Excel.
22 ancmat03.qxd 11/16/06 3:29 PM Page C22 C22 SUPPLEMENT C INTRODUCTION TO SIMULATION 5 Simple discrete-event simulations can be conducted in Excel, but separate software products, such as ProModel, ProcessModel, and Extend, are better suited to modeling uniform, normal, and exponential, among others) are derived from a U(0, 1) random number through mathematical calculations. systems whose state and behavior change over time. 9 Replications of simulation models in Excel can be 6 The simulation modeling process in spreadsheets consists of developing a deterministic model with correct logic, determining the appropriate probability distributions to use for the random inputs, incorporating those distributions in the model itself, running many replications of the simulation performed by copying the entire logic itself or by using Excel s Data Table feature. For simple models where the logic fits into a single row, copying the logic itself is acceptable. However, for more complex models, the Data Table feature should be used. model, and analyzing the simulation results by computing and interpreting summary statistical measures Each time Excel s RAND() function calculates, it generates a uniformly distributed random number between 0 and 1, denoted U(0, 1). Random numbers from probability distributions (e.g., Bernoulli, discrete uniform, general discrete, continuous At a minimum, one should consider basic summary statistics such as the average, standard deviation, minimum, and maximum when interpreting results from a simulation. One should also compute a confidence interval to assess the precision of the estimate for the mean and to determine whether additional replications should be run. It is also a good idea to generate a histogram of the results to see the actual probability distribution of the output measure. Key Terms computer simulation C2 Monte-Carlo Simulation C3 discrete-event simulation C3 deterministic spreadsheet model C4 Bernoulli random variable C7 discrete uniform distribution C7 general discrete distribution C8 discrete distribution C8 continuous distribution C9 continuous uniform distribution C9 normal distribution C11 exponential distribution C11 replication C15 Solved Problems Problem 1 Cables By Us has recently decided to introduce a new product. It will use space in its current facility that is not now in use. The activities required to launch the product have been identified, along with the precedence relationships among them (some activities must be performed by others). Figure C-17 shows the precedence relationship, a table of the activities, and minimum and maximum possible times (in weeks) for each activity. (a) Develop a simulation model to determine the total time the project will take. (b) Use the simulation model with 500 replications to estimate the average, standard deviation, minimum, and maximum time the project will take. Also determine the probability that the project will be completed within 41 weeks, the company s target time frame. Before You Begin For this problem, simulate the length of each path through the network. Generate random activity times for each of the activities, compute the total time needed to complete each connected path, and then determine the critical path. Figure C-19 shows the results of one such simulation. Your results can vary based on the random numbers selected. Solution (a) The time to complete each activity is random. Here we assume that the time in weeks is distributed as discrete uniform between the minimums and maximums shown in the figure. The key to this problem is realizing that the total length of the project is defined by the longest path through the activities. This is traditionally called the critical path. However, when activity times are random, we cannot tell ahead of time which path will be the longest. Therefore, we need to simulate the length of each path and choose the largest one as the time required for the project in one replication. We need to generate random activity times for each of the activities, compute the total length of each path, and finally determine the longest of these path lengths. This will be one replication of the simulation. Figure C-18 shows the completed logic. (b) To run the simulation model, we construct a data table with 500 replications. After running the simulation, we freeze the results and compute summary statistics. Note that if you work through this problem on your own, you will obtain somewhat (but not drastically) different results. This is the nature of simulation. Figure C-19 shows the results.
23 ancmat03.qxd 11/16/06 3:29 PM Page C23 SOLVED PROBLEMS C A B C D E Simulating the Critical Path of a Project Precedence Diagram of Activities A B D E C F Activity Descriptions and Probability Distributions All Probability Distributions Assumed to be Discrete Uniform Min Max A Develop Product Specifications 3 5 B Design Manufacturing Process 4 8 C Source and Purchase Materials 2 4 D Source and Purchase Tooling & Equipment 5 7 E Receive and Install Tooling & Equipment F Receive Materials 2 8 G Pilot Production Run 1 3 H Evaluate Product Design 1 3 I Evaluate Process Performance 2 4 J Write Documentation Report 3 5 K Transition to Manufacturing 1 3 G H I J K FIGURE C-17 Precedence diagram and activities for Cables by Us A B C D E F G Simulating the Critical Path of a Project Precedence Diagram of Activities A B D E C Activity Descriptions and Probability Distributions All Probability Distributions Assumed to be Discrete Uniform Min Max RN Sim Time A Develop Product Specifications B Design Manufacturing Process C Source and Purchase Materials D Source and Purchase Tooling & Equipment E Receive and Install Tooling & Equipment F Receive Materials G Pilot Production Run H Evaluate Product Design I Evaluate Process Performance J Write Documentation Report K Transition to Manufacturing F14: =INT(C14+(D14-C14+1)*E14) (copied down) Path Time C27: =F14+F15+F17+F18+F20+F21+F23+F24 ABDEGHJK 40 C28: =F14+F15+F17+F18+F20+F22+F23+F24 ABDEGIJK 40 C29: =F14+F16+F19+F20+F21+F23+F24 ACFGHJK 24 C30: =F14+F16+F19+F20+F22+F23+F24 ACFGIJK 24 Critical Path Length (Length of Project) 40 F G H I J K E14: =RAND() (copied down) C32: =MAX(C27:C30) FIGURE C-18 Model logic for project planning problem
24 ancmat03.qxd 11/16/06 3:29 PM Page C24 C24 SUPPLEMENT C INTRODUCTION TO SIMULATION FIGURE C-19 Project planning simulation results B C D E F G H I J Data Table C35: =C32 Replication Length Summary Statistics G36: =AVERAGE(C$37:C$536) 40 Average G37: =STDEV(C$37:C$536) 1 42 StdDev 3.24 G38: =MIN(C$37:C$536) 2 44 Minimum 32 G39: =MAX(C$37:C$536) 3 38 Maximum G41: Deadline (weeks) 41 G42: =PERCENTRANK(C37:C536,G41) 6 43 Prob(Meet Deadline) The average completion time of the project is 40.9 weeks, which appears promising regarding our deadline. However, the standard deviation is 3.24 weeks, and the total time in the 500 replications ranged from 32 to 50 weeks. The probability of meeting the deadline can be computed directly using Excel s PERCENTRANK function, as shown in cell G41. The Problem 2 Since graduating from college, JB has been saving money toward a down payment on a house. Currently, JB has $20,000 and wants to invest the money over the next year. Desiring some growth in the investment but also concerned about the risk, JB has selected four investments and has tentatively planned to invest $5000 in each. Figure C-20 shows information about the investments. JB knows that there is always uncertainty in the investing world, so has estimated some parameters for probability distributions. JB believes the money market and bond investments follow the continuous uniform distribution, with minimums and maximums as shown in the figure, under the Parameter1 and Parameter2 columns. Similarly, the growthand-income and aggressive growth funds are assumed to follow a normal distribution, where Parameter1 corresponds to the mean and Parameter2 the standard deviation. (a) Build a simulation model for a one-year investment period. The primary outputs of the model should be the PERCENTRANK function returns the percentage of items that fall below a given value. Unfortunately, the probability that we will meet the deadline is only 0.46, so it may be necessary to somehow speed up some of the activities and/or reduce the uncertainty in the time of some activities in order to increase this probability to an acceptable level. overall portfolio gain (or loss), in both dollar and percentage terms. (b) Run the simulation for 500 replications. What is the average return (dollar and percentage) JB can expect over the next year, and what is the 95 percent confidence interval? JB is concerned about the possibility of losing money. What dollar amount does JB stand to lose with probability.05 if the portfolio is allocated as done here and the investments behave according to the probability distributions selected? Before You Begin For this problem, simulate the return on different investments. Figure C-20 shows the distribution to be used for each investment option as well as the mean investment return value and the investment return standard deviation. Simulate one year s activity and calculate the average return that JB can expect over the next year A B C D Portfolio Allocation Model Investment Alternatives Investment Distribution Parameter1 Parameter2 Money Market Fund Uniform 1.5% 3.0% Bond Fund Uniform -4.0% 10.0% Growth & Income Fund Normal 7.0% 12.0% Aggressive Growth Fund Normal 11.0% 18.0% FIGURE C-20 Investment information for the portfolio problem
25 ancmat03.qxd 11/16/06 3:29 PM Page C25 SOLVED PROBLEMS C25 Key Formulas C12: C5 (D5 C5)*RAND() (copied to C13) C14: NORMINV(RAND(),C7,D7) (copied to C15) D12: B12*(1 C12) (copied to D13:D15) D16: SUM(D12:D15) B18: D16 B16 B19: B18/B16 FIGURE C-21 Simulation logic for portfolio problem A B C D Simulation Logic for Portfolio Investment Invested % Return EndingBal Money Market Fund $5, % $5,077 Bond Fund $5, % $4,907 Growth & Income Fund $5, % $6,056 Aggressive Growth Fund $5, % $6,396 Totals $20,000 $22,435 Gain (loss) on Investment $2,435 Portfolio Return 12.18% Solution (a) The logic for this model is relatively straightforward. We need to create a section that lists the amount invested in each fund, simulate the return from each investment, and calculate the ending value of each investment and the portfolio. From this, we can calculate the overall portfolio gain (loss) in dollar and percentage terms. Figure C-21 shows the simulation logic for one replication. The key formulas are provided. Cells C12:C15 simulate the returns of each investment. The money market and bond investments follow the uniform distribution, and the growth-and-income and aggressive growth investments follow the normal distribution. (b) As with Solved Problem 1, the Data Table command is used to run 500 replications. Here, however, we have two outputs of the model to track. We create another column of the Data Table for this and include this column in the selection before going to the Data/Table dialog box. After running the 500 replications, we freeze the results and compute summary statistics, confidence intervals, and percentiles. See Figure C-22. From the summary statistics, we see the average return of the portfolio is $1204 or 6.02 percent (again, your values will differ somewhat from these due to the nature of simulation). Computing the 95 percent confidence interval, we are 95 percent confident the true average return is somewhere in the interval from $1107 to $1301. We could improve the precision of the estimate of the average return by running additional replications. Certainly, knowing the average return is helpful, but it tends to oversimplify the investment decision. JB is concerned about losing money, since this is money earmarked for a down payment on a house. A useful way to quantify the risk of losing a certain amount of money is through using percentiles of the returns distribution. The value ($610) (i.e., a loss of $610) in cell F35 means that the portfolio is predicted to lose $610 or more approximately 5 percent of the time. This is termed the 5 th percentile of the returns distribution. Literally, it is the 5 th percentile of the cumulative distribution of portfolio returns. Using percentiles of the returns distribution is a very common practice in risk analysis. Similarly, the 25 th percentile is $503. This means that the portfolio should have a return $503 about 25 percent of the time, or conversely, a return $503 about 75 percent of the time. The 50 th percentile is really the median, with a 50 percent chance of falling above/ below this value. Going to the extreme upper end, the 95 th percentile is similar to the 5 th percentile. We should have a one-year return $2960 with.95 probability; stated another way, there is only a.05 probability of having a return $2960. Do not confuse the percentiles with the confidence interval. The percentiles provide us with probabilities of a given dollar (or percentage) return for a single one-year period. The confidence interval provides information about the precision of the estimate of the average (mean) portfolio return that would be obtained if we invested in this way over a very long period of time. Both concepts are important, but they are not the same! Finally, Figure C-23 shows a histogram of the dollar portfolio return. Notice that even though we had two investments whose returns were uniformly distributed, the overall return of the portfolio looks very much like a normal distribution. Actually, this should not be a surprise, as the central limit theorem suggests that this distribution should be normal. The histogram adds a graphical perspective to the results and complements the summary statistics and the percentile results. The cumulative distribution function is also plotted and uses the scale on the right side of the graph. Additional percentiles can be approximated using the cumulative distribution function graph.
26 ancmat03.qxd 11/16/06 3:29 PM Page C26 C26 SUPPLEMENT C INTRODUCTION TO SIMULATION FIGURE C-22 Simulation results for portfolio problem A B C D E F G Data Table for Simulation Replications Replication Gain (Loss) Return Summary Statistics $2, % Gain (Loss) Return 1 ($791) -3.96% Average $1, % 2 $ % StdDev $1, % 3 $1, % Minimum ($2,480) % 4 B24: =B18 $ % C24: =B19 Maximum $5, % 5 $5, % 6 $1, % 95% Confidence Interval on Average 7 ($291) -1.45% Lower CL $1, % 8 $ % Upper CL $1, % 9 $ % 10 $ % Percentiles 11 $3, % 5% ($610) -3.05% 12 $ % 25% $ % 13 $ % 50% $1, % 14 $1, % 75% $1, % 15 $1, % 95% $2, % 16 $ % 17 ($102) -0.51% 499 $ % 500 $ % F35: =PERCENTILE(B$25:B$524,$E35) (copied to F35:G39 to compute percentiles of the results distributions) FIGURE C-23 Histogram of portfolio dollar returns Frequency Histogram of Portfolio Gain (Loss) (n = 500 replications) % 90.00% 80.00% 70.00% 60.00% 50.00% 40.00% 30.00% 20.00% 10.00% 0 $2,480 $1,792 $1,103 $415 $273 $961 $1,650 $2,338 Upper Endpoint of Category $3,026 $3,714 $4,403 More.00% Frequency Cumulative % Problem 3 HiLo Bank is concerned about customer waiting times in its drive-through facility. There is a single line for the live teller (a separate line forms for the ATM, which is not a concern at this point). Customers arrive to the live teller at a rate of about 10 per hour, or one every 0.10 hour (one every 6 minutes). The teller is able to serve about 15 customers per hour, so the average service time is hour (4 minutes). Obviously if customers truly arrived exactly every 6 minutes, and each customer took 4 minutes
27 ancmat03.qxd 11/16/06 3:29 PM Page C27 SOLVED PROBLEMS C27 to serve, no line would ever form. There is variability in both the arrival and service patterns, however. The bank has heard of their competitors using simulation to help analyze their service and processing facilities, so it would like to use simulation here. Assume that both the time between customer arrivals and the service times are exponentially distributed, with the means of 0.10 hour and hour, respectively. Develop a simulation model that allows one to analyze customer waiting time and the number of customers waiting. Consider 500 customers that arrive over time to the drive-through service facility. For a single set of 500 customers, what are the average waiting time and the average number waiting in line? What are the maximum waiting time and maximum number waiting? Before You Begin In this problem, simulate customer waiting times at a drivethrough banking facility. Identify the customer arrival rate and the teller s service rate. The mean values are needed to simulate the waiting line system. Calculate the average waiting time per customer and the average number of customers waiting in line. Solution This problem is designed to illustrate a different type of simulation model. This is really a discrete-event problem, because the state of the system changes over time, having customer arrivals (number in the system increases by 1) and customer departures (number in the system decreases by 1). This is an example of a queuing, or waiting line, situation, which is obviously very common in the real world. Simulation is a powerful and flexible tool able to help analyze these situations and improve decision making. Although an Excel spreadsheet approach will be provided here, discrete-event simulations are best created in a product specifically designed for that purpose, as noted earlier in the chapter. Figure C-24 shows the input and output sections of this model. The arrival and service rates are entered and converted into the average time between arrivals and the average service time, respectively. Results for over 500 customers include the average number in the queue, the maximum number in the queue, the average waiting time, the maximum waiting time, and the percent of time the teller is idle. Perhaps surprisingly, the maximum queue length was 16 cars at some point in the process of serving 500 customers, even though the average number in the queue was a reasonable 1.48 cars. The average waiting time for a customer was 0.15 hour, or about 9.2 minutes, which is probably a bit on the high side. The maximum waiting time for a customer was 1.33 hours, or 80 minutes (assuming the customer would have stuck around, which is highly unlikely!). Despite these somewhat disappointing performance measures, the teller was idle 36 percent of the time. The average performance doesn t seem too bad, but for the worst-case customer, it is are clearly unacceptable, and a system operating like this would likely generate customer complaints. These performance measures are somewhat surprising, since a customer arrives, on average, every 6 minutes, and we can serve a customer, again on average, every 4 minutes. The key, of course, is the on average. It is the variability in the randomness of customer arrivals and service times that causes these disappointing performance measures. The bank should probably consider ways to either speed up service or encourage existing drive-through customers to complete business another way, such as inside the bank, at the ATM, or over the Internet. The actual simulation model (for the first 10 customers) is shown in Figure C-25 (based on Evans and Olson, 1998). Before presenting the formulas for this model, we ll describe the columns from left to right. Each row of the logic corresponds to one customer. Each customer goes through a standard process: a customer arrives to the system, waits in the line if the teller is busy, starts service either upon arrival or when the teller finishes with the previous customer, finishes business at the bank, and departs. The columns of the model take each customer through this process, with some additional columns to keep track of system performance. Column D generates a random A HiLo Bank Drive-Through Input Parameters Mean arrival rate (per hour) 10 Mean service rate (per hour) 15 Mean time between arrivals (hr) 0.1 Mean service time (hr) Simulation Results (500 customers) Average Num in Queue Max Num in Queue 16 Average Waiting Time (hr) Max Waiting Time (hr) % idle time 36% B FIGURE C-24 Input and output sections of HiLo model
28 ancmat03.qxd 11/16/06 3:29 PM Page C28 C28 SUPPLEMENT C INTRODUCTION TO SIMULATION FIGURE C-25 Simulation model for HiLo teller problem (based on Evans and Olson, 1998) C D E F G H I J K L M N O P Q TimeBetw Arrival No. In Start Service Completion Wait Idle Cum. No. Avg. No. Cum. Wait Avg. Wait Cum. Idle Avg. % Customer Arrivals Time Queue Time Time Time Time Time in Queue in Queue Time Time Time Idle Time % % % % % % % % % % interarrival time, or the time of the customer s arrival after the previous customer s arrival. This approach is very common in modeling queuing systems. Column E computes the customer s actual arrival time (in hours since the drive-through opened). Column F determines the number of people waiting in the queue after the customer arrives. If the server is idle when the customer arrives, the queue remains empty (since service can start immediately). On the other hand, if the server is busy, the customer joins the queue and the number in the queue statistic increases by 1. Column G computes the time the customer actually starts service, again depending on whether she had to wait for the customer ahead of her to finish or whether she could start service immediately upon arrival. Column H gener- ates the random service time from the service time distribution. Column I computes the time that service gets completed. Column J computes the time the customer waited as the difference between the starting time and the arrival time. Column K computes the time, if any, that the server was idle since the last customer (which happens only if the queue is empty). Columns L Q are used to keep track of the performance measures of the system. Key formulas are provided. These formulas correspond to customer #2 and are all copied down in the model through customer #500. Some formulas for customer #1 are slightly different since the first customer is assumed to arrive to an empty system. Key Formulas (all copied down) Time Between Arrivals D5: B$7*LN(RAND()) Arrival Time E5: E4 D5 Number in Queue F5: C5 MATCH(E5,$I$3:I4,1) Start Time G5: MAX(E5,I4) Service Time H5: B$8*LN(RAND()) Completion Time I5: G5 H5 Wait Time J5: G5 E5 Idle Time K5: G5 I4 Cumulative Number in Queue L5: F5*(E5 E4) L4 Average Number in Queue M5: L5/E5 Cumulative Wait Time N5: N4 J5 Average Wait Time O5: N5/C5 Cumulative Idle Time P5: P4 K5 Average % Idle Time Q5: P5/I5 Clearly, there is a lot of bookkeeping in modeling a system such as this. Although it is possible to model these systems in spreadsheets, they are not the best choice for highly dynamic systems. Actually, the system here is quite simple compared to the complexity present in the real world. Here there is only one server; most real-world systems have multiple servers, and the customer (or the product in a manufacturing simulation) goes through several processes with different servers or machines. Discrete-event simulation products such as those mentioned in this chapter are ideally suited for these complex systems, because they have all of the bookkeeping functions built in already, and the modeler can focus on defining how the process works.
29 ancmat03.qxd 11/16/06 3:29 PM Page C29 PROBLEMS C29 Discussion Questions 1. Give an example of a situation you faced that involved uncertainty. How did you deal with the uncertainty? 2. What decisions do operations managers face that involve uncertainty? How could simulation be used to assess the effects of that uncertainty? Problems 1. (a) Generate 50 random numbers from a normal distribution with mean 10 and standard deviation 2. Compute summary statistics (average, standard deviation, minimum, maximum) and a 95 percent confidence interval for the mean. Also generate a histogram. (b) Repeat (a), except with 500 random numbers. (c) Compare the results from (a) and (b). How does the sample size affect the results? Are you surprised at any of the findings? 2. Repeat (a) (c) of Problem 1, except with a continuous uniform distribution between 3 and Repeat (a) (c) of Problem 1, except with an exponential distribution with a mean of SaveMart is a super-center discount store. For the upcoming year, the various departments have submitted their sales growth forecasts. The store manager needs to produce an overall sales forecast for the entire store. Data for the departments are given. Growth Rates Department Current Sales Minimum Maximum Grocery $4,257,000 3% 5% Hardware & $876,000 0% 7% Automotive Toys $2,354,000 8% 12% Apparel 1,278,000 4% 9% (a) Build a spreadsheet model to simulate SaveMart s total sales for the upcoming year. (b) Run 500 replications of the model and calculate summary statistics. What is the expected total revenue? (c) What are the 25 th,50 th, and 75 th percentiles of revenue? Interpret these values in meaningful language to present to SaveMart s management. 5. Chris is responsible for staffing a 911 operation. During any given night, the number of calls received is uniformly distributed between 92 and 145. The average time each call requires of a 911 operator is normally distributed with a mean of 6.2 minutes and a standard deviation of 1.2 minutes. This time includes time on the phone as well as certain administrative duties associated with each call. Due to the stress level of the position, operators must take a number of breaks during their shifts, so a full-time shift consists of no more than six hours taking calls. 3. How might a decision maker use the information presented in a histogram of simulation results, such as that shown in Figure C-15? (a) Build a spreadsheet model to simulate the total phone time required in a given night. Run 500 replications of the model and compute summary statistics. (b) How many operators should be scheduled if Chris needs to be 90 percent sure there will be enough operators to handle all the calls? 6. A 100-seat airplane is used on a particular route on FlyFast Airlines. Seats sell for $400, and this cost is refundable. Therefore, revenue is received only from passengers actually boarding the airplane. At this price, there is sufficient demand to sell more than 100 seats, because some passengers do not show up for the flight. Therefore, FlyFast typically overbooks the flight. On average, 15 percent of the ticketed passengers do not show up to fly, but this varies uniformly from 5 percent to 25 percent for individual flights. In the event that more ticketed passengers show up for the flight than there are seats available, FlyFast must pay another airline to fly the passenger and in some cases must provide a voucher to the passenger for meals or lodging. Assume the cost per passenger bumped is $600. FlyFast wants to determine the number of tickets to sell in order to maximize net revenue (total revenue minus the bumping costs). (a) Develop a spreadsheet model to simulate one occurrence of this flight. (b) Assume 100 tickets are sold. Run a simulation (with 250 replications) to determine the average net revenue. (c) Vary the number of tickets sold, and determine the number to sell that will maximize the average net revenue. 7. Jamie is saving money in hopes of purchasing a house in five years. Jamie has no money saved now, but each month Jamie can invest $220 toward the down payment. A $15,000 down payment is desired. Two investment options are available. One, fund A, is relatively low risk with a monthly average rate of return of 0.5 percent, and a monthly standard deviation of 0.58 percent, normally distributed. The other fund, B, has a monthly average return of 0.83 percent with a monthly standard deviation of 4.33 percent, again normally distributed. (a) Create a model to simulate sixty months of investment activity for each fund. (b) Run 250 replications of this model, and compute summary statistics. Also compute the probability that Jamie will reach the goal of $15,000 with each investment. (c) Which investment should be chosen if Jamie wants to maximize the average balance at the end of sixty months? Which should be chosen if the probability of meeting the goal is to be maximized? Explain these findings.
30 ancmat03.qxd 11/16/06 3:29 PM Page C30 C30 SUPPLEMENT C INTRODUCTION TO SIMULATION CASE: Car Replacement Decision RG faces a car decision dilemma. Currently, RG s 10-year-old car is in need of major repairs, at a cost of $2000. RG is trying to decide whether to fix this car, purchase a used car (at a cost of $8000), or purchase a new car ($16,000). If RG purchases a used or new car, the old car will be donated to charity. RG plans to keep any car until it is virtually unusable. Uncertainty is present in the lives of the cars. If RG s current car is repaired, RG estimates that the useful remaining life is uniformly distributed between 0.5 and 3 years. With a used car, the estimated life is uniformly distributed between 2 and 8 years, and with a new car, between 8 and 15 years. To compare the purchase or, in the case of the current car, repair costs, RG has decided to focus on the first year of ownership. However, to do this, the purchase/repair costs must be fairly allocated. Since a new car will last longer than a repaired old car, the useful life must be part of the cost calculation. RG has decided that a 4 percent annual interest rate is reasonable, applied over the useful life of the car. For example, if RG fixes the current car, and it ends up lasting 1.2 years, the cost allocated to the first year is calculated using Excel s PMT function, as PMT(0.04, 1.2, 2000), resulting in $1740. That is, the cost out of the $2000 total repair cost allocated to the first year and adjusted for the 4 percent interest rate is $1740. Other costs include repairs outside of normal maintenance, which should be the same for all three choices. RG expects extra repair costs for the year on the currently owned car to be uniformly distributed between $200 and $1000. For a used car, they would vary uniformly between $0 and $800, and for a new car, there would be no repair costs. RG wants to use simulation to help determine the best alternative. Whereas the average cost of ownership is important, so is the uncertainty of that cost as well. Develop and use a simulation model to address this issue, and provide a recommendation to RG. On-Line Resource 1. Spreadsheets for Figures C-2, C-5, C-6, C-7, C-12, C-13, C-14, C-15, C-16; Example C.1; and Solved Problems 1, 2, and 3 are available on the Cd. 2. The Retirement Income Calculator provided by T. Rowe Price Investment Services uses Monte-Carlo Simulation to estimate the probability of achieving your retirement financial goals. The tool can be found at troweprice.com/ric/ric/. 3. Financial Engines ( offers financial planning assistance based upon simulations of future economic scenarios. 4. Read the latest Simulation Software survey from OR/MS Today, which can be found at surveys/simulation/simulation.html. Get information from at least two of the firms listed there regarding their simulation products. Compare their capabilities and the types of problems they are designed to address. Find a site that discusses some of their case studies, and prepare a summary. Find a site offering a trial version and/or tutorial of their product. Install the product and run an example model. Selected Bibliography Evans, J., and D. Olson. Introduction to Simulation and Risk Analysis. Upper Saddle River, N.J.: Prentice Hall, Ragsdale, Cliff T. Spreadsheet Modeling & Decision Analysis, Fourth Edition. Stamford, Conn.: Thomson, Winston, Wayne L., and S. Christian Albright. Practical Management Science (with CD-ROM Update), Second Edition. Duxbury, 2003.
Chapter 3 RANDOM VARIATE GENERATION
Chapter 3 RANDOM VARIATE GENERATION In order to do a Monte Carlo simulation either by hand or by computer, techniques must be developed for generating values of random variables having known distributions.
Data Analysis Tools. Tools for Summarizing Data
Data Analysis Tools This section of the notes is meant to introduce you to many of the tools that are provided by Excel under the Tools/Data Analysis menu item. If your computer does not have that tool
How to Use a Data Spreadsheet: Excel
How to Use a Data Spreadsheet: Excel One does not necessarily have special statistical software to perform statistical analyses. Microsoft Office Excel can be used to run statistical procedures. Although
How To Use Excel With A Calculator
Functions & Data Analysis Tools Academic Computing Services www.ku.edu/acs Abstract: This workshop focuses on the functions and data analysis tools of Microsoft Excel. Topics included are the function
Monte Carlo Simulation. SMG ITS Advanced Excel Workshop
Advanced Excel Workshop Monte Carlo Simulation Page 1 Contents Monte Carlo Simulation Tutorial... 2 Example 1: New Marketing Campaign... 2 VLOOKUP... 5 Example 2: Revenue Forecast... 6 Pivot Table... 8
Chapter 9 Monté Carlo Simulation
MGS 3100 Business Analysis Chapter 9 Monté Carlo What Is? A model/process used to duplicate or mimic the real system Types of Models Physical simulation Computer simulation When to Use (Computer) Models?
Building and Using Spreadsheet Decision Models
Chapter 9 Building and Using Spreadsheet Decision Models Models A model is an abstraction or representation of a real system, idea, or object. Models could be pictures, spreadsheets, or mathematical relationships
ModelRisk for Insurance and Finance. Quick Start Guide
ModelRisk for Insurance and Finance Quick Start Guide Copyright 2008 by Vose Software BVBA, All rights reserved. Vose Software Iepenstraat 98 9000 Gent, Belgium www.vosesoftware.com ModelRisk is owned
Using Excel (Microsoft Office 2007 Version) for Graphical Analysis of Data
Using Excel (Microsoft Office 2007 Version) for Graphical Analysis of Data Introduction In several upcoming labs, a primary goal will be to determine the mathematical relationship between two variable
In-Depth Guide Advanced Spreadsheet Techniques
In-Depth Guide Advanced Spreadsheet Techniques Learning Objectives By reading and completing the activities in this chapter, you will be able to: Create PivotTables using Microsoft Excel Create scenarios
sensitivity analysis. Using Excel 2.1 MANUAL WHAT-IF ANALYSIS 2.2 THRESHOLD VALUES
Sensitivity Analysis Using Excel The main goal of sensitivity analysis is to gain insight into which assumptions are critical, i.e., which assumptions affect choice. The process involves various ways of
seven Statistical Analysis with Excel chapter OVERVIEW CHAPTER
seven Statistical Analysis with Excel CHAPTER chapter OVERVIEW 7.1 Introduction 7.2 Understanding Data 7.3 Relationships in Data 7.4 Distributions 7.5 Summary 7.6 Exercises 147 148 CHAPTER 7 Statistical
MBA 611 STATISTICS AND QUANTITATIVE METHODS
MBA 611 STATISTICS AND QUANTITATIVE METHODS Part I. Review of Basic Statistics (Chapters 1-11) A. Introduction (Chapter 1) Uncertainty: Decisions are often based on incomplete information from uncertain
TEACHING SIMULATION WITH SPREADSHEETS
TEACHING SIMULATION WITH SPREADSHEETS Jelena Pecherska and Yuri Merkuryev Deptartment of Modelling and Simulation Riga Technical University 1, Kalku Street, LV-1658 Riga, Latvia E-mail: [email protected],
Drawing a histogram using Excel
Drawing a histogram using Excel STEP 1: Examine the data to decide how many class intervals you need and what the class boundaries should be. (In an assignment you may be told what class boundaries to
FTS Real Time Client: Equity Portfolio Rebalancer
FTS Real Time Client: Equity Portfolio Rebalancer Many portfolio management exercises require rebalancing. Examples include Portfolio diversification and asset allocation Indexation Trading strategies
Chapter 4 Lecture Notes
Chapter 4 Lecture Notes Random Variables October 27, 2015 1 Section 4.1 Random Variables A random variable is typically a real-valued function defined on the sample space of some experiment. For instance,
TEST 2 STUDY GUIDE. 1. Consider the data shown below.
2006 by The Arizona Board of Regents for The University of Arizona All rights reserved Business Mathematics I TEST 2 STUDY GUIDE 1 Consider the data shown below (a) Fill in the Frequency and Relative Frequency
Understanding Confidence Intervals and Hypothesis Testing Using Excel Data Table Simulation
Understanding Confidence Intervals and Hypothesis Testing Using Excel Data Table Simulation Leslie Chandrakantha [email protected] Department of Mathematics & Computer Science John Jay College of
Notes on Excel Forecasting Tools. Data Table, Scenario Manager, Goal Seek, & Solver
Notes on Excel Forecasting Tools Data Table, Scenario Manager, Goal Seek, & Solver 2001-2002 1 Contents Overview...1 Data Table Scenario Manager Goal Seek Solver Examples Data Table...2 Scenario Manager...8
Introduction to Statistical Computing in Microsoft Excel By Hector D. Flores; [email protected], and Dr. J.A. Dobelman
Introduction to Statistical Computing in Microsoft Excel By Hector D. Flores; [email protected], and Dr. J.A. Dobelman Statistics lab will be mainly focused on applying what you have learned in class with
Appendix 2.1 Tabular and Graphical Methods Using Excel
Appendix 2.1 Tabular and Graphical Methods Using Excel 1 Appendix 2.1 Tabular and Graphical Methods Using Excel The instructions in this section begin by describing the entry of data into an Excel spreadsheet.
Commonly Used Excel Formulas
Microsoft Excel 2007 Advanced Formulas Windows XP Look Up Values in a List of Data: Commonly Used Excel Formulas Let's say you want to look up an employee's phone extension by using their badge number
Activity 3.7 Statistical Analysis with Excel
Activity 3.7 Statistical Analysis with Excel Introduction Engineers use various tools to make their jobs easier. Spreadsheets can greatly improve the accuracy and efficiency of repetitive and common calculations;
Important Probability Distributions OPRE 6301
Important Probability Distributions OPRE 6301 Important Distributions... Certain probability distributions occur with such regularity in real-life applications that they have been given their own names.
Intro to Simulation (using Excel)
Intro to Simulation (using Excel) DSC340 Mike Pangburn Generating random numbers in Excel Excel has a RAND() function for generating random numbers The numbers are really coming from a formula and hence
Getting Started with Excel 2008. Table of Contents
Table of Contents Elements of An Excel Document... 2 Resizing and Hiding Columns and Rows... 3 Using Panes to Create Spreadsheet Headers... 3 Using the AutoFill Command... 4 Using AutoFill for Sequences...
Chapter 12 Simulation 537
Simulation, CONTENTS 12.1 RISK ANALYSIS PortaCom Project What-If Analysis Simulation Simulation of the PortaCom Project 12.2 INVENTORY SIMULATION Butler Inventory Simulation 12.3 WAITING LINE SIMULATION
0 Introduction to Data Analysis Using an Excel Spreadsheet
Experiment 0 Introduction to Data Analysis Using an Excel Spreadsheet I. Purpose The purpose of this introductory lab is to teach you a few basic things about how to use an EXCEL 2010 spreadsheet to do
SOME EXCEL FORMULAS AND FUNCTIONS
SOME EXCEL FORMULAS AND FUNCTIONS About calculation operators Operators specify the type of calculation that you want to perform on the elements of a formula. Microsoft Excel includes four different types
University of Southern California Marshall Information Services
University of Southern California Marshall Information Services Determine Breakeven Price Using Excel - Using Goal Seek, Data Tables, Vlookup & Charts This guide covers how to determine breakeven price
Probability Distributions
CHAPTER 5 Probability Distributions CHAPTER OUTLINE 5.1 Probability Distribution of a Discrete Random Variable 5.2 Mean and Standard Deviation of a Probability Distribution 5.3 The Binomial Distribution
Engineering Problem Solving and Excel. EGN 1006 Introduction to Engineering
Engineering Problem Solving and Excel EGN 1006 Introduction to Engineering Mathematical Solution Procedures Commonly Used in Engineering Analysis Data Analysis Techniques (Statistics) Curve Fitting techniques
Data exploration with Microsoft Excel: univariate analysis
Data exploration with Microsoft Excel: univariate analysis Contents 1 Introduction... 1 2 Exploring a variable s frequency distribution... 2 3 Calculating measures of central tendency... 16 4 Calculating
MATH 140 Lab 4: Probability and the Standard Normal Distribution
MATH 140 Lab 4: Probability and the Standard Normal Distribution Problem 1. Flipping a Coin Problem In this problem, we want to simualte the process of flipping a fair coin 1000 times. Note that the outcomes
6.4 Normal Distribution
Contents 6.4 Normal Distribution....................... 381 6.4.1 Characteristics of the Normal Distribution....... 381 6.4.2 The Standardized Normal Distribution......... 385 6.4.3 Meaning of Areas under
Simulation and Lean Six Sigma
Hilary Emmett, 22 August 2007 Improve the quality of your critical business decisions Agenda Simulation and Lean Six Sigma What is Monte Carlo Simulation? Loan Process Example Inventory Optimization Example
BNG 202 Biomechanics Lab. Descriptive statistics and probability distributions I
BNG 202 Biomechanics Lab Descriptive statistics and probability distributions I Overview The overall goal of this short course in statistics is to provide an introduction to descriptive and inferential
Using simulation to calculate the NPV of a project
Using simulation to calculate the NPV of a project Marius Holtan Onward Inc. 5/31/2002 Monte Carlo simulation is fast becoming the technology of choice for evaluating and analyzing assets, be it pure financial
5 IN THIS CHAPTER. Working Capital and Cash Flow Analysis
Working Capital and Cash Flow Analysis Cash is the most liquid of all assets, so many managers are particularly interested in how much cash is available to a business at any given time. Because the flow
Below is a very brief tutorial on the basic capabilities of Excel. Refer to the Excel help files for more information.
Excel Tutorial Below is a very brief tutorial on the basic capabilities of Excel. Refer to the Excel help files for more information. Working with Data Entering and Formatting Data Before entering data
Break-Even and Leverage Analysis
CHAPTER 6 Break-Even and Leverage Analysis After studying this chapter, you should be able to: 1. Differentiate between fixed and variable costs. 2. Calculate operating and cash break-even points, and
Table of Contents TASK 1: DATA ANALYSIS TOOLPAK... 2 TASK 2: HISTOGRAMS... 5 TASK 3: ENTER MIDPOINT FORMULAS... 11
Table of Contents TASK 1: DATA ANALYSIS TOOLPAK... 2 TASK 2: HISTOGRAMS... 5 TASK 3: ENTER MIDPOINT FORMULAS... 11 TASK 4: ADD TOTAL LABEL AND FORMULA FOR FREQUENCY... 12 TASK 5: MODIFICATIONS TO THE HISTOGRAM...
Tools for Excel Modeling. Introduction to Excel2007 Data Tables and Data Table Exercises
Tools for Excel Modeling Introduction to Excel2007 Data Tables and Data Table Exercises EXCEL REVIEW 2009-2010 Preface Data Tables are among the most useful of Excel s tools for analyzing data in spreadsheet
Gamma Distribution Fitting
Chapter 552 Gamma Distribution Fitting Introduction This module fits the gamma probability distributions to a complete or censored set of individual or grouped data values. It outputs various statistics
Finite Mathematics Using Microsoft Excel
Overview and examples from Finite Mathematics Using Microsoft Excel Revathi Narasimhan Saint Peter's College An electronic supplement to Finite Mathematics and Its Applications, 6th Ed., by Goldstein,
AMS 5 CHANCE VARIABILITY
AMS 5 CHANCE VARIABILITY The Law of Averages When tossing a fair coin the chances of tails and heads are the same: 50% and 50%. So if the coin is tossed a large number of times, the number of heads and
NCSS Statistical Software Principal Components Regression. In ordinary least squares, the regression coefficients are estimated using the formula ( )
Chapter 340 Principal Components Regression Introduction is a technique for analyzing multiple regression data that suffer from multicollinearity. When multicollinearity occurs, least squares estimates
The Fourier Analysis Tool in Microsoft Excel
The Fourier Analysis Tool in Microsoft Excel Douglas A. Kerr Issue March 4, 2009 ABSTRACT AD ITRODUCTIO The spreadsheet application Microsoft Excel includes a tool that will calculate the discrete Fourier
Interpreting Data in Normal Distributions
Interpreting Data in Normal Distributions This curve is kind of a big deal. It shows the distribution of a set of test scores, the results of rolling a die a million times, the heights of people on Earth,
Justifying Simulation. Why use simulation? Accurate Depiction of Reality. Insightful system evaluations
Why use simulation? Accurate Depiction of Reality Anyone can perform a simple analysis manually. However, as the complexity of the analysis increases, so does the need to employ computer-based tools. While
How To Check For Differences In The One Way Anova
MINITAB ASSISTANT WHITE PAPER This paper explains the research conducted by Minitab statisticians to develop the methods and data checks used in the Assistant in Minitab 17 Statistical Software. One-Way
6 Scalar, Stochastic, Discrete Dynamic Systems
47 6 Scalar, Stochastic, Discrete Dynamic Systems Consider modeling a population of sand-hill cranes in year n by the first-order, deterministic recurrence equation y(n + 1) = Ry(n) where R = 1 + r = 1
Understanding Margins
Understanding Margins Frequently asked questions on margins as applicable for transactions on Cash and Derivatives segments of NSE and BSE Jointly published by National Stock Exchange of India Limited
Revised Version of Chapter 23. We learned long ago how to solve linear congruences. ax c (mod m)
Chapter 23 Squares Modulo p Revised Version of Chapter 23 We learned long ago how to solve linear congruences ax c (mod m) (see Chapter 8). It s now time to take the plunge and move on to quadratic equations.
CHAPTER 2 Estimating Probabilities
CHAPTER 2 Estimating Probabilities Machine Learning Copyright c 2016. Tom M. Mitchell. All rights reserved. *DRAFT OF January 24, 2016* *PLEASE DO NOT DISTRIBUTE WITHOUT AUTHOR S PERMISSION* This is a
Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay
Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay Lecture - 17 Shannon-Fano-Elias Coding and Introduction to Arithmetic Coding
FINANCIAL ECONOMICS OPTION PRICING
OPTION PRICING Options are contingency contracts that specify payoffs if stock prices reach specified levels. A call option is the right to buy a stock at a specified price, X, called the strike price.
Understanding Margins. Frequently asked questions on margins as applicable for transactions on Cash and Derivatives segments of NSE and BSE
Understanding Margins Frequently asked questions on margins as applicable for transactions on Cash and Derivatives segments of NSE and BSE Jointly published by National Stock Exchange of India Limited
EXCEL Tutorial: How to use EXCEL for Graphs and Calculations.
EXCEL Tutorial: How to use EXCEL for Graphs and Calculations. Excel is powerful tool and can make your life easier if you are proficient in using it. You will need to use Excel to complete most of your
Assignment 2: Option Pricing and the Black-Scholes formula The University of British Columbia Science One CS 2015-2016 Instructor: Michael Gelbart
Assignment 2: Option Pricing and the Black-Scholes formula The University of British Columbia Science One CS 2015-2016 Instructor: Michael Gelbart Overview Due Thursday, November 12th at 11:59pm Last updated
Risk Analysis and Quantification
Risk Analysis and Quantification 1 What is Risk Analysis? 2. Risk Analysis Methods 3. The Monte Carlo Method 4. Risk Model 5. What steps must be taken for the development of a Risk Model? 1.What is Risk
Using Analysis Tools: Goal Seek, Solver, and Data Tables
CHAPTER Using Analysis Tools: Goal Seek, Solver, and Data Tables In this chapter Analyzing Your Data with Excel 646 Using Goal Seek 646 Using Solver 650 Creating Amortization Tables to Calculate Mortgage
6 3 The Standard Normal Distribution
290 Chapter 6 The Normal Distribution Figure 6 5 Areas Under a Normal Distribution Curve 34.13% 34.13% 2.28% 13.59% 13.59% 2.28% 3 2 1 + 1 + 2 + 3 About 68% About 95% About 99.7% 6 3 The Distribution Since
Risk Analysis Overview
What Is Risk? Uncertainty about a situation can often indicate risk, which is the possibility of loss, damage, or any other undesirable event. Most people desire low risk, which would translate to a high
SECTION 2-1: OVERVIEW SECTION 2-2: FREQUENCY DISTRIBUTIONS
SECTION 2-1: OVERVIEW Chapter 2 Describing, Exploring and Comparing Data 19 In this chapter, we will use the capabilities of Excel to help us look more carefully at sets of data. We can do this by re-organizing
CHAPTER 7 INTRODUCTION TO SAMPLING DISTRIBUTIONS
CHAPTER 7 INTRODUCTION TO SAMPLING DISTRIBUTIONS CENTRAL LIMIT THEOREM (SECTION 7.2 OF UNDERSTANDABLE STATISTICS) The Central Limit Theorem says that if x is a random variable with any distribution having
Numbers 101: Cost and Value Over Time
The Anderson School at UCLA POL 2000-09 Numbers 101: Cost and Value Over Time Copyright 2000 by Richard P. Rumelt. We use the tool called discounting to compare money amounts received or paid at different
ESTIMATING THE DISTRIBUTION OF DEMAND USING BOUNDED SALES DATA
ESTIMATING THE DISTRIBUTION OF DEMAND USING BOUNDED SALES DATA Michael R. Middleton, McLaren School of Business, University of San Francisco 0 Fulton Street, San Francisco, CA -00 -- [email protected]
MICROSOFT EXCEL 2007-2010 FORECASTING AND DATA ANALYSIS
MICROSOFT EXCEL 2007-2010 FORECASTING AND DATA ANALYSIS Contents NOTE Unless otherwise stated, screenshots in this book were taken using Excel 2007 with a blue colour scheme and running on Windows Vista.
MBA Jump Start Program
MBA Jump Start Program Module 2: Mathematics Thomas Gilbert Mathematics Module Online Appendix: Basic Mathematical Concepts 2 1 The Number Spectrum Generally we depict numbers increasing from left to right
11.3 BREAK-EVEN ANALYSIS. Fixed and Variable Costs
385 356 PART FOUR Capital Budgeting a large number of NPV estimates that we summarize by calculating the average value and some measure of how spread out the different possibilities are. For example, it
Introduction to Data Tables. Data Table Exercises
Tools for Excel Modeling Introduction to Data Tables and Data Table Exercises EXCEL REVIEW 2000-2001 Data Tables are among the most useful of Excel s tools for analyzing data in spreadsheet models. Some
Calc Guide Chapter 9 Data Analysis
Calc Guide Chapter 9 Data Analysis Using Scenarios, Goal Seek, Solver, others Copyright This document is Copyright 2007 2011 by its contributors as listed below. You may distribute it and/or modify it
How To Use Excel 4.4.2.2 On A Computer Or A Computer With A Cell Phone Or Cell Phone
M04_GASK8219_01_SE_C04E.qxd 6/30/10 7:53 AM Page 241 chapter 4 Excel 2010 Use Financial and Lookup Functions, Define Names, and Validate Data OUTCOMES At the end of this chapter you will be able to: PROJECT
STT315 Chapter 4 Random Variables & Probability Distributions KM. Chapter 4.5, 6, 8 Probability Distributions for Continuous Random Variables
Chapter 4.5, 6, 8 Probability Distributions for Continuous Random Variables Discrete vs. continuous random variables Examples of continuous distributions o Uniform o Exponential o Normal Recall: A random
MICROSOFT EXCEL STEP BY STEP GUIDE
IGCSE ICT SECTION 14 DATA ANALYSIS MICROSOFT EXCEL STEP BY STEP GUIDE Mark Nicholls ICT Lounge Data Analysis Self Study Guide Contents Learning Outcomes Page 3 What is a Data Model?... Page 4 Spreadsheet
Betting with the Kelly Criterion
Betting with the Kelly Criterion Jane June 2, 2010 Contents 1 Introduction 2 2 Kelly Criterion 2 3 The Stock Market 3 4 Simulations 5 5 Conclusion 8 1 Page 2 of 9 1 Introduction Gambling in all forms,
APPENDIX B. The Risk Pool Game B.1 INTRODUCTION
APPENDIX B The Risk Pool Game B.1 INTRODUCTION One of the most important concepts in supply chain management is risk pooling. Recall that risk pooling involves the use of centralized inventory to take
MONT 107N Understanding Randomness Solutions For Final Examination May 11, 2010
MONT 07N Understanding Randomness Solutions For Final Examination May, 00 Short Answer (a) (0) How are the EV and SE for the sum of n draws with replacement from a box computed? Solution: The EV is n times
Stat 20: Intro to Probability and Statistics
Stat 20: Intro to Probability and Statistics Lecture 16: More Box Models Tessa L. Childers-Day UC Berkeley 22 July 2014 By the end of this lecture... You will be able to: Determine what we expect the sum
To create a histogram, you must organize the data in two columns on the worksheet. These columns must contain the following data:
You can analyze your data and display it in a histogram (a column chart that displays frequency data) by using the Histogram tool of the Analysis ToolPak. This data analysis add-in is available when you
Data Analysis. Using Excel. Jeffrey L. Rummel. BBA Seminar. Data in Excel. Excel Calculations of Descriptive Statistics. Single Variable Graphs
Using Excel Jeffrey L. Rummel Emory University Goizueta Business School BBA Seminar Jeffrey L. Rummel BBA Seminar 1 / 54 Excel Calculations of Descriptive Statistics Single Variable Graphs Relationships
Statistical Data analysis With Excel For HSMG.632 students
1 Statistical Data analysis With Excel For HSMG.632 students Dialog Boxes Descriptive Statistics with Excel To find a single descriptive value of a data set such as mean, median, mode or the standard deviation,
The Math. P (x) = 5! = 1 2 3 4 5 = 120.
The Math Suppose there are n experiments, and the probability that someone gets the right answer on any given experiment is p. So in the first example above, n = 5 and p = 0.2. Let X be the number of correct
Simulation Exercises to Reinforce the Foundations of Statistical Thinking in Online Classes
Simulation Exercises to Reinforce the Foundations of Statistical Thinking in Online Classes Simcha Pollack, Ph.D. St. John s University Tobin College of Business Queens, NY, 11439 [email protected]
ACS Microcomputer Workshop Excel: Functions and Data Analysis Tools
ACS Microcomputer Workshop Excel: Functions and Data Analysis Tools Introduction The Excel software package consists of three basic parts: its electronic spreadsheet, graphics, and database utilities.
If A is divided by B the result is 2/3. If B is divided by C the result is 4/7. What is the result if A is divided by C?
Problem 3 If A is divided by B the result is 2/3. If B is divided by C the result is 4/7. What is the result if A is divided by C? Suggested Questions to ask students about Problem 3 The key to this question
Notes on Factoring. MA 206 Kurt Bryan
The General Approach Notes on Factoring MA 26 Kurt Bryan Suppose I hand you n, a 2 digit integer and tell you that n is composite, with smallest prime factor around 5 digits. Finding a nontrivial factor
Polynomial Degree and Finite Differences
CONDENSED LESSON 7.1 Polynomial Degree and Finite Differences In this lesson you will learn the terminology associated with polynomials use the finite differences method to determine the degree of a polynomial
Using Excel. 4. The Scenario Manager function is used to create and evaluate a collection of what-if scenarios containing multiple input values.
P L U G - I N T4 Decision Making Using Excel LEARNING OUTCOMES 1. Describe the use of the IF function. 2. Compare the functions of Goal Seek and Solver. 3. List the advantages of using the Scenario Manager.
Simple Random Sampling
Source: Frerichs, R.R. Rapid Surveys (unpublished), 2008. NOT FOR COMMERCIAL DISTRIBUTION 3 Simple Random Sampling 3.1 INTRODUCTION Everyone mentions simple random sampling, but few use this method for
Excel Modeling Practice. The Svelte Glove Problem Step-by-Step With Instructions
Excel Modeling Practice The Svelte Glove Problem Step-by-Step With Instructions EXCEL REVIEW 2001-2002 Contents Page Number Overview...1 Features...1 The Svelte Glove Problem...1 Outputs...2 Approaching
Microsoft Axapta Inventory Closing White Paper
Microsoft Axapta Inventory Closing White Paper Microsoft Axapta 3.0 and Service Packs Version: Second edition Published: May, 2005 CONFIDENTIAL DRAFT INTERNAL USE ONLY Contents Introduction...1 Inventory
t Tests in Excel The Excel Statistical Master By Mark Harmon Copyright 2011 Mark Harmon
t-tests in Excel By Mark Harmon Copyright 2011 Mark Harmon No part of this publication may be reproduced or distributed without the express permission of the author. [email protected] www.excelmasterseries.com
The Intuition Behind Option Valuation: A Teaching Note
The Intuition Behind Option Valuation: A Teaching Note Thomas Grossman Haskayne School of Business University of Calgary Steve Powell Tuck School of Business Dartmouth College Kent L Womack Tuck School
Normality Testing in Excel
Normality Testing in Excel By Mark Harmon Copyright 2011 Mark Harmon No part of this publication may be reproduced or distributed without the express permission of the author. [email protected]
