For week 4, I would like you to discuss possible applications of the use of simulation in your primary place of employment. As you lead the discussion, I would like your examples to be as specific as possible. For example, what variables would be considered random, what variable(s) would be considered the dependent variable(s) in the described application?
*For your information, I am currently unemployed and my professional background is Information Technology and prior Owner of two Grocery/Deli businesses in NJ.*
Answer the discussion question in terms of one of my two professions and how these applications can be applied within a grocery/deli business or the field of Information Technology in general.
Document Preview:
Week 04 Discussion - Introduction to Simulation For week 4, I would like you to discuss possible applications of the use of simulation in your primary place of employment. As you lead the discussion, I would like your examples to be as specific as possible. For example, what variables would be considered random, what variable(s) would be considered the dependent variable(s) in the described application? *For your information, I am currently unemployed and my professional background is Information Technology and prior Owner of two Grocery/Deli businesses in NJ.* Answer the discussion question in terms of one of my two professions and how these applications can be applied within a grocery/deli business or the field of Information Technology in general.
Week 04 Discussion - Introduction to Simulation For week 4, I would like you to discuss possible applications of the use of simulation in your primary place of employment. As you lead the discussion, I would like your examples to be as specific as possible. For example, what variables would be considered random, what variable(s) would be considered the dependent variable(s) in the described application? *For your information, I am currently unemployed and my professional background is Information Technology and prior Owner of two Grocery/Deli businesses in NJ.* Answer the discussion question in terms of one of my two professions and how these applications can be applied within a grocery/deli business or the field of Information Technology in general. Spreadsheet Modeling & Decision Analysis: Introduction to Simulation Using Crystal Ball Chapter 12 * Introduction to Simulation In many spreadsheets, the value for one or more cells representing independent variables is unknown or uncertain. As a result, there is uncertainty about the value the dependent variable will assume: Y = f(X1, X2, …, Xk) Simulation can be used to analyze these types of models. * What is a Dependent & an Independent Variable? Consider the following variables: Grass Growth Frequency of fertilization Amount of sunshine How are these variables related? * Dependent Versus Independent Variables Grass growth is a function of frequency of fertilization and amount of sunshine. Or mathematically: Grass growth = f(frequency of fertilization, amount of sunshine) Thus, grass growth is labeled as the dependent variable, while fertilization and sunshine would be the independent variables. * Another Example Suppose that you are self-employed. In a given month, your profit (bottom line performance measure) will obviously be a function of your monthly revenues and costs (i.e., revenues & costs are your independent variables). * Example (continued) What is the mathematical function linking profit to revenues and costs? Simple! Profit = Total Revenue – Total Cost Thus, if you know with certainty the values of revenue and cost, then we will know with certainty the value of the dependent variable profit. * Example (continued) However, in real life applications we may not know what our future revenues or costs will be. That is they are called random variables. This is were simulation comes to the rescue. For instance, assume that based on historical data our monthly revenues range between $1000 and $2000 (assume that any value in this range occurs with an equal likelihood). * Example (continued) Also, assume that our monthly costs resemble a bell-shaped curve (i.e., a normal distribution) with a mean of $600 and a standard deviation of $150. Note that I have defined the probability distributions for both independent variables? Can you name them? * Example (continued) Monthly revenue is actually a continuous uniform distribution (it is called uniform because all values occur with equal likelihood), while cost is a normal probability distribution. Now to simulate a single monthly profit value, we will generate a single revenue value and a single cost value from their corresponding distributions and plug these values into the profit equation identified earlier on. * Example (continued) Now we have a single simulated value for one month. Are we going to base our profit estimates based on only a single value? Obviously not! We need to generate hundreds or perhaps thousands of profitability values to get a better feel of our expected monthly profits. This is were a software program such as Crystal Ball can make our job easy! * Random Variables & Risk A random variable is any variable whose value cannot be predicted or set with certainty. Many “input cells” in spreadsheet models are actually random variables. the future cost of raw materials future interest rates future number of employees in a firm expected product demand Decisions made on the basis of uncertain information often involve risk. “Risk” implies the potential for loss. * Methods of Risk Analysis Best-Case/Worst-Case Analysis What-if Analysis Simulation * Best-Case/Worst-Case Analysis Best case - plug in the most optimistic values for each of the uncertain cells. Worst case - plug in the most pessimistic values for each of the uncertain cells. This is easy to do but tells us nothing about the distribution of possible outcomes within the best and worst-case limits. * Possible Performance Measure Distributions Within a Range worst case best case worst case best case worst case best case worst case best case * What-If Analysis Plug in different values for the uncertain cells and see what happens. This is easy to do with spreadsheets. Problems: Values may be chosen in a biased way. Hundreds or thousands of scenarios may be required to generate a representative distribution. Does not supply the tangible evidence (facts and figures) needed to justify decisions to management. * Simulation Resembles automated what-if analysis. Values for uncertain cells are selected in an unbiased manner. The computer generates hundreds (or thousands) of scenarios. We analyze the results of these scenarios to better understand the behavior of the performance measure. This allows us to make decisions using solid empirical evidence. * Simulation To properly assess the risk inherent in the model we need to use simulation. Simulation is a 4 step process: 1) Identify the uncertain cells in the model. 2) Implement appropriate random numbers for each uncertain cell. 3) Replicate the model n times, and record the value of the bottom-line performance measure. 4) Analyze the sample values collected on the performance measure. * What is Crystal Ball? Crystal Ball is a spreadsheet add-in that simplifies spreadsheet simulation. A limited life trial version of Crystal Ball is on the CD-ROM accompanying this book. It provides: dialogs & functions for generating random numbers commands for running simulations graphical & statistical summaries of simulation data * Random Number Generators (RNGs) A RNG is a mathematical function that randomly generates (returns) a value from a particular probability distribution. We can implement RNGs for uncertain cells to allow us to sample from the distribution of values expected for different cells. * How RNGs Work The RAND( ) function in Excel returns uniformly distributed random numbers between 0.0 and 0.9999999. Suppose we want to simulate the act of tossing a fair coin. Let 1 represent “heads” and 2 represent “tails” (Note that I could have used other values than “1” and “2” such as “1” and “0”). Consider the following RNG: =IF(RAND( )<0.5,1,2) *="" a="" function="" to="" simulate="" tossing="" a="" single="" coin="" how="" to="" interpret="" the="" function:="IF(RAND(">0.5,1,2)><0.5,1,2) using =rand() in excel will generate a value between 0 and 1 (or .999999 to be specific). if the generated value is less than 0.5, then a value of 1 will be returned, and if false a value of 2 will be returned. * excel’s if function in general, the “if function” in excel typically has the following format: =if(condition is true, then return this value, if false then return this value). * note that the previous =rand() function will simulate the toss of a single coin once. that is, we have replicated the model one time only. to simulate the outcome say 100 times, you simply copy this function in excel 100 times. * simulating the roll of a die we want the values 1, 2, 3, 4, 5 & 6 to occur randomly with equal probability of occurrence. consider the following rng function in excel =int(6*rand())+1 if 6*rand( ) falls int(6*rand( ))+1 in the interval:returns the value: 0.0 to 0.9991 1.0 to 1.9992 2.0 to 2.9993 3.0 to 3.9994 4.0 to 4.9995 5.0 to 5.9996 * simulating the roll of a die try inputting the =int(6*rand())+1 function in excel. you should get a value between 1 and 6. you have just simulated the event of tossing a die once. to simulate this event multiple times, copy this function say 20 times. * simulation with crystal ball although excel is quite capable of modeling and running simulation problems, it is much easier to rely on a software that will automate many of our modeling tasks. crystal ball, as stated earlier, is an add-in macro that attaches itself to excel thus giving you the look and feel of excel itself. * generating random numbers with crystal ball crystal ball provides two different ways for creating rngs in spreadsheets built-in cb functions used in formulas like any other excel function but require cb to be installed on the machine displaying the spreadsheet & do not support all cb functionality the distribution gallery display a number (not a formula) in a cell but generates random numbers for that cell when simulating the model does not require cb to be installed on the machine to display the spreadsheet & supports all cb functionality both techniques useful in different situations * some of the built-in rngs provided by crystal ball distributionrng function binomial=cb.binomial(p,n) custom=cb.custom(range) gamma=cb.gamma(loc,shape,scale,min,max) poisson=cb.poisson(l) continuous uniform=cb.uniform(min,max) exponential=cb.exponential(l) normal=cb.normal(m,s,min,max) triangular=cb.triang(min, most likely, max) * using cb rng functions click insert function icon select cb option select rng function * using the distribution gallery click define assumption icon select distirbution specify parameters * examples of discrete probability distributions * examples of continuous probability distributions * video clips there are 2 video clips that will show you a step-by-step approach on how to generate random values using crystal ball’s distribution gallery and built-in functions. now will be a good time to view them. * discrete vs. continuous random variables a discrete random variable may assume one of a fixed set of (usually integer) values. example: the number of defective tires on a new car can be 0, 1, 2, 3, or 4. a continuous random variable may assume one of an infinite number of values in a specified range. example: the amount of gasoline in a new car can be any value between 0 and the maximum capacity of the fuel tank. * the uncertainty of sampling the replications of our model represent a sample from the (infinite) population of all possible replications. suppose we repeated the simulation and obtained a new sample of the same size. q: would the statistical results be the same? a: no! as the sample size (# of replications or number of simulated runs) increases, the sample statistics converge to the true population values. we can also construct confidence intervals for a number of statistics... * constructing a confidence interval for the true population mean where: note that as n increases, the width of the confidence interval decreases. * constructing a confidence interval for the true population proportion where: note again that as n increases, the width of the confidence interval decreases. * crystal ball manual please note that as a resource, i am crystal ball’s manual that may be used as a reference. the manual is in pdf format. please focus on the following using="RAND()" in="" excel="" will="" generate="" a="" value="" between="" 0="" and="" 1="" (or="" .999999="" to="" be="" specific).="" if="" the="" generated="" value="" is="" less="" than="" 0.5,="" then="" a="" value="" of="" 1="" will="" be="" returned,="" and="" if="" false="" a="" value="" of="" 2="" will="" be="" returned.="" *="" excel’s="" if="" function="" in="" general,="" the="" “if="" function”="" in="" excel="" typically="" has="" the="" following="" format:="IF(condition" is="" true,="" then="" return="" this="" value,="" if="" false="" then="" return="" this="" value).="" *="" note="" that="" the="" previous="RAND()" function="" will="" simulate="" the="" toss="" of="" a="" single="" coin="" once.="" that="" is,="" we="" have="" replicated="" the="" model="" one="" time="" only.="" to="" simulate="" the="" outcome="" say="" 100="" times,="" you="" simply="" copy="" this="" function="" in="" excel="" 100="" times.="" *="" simulating="" the="" roll="" of="" a="" die="" we="" want="" the="" values="" 1,="" 2,="" 3,="" 4,="" 5="" &="" 6="" to="" occur="" randomly="" with="" equal="" probability="" of="" occurrence.="" consider="" the="" following="" rng="" function="" in="" excel="INT(6*RAND())+1" if="" 6*rand(="" )="" falls="" int(6*rand(="" ))+1="" in="" the="" interval:="" returns="" the="" value:="" 0.0="" to="" 0.999="" 1="" 1.0="" to="" 1.999="" 2="" 2.0="" to="" 2.999="" 3="" 3.0="" to="" 3.999="" 4="" 4.0="" to="" 4.999="" 5="" 5.0="" to="" 5.999="" 6="" *="" simulating="" the="" roll="" of="" a="" die="" try="" inputting="" the="INT(6*RAND())+1" function="" in="" excel.="" you="" should="" get="" a="" value="" between="" 1="" and="" 6.="" you="" have="" just="" simulated="" the="" event="" of="" tossing="" a="" die="" once.="" to="" simulate="" this="" event="" multiple="" times,="" copy="" this="" function="" say="" 20="" times.="" *="" simulation="" with="" crystal="" ball="" although="" excel="" is="" quite="" capable="" of="" modeling="" and="" running="" simulation="" problems,="" it="" is="" much="" easier="" to="" rely="" on="" a="" software="" that="" will="" automate="" many="" of="" our="" modeling="" tasks.="" crystal="" ball,="" as="" stated="" earlier,="" is="" an="" add-in="" macro="" that="" attaches="" itself="" to="" excel="" thus="" giving="" you="" the="" look="" and="" feel="" of="" excel="" itself.="" *="" generating="" random="" numbers="" with="" crystal="" ball="" crystal="" ball="" provides="" two="" different="" ways="" for="" creating="" rngs="" in="" spreadsheets="" built-in="" cb="" functions="" used="" in="" formulas="" like="" any="" other="" excel="" function="" but="" require="" cb="" to="" be="" installed="" on="" the="" machine="" displaying="" the="" spreadsheet="" &="" do="" not="" support="" all="" cb="" functionality="" the="" distribution="" gallery="" display="" a="" number="" (not="" a="" formula)="" in="" a="" cell="" but="" generates="" random="" numbers="" for="" that="" cell="" when="" simulating="" the="" model="" does="" not="" require="" cb="" to="" be="" installed="" on="" the="" machine="" to="" display="" the="" spreadsheet="" &="" supports="" all="" cb="" functionality="" both="" techniques="" useful="" in="" different="" situations="" *="" some="" of="" the="" built-in="" rngs="" provided="" by="" crystal="" ball="" distribution="" rng="" function="" binomial="CB.Binomial(p,n)" custom="CB.Custom(range)" gamma="CB.Gamma(loc,shape,scale,min,max)" poisson="CB.Poisson(l)" continuous="" uniform="CB.Uniform(min,max)" exponential="CB.Exponential(l)" normal="CB.Normal(m,s,min,max)" triangular="CB.Triang(min," most="" likely,="" max)="" *="" using="" cb="" rng="" functions="" click="" insert="" function="" icon="" select="" cb="" option="" select="" rng="" function="" *="" using="" the="" distribution="" gallery="" click="" define="" assumption="" icon="" select="" distirbution="" specify="" parameters="" *="" examples="" of="" discrete="" probability="" distributions="" *="" examples="" of="" continuous="" probability="" distributions="" *="" video="" clips="" there="" are="" 2="" video="" clips="" that="" will="" show="" you="" a="" step-by-step="" approach="" on="" how="" to="" generate="" random="" values="" using="" crystal="" ball’s="" distribution="" gallery="" and="" built-in="" functions.="" now="" will="" be="" a="" good="" time="" to="" view="" them.="" *="" discrete="" vs.="" continuous="" random="" variables="" a="" discrete="" random="" variable="" may="" assume="" one="" of="" a="" fixed="" set="" of="" (usually="" integer)="" values.="" example:="" the="" number="" of="" defective="" tires="" on="" a="" new="" car="" can="" be="" 0,="" 1,="" 2,="" 3,="" or="" 4.="" a="" continuous="" random="" variable="" may="" assume="" one="" of="" an="" infinite="" number="" of="" values="" in="" a="" specified="" range.="" example:="" the="" amount="" of="" gasoline="" in="" a="" new="" car="" can="" be="" any="" value="" between="" 0="" and="" the="" maximum="" capacity="" of="" the="" fuel="" tank.="" *="" the="" uncertainty="" of="" sampling="" the="" replications="" of="" our="" model="" represent="" a="" sample="" from="" the="" (infinite)="" population="" of="" all="" possible="" replications.="" suppose="" we="" repeated="" the="" simulation="" and="" obtained="" a="" new="" sample="" of="" the="" same="" size.="" q:="" would="" the="" statistical="" results="" be="" the="" same?="" a:="" no!="" as="" the="" sample="" size="" (#="" of="" replications="" or="" number="" of="" simulated="" runs)="" increases,="" the="" sample="" statistics="" converge="" to="" the="" true="" population="" values.="" we="" can="" also="" construct="" confidence="" intervals="" for="" a="" number="" of="" statistics...="" *="" constructing="" a="" confidence="" interval="" for="" the="" true="" population="" mean="" where:="" note="" that="" as="" n="" increases,="" the="" width="" of="" the="" confidence="" interval="" decreases.="" *="" constructing="" a="" confidence="" interval="" for="" the="" true="" population="" proportion="" where:="" note="" again="" that="" as="" n="" increases,="" the="" width="" of="" the="" confidence="" interval="" decreases.="" *="" crystal="" ball="" manual="" please="" note="" that="" as="" a="" resource,="" i="" am="" crystal="" ball’s="" manual="" that="" may="" be="" used="" as="" a="" reference.="" the="" manual="" is="" in="" pdf="" format.="" please="" focus="" on="" the="">0.5,1,2) using =rand() in excel will generate a value between 0 and 1 (or .999999 to be specific). if the generated value is less than 0.5, then a value of 1 will be returned, and if false a value of 2 will be returned. * excel’s if function in general, the “if function” in excel typically has the following format: =if(condition is true, then return this value, if false then return this value). * note that the previous =rand() function will simulate the toss of a single coin once. that is, we have replicated the model one time only. to simulate the outcome say 100 times, you simply copy this function in excel 100 times. * simulating the roll of a die we want the values 1, 2, 3, 4, 5 & 6 to occur randomly with equal probability of occurrence. consider the following rng function in excel =int(6*rand())+1 if 6*rand( ) falls int(6*rand( ))+1 in the interval:returns the value: 0.0 to 0.9991 1.0 to 1.9992 2.0 to 2.9993 3.0 to 3.9994 4.0 to 4.9995 5.0 to 5.9996 * simulating the roll of a die try inputting the =int(6*rand())+1 function in excel. you should get a value between 1 and 6. you have just simulated the event of tossing a die once. to simulate this event multiple times, copy this function say 20 times. * simulation with crystal ball although excel is quite capable of modeling and running simulation problems, it is much easier to rely on a software that will automate many of our modeling tasks. crystal ball, as stated earlier, is an add-in macro that attaches itself to excel thus giving you the look and feel of excel itself. * generating random numbers with crystal ball crystal ball provides two different ways for creating rngs in spreadsheets built-in cb functions used in formulas like any other excel function but require cb to be installed on the machine displaying the spreadsheet & do not support all cb functionality the distribution gallery display a number (not a formula) in a cell but generates random numbers for that cell when simulating the model does not require cb to be installed on the machine to display the spreadsheet & supports all cb functionality both techniques useful in different situations * some of the built-in rngs provided by crystal ball distributionrng function binomial=cb.binomial(p,n) custom=cb.custom(range) gamma=cb.gamma(loc,shape,scale,min,max) poisson=cb.poisson(l) continuous uniform=cb.uniform(min,max) exponential=cb.exponential(l) normal=cb.normal(m,s,min,max) triangular=cb.triang(min, most likely, max) * using cb rng functions click insert function icon select cb option select rng function * using the distribution gallery click define assumption icon select distirbution specify parameters * examples of discrete probability distributions * examples of continuous probability distributions * video clips there are 2 video clips that will show you a step-by-step approach on how to generate random values using crystal ball’s distribution gallery and built-in functions. now will be a good time to view them. * discrete vs. continuous random variables a discrete random variable may assume one of a fixed set of (usually integer) values. example: the number of defective tires on a new car can be 0, 1, 2, 3, or 4. a continuous random variable may assume one of an infinite number of values in a specified range. example: the amount of gasoline in a new car can be any value between 0 and the maximum capacity of the fuel tank. * the uncertainty of sampling the replications of our model represent a sample from the (infinite) population of all possible replications. suppose we repeated the simulation and obtained a new sample of the same size. q: would the statistical results be the same? a: no! as the sample size (# of replications or number of simulated runs) increases, the sample statistics converge to the true population values. we can also construct confidence intervals for a number of statistics... * constructing a confidence interval for the true population mean where: note that as n increases, the width of the confidence interval decreases. * constructing a confidence interval for the true population proportion where: note again that as n increases, the width of the confidence interval decreases. * crystal ball manual please note that as a resource, i am crystal ball’s manual that may be used as a reference. the manual is in pdf format. please focus on the following>