210 likes | 460 Views
Probability Distributions in Decision Making & Monte Carlo Simulation Workshop. Outline/Coverage. Terms for reference Introduction The Uniform Distribution The Triangular Distribution The Normal Distribution Monte Carlo Simulation Overview Monte Carlo Simulation Practice Examples
E N D
Probability Distributions in Decision Making & Monte Carlo Simulation Workshop
Outline/Coverage • Terms for reference • Introduction • The Uniform Distribution • The Triangular Distribution • The Normal Distribution • Monte Carlo Simulation Overview • Monte Carlo Simulation Practice Examples • Carefully read and study each slide
Some Terms used in the workshop • x is a “random variable”, a symbol representing an outcome that can take on a value. For example, x may be used to represent outcomes that could occur in say flipping two coins. So, x could take on the values/outcomes of “Head Head”, “Head Tails”, “Tails Head”, or “Tails Tails”. A different example would be purchasing a part from a supplier where the price could range from $100 to $200 depending on market conditions. In this case, x could take on a number of values such as $141.25 or $162.89 and so on. • f(x), f represents frequency and f(x) represents frequency of a particular outcome, x. If we were flipping a single coin 10 times, f(Heads) might be anywhere from one to ten “Heads” outcomes. • p(x), p represent probability or likelihood and p(x) represents probability of a particular outcome, x. In the case of flipping a single coin, p(Heads)=0.50. • e(x), e represents expected value of a particular outcome, x. For example, if we were to flip a single coin 100 times, we would expect 50 Heads on average, thus e(Heads)=50. We use probabilities to obtain expected values. In this example, we have 100 flips and the probability of “Heads” is 0.50, so 100 X 0.50 = 50, e(Heads). • mean is simply the average. It is the sum of the values divided by the number of values. The mean is one measure of “central tendency”, used to help describe where the center of a set of data set is located.
Introduction A Probability Distribution is a graphical representation of possible values a random variable (x) may assume along with the probability of the variable taking on these values. The simplest probability distribution is the Uniform Distribution. The X-axis (horizontal axis) is the list of possible values the variable can assume. The Y-axis (vertical axis) represents the probability of the variable taking on a certain value. In a uniform distribution, the probabilities for the values the random variable are all equal. For example, flipping a coin can be represented using a uniform distribution. The possible outcomes or values are Heads and Tails. The probability of flipping a Head is 0.5 and the probability of flipping a Tail is 0.5, the same. Notice in the table below the probabilities are the same or uniform, 0.50. This is a probability distribution shown as a table. This is a probability distribution shown as a graph.
Introduction Now, consider rolling a single die. Use the table below to fill in random variable values or possible outcomes along with their associated probabilities. This is a probability distribution shown as a table.
Introduction Using the table from the prior slide, build the uniform distribution for the single die roll: p(x) likelihood x outcome
Triangular distribution The triangular distribution is very popular in business because it is easy to understand and use effectively. It only requires the specification of three values, its minimum, most likely, and maximum. The mean of a triangular distribution is simply (min + most likely + max) / 3. For example, we are not not sure how many hours it will take to complete a task. The shortest time is estimated to be 12 hours, but the task could take as long as 22 hours. Most likely, the task will complete in 14 hours, but could take any amount of time between 12 and 22 hours. The task time is modeled below using the triangular distribution. mean task time is (12+14+22) / 3 = 16 likelihood 12 14 22 task time (hours)
The normal distribution Another very popular distribution is the normal distribution. Like the triangular distribution, the normal distribution is a continuous distribution meaning the random variable can take on any value in its range. However, the normal distribution is always symmetric, with its mean always at the center value. Values on each side of the center are equally likely. For example, below is a normal distribution of class grades with a mean of 80. A score around 80 is the most likely. Scores around 70 and 90 are less likely than a score around 80, but are equally likely to each other. The mean of a normal distribution is its center, in this case 80. likelihood mean class grade is 80 class test grades 70 80 90
MC Simulation Monte Carlo simulation is a technique in which many values of a random variable are generated from a distribution. When a value is obtained from a distribution it is called a trial. Two examples are shown below. The first shows Monte Carlo simulation trail results from a normal distribution, the second shows MC trial results from a uniform distribution. Example 1: class test grades (x) 81.2 68.7 MC Simulation 91 82.5 MC Simulation Trial Results likelihood 79 82.5 81.6 77.68 57.8 class test grades (x) 70 80 90
MC Simulation Supplier part price (x) Example 2: 148 153 MC Simulation Trial Results 160.2 137 MC Simulation 152.4 likelihood Supplier part price (x) $100 $150 $200
The uniform distribution Two values are needed to specify a uniform distribution, a small and a large. The uniform distribution is a continuous distribution and can take on any value between its smallest and largest, all will equal likelihood. The Uniform Distribution is shown below and its mean is simply the middle, (small value + large value) / 2.
New but related topic,Monte Carlo Simulation Monte Carlo simulation generates the outcomes from a probability distribution, in this case the uniform distribution which has 2 outcomes with equal likelihoods. The following Excel spreadsheet is an example of the Monte Carlo technique generating 20 outcomes for flipping a coin. =IF(RAND()<0.5,"H","T") Note: A random number generator (shown above) is used in Monte Carlo simulation to obtain values for the random variable or outcome. No need to worry about this Excel function!
MC Simulation Taking the coin flip example one step further, we can easily generate 1000 trials and outcomes, count the Head and Tail outcomes, and plot the Monte Carlo simulation results in a distribution. Note: some rows (trials) are not shown (hidden) for clarity. 491 509 f(x) MC Simulation with 1000 trials. Results; 491 Tails and 509 Heads. f(x) stands for frequency, f(Tails)=491, f(Heads)=509 in this run of 1000 trials.
MC Simulation Now, considering the graph on the prior slide, how would the graph look if you replaced f(x) with e(x), the expected number of each outcome in 1000 flips or trials? Complete the graph below:
MC Simulation Now, considering the graph on the prior slide, how would the graph look if you placed probabilities of outcomes on the vertical axis? Complete the graph below: Tails Heads
MC Simulation Go to the following website and download the example MC simulator. Instructions below: 1. Goto the website: www.uta.edu/faculty/weltman 2. Click on the OPMA 3306 link 3. Download the file Excel Workshop Simulator 4. Open the file in Excel Download this one This one is for review, later!
MC Simulation Considering the rolling of a single die example, use the simulator spreadsheet to fill in the following table and draw the frequency distribution below. f(x) stands for relative frequency and is used for counting the frequency (or totaling up the number of times each outcome, x occurs). f(x) x
MC Simulation Considering the rolling of a single die example, in 600 rolls how many 1’s, 2’s, 3’s, 4’s, 5’s, and 6’s would you expect using statistics? Fill in third column, e(x), in the table below:
MC Simulation Considering the rolling of a single die example, in 600 rolls how many 1’s, 2’s, 3’s, 4’s, 5’s, and 6’s would you expect using statistics? Fill in the fourth column, p(x), in the table below and the graph the probability distribution. Why are the columns f(x) and e(x) different? p(x) x Note: f(x) comes from the MC simulation results. e(x) comes from statistical probabilities.
MC Simulation Now, let’s use MC simulation for a slighted more involved decision (Profit Worksheet) using multiple distributions to model the decision variables. Let’s try to see if MC Simulation can help us arrive at a good decision based on risks and unknowns. The selling price for a part we sell is fixed at $159. Depending on market conditions and supplier, the part costs us between $80 and $100, and the cost is equally likely anywhere between $80 and $100. Administrative cost is most likely to be $700,000 but could be as low as $300,000 or as high as $800,000. Demand for the part follows a normal distribution with mean of 15,000 units and a standard deviation of 4,500. The formula for profit is [revenue] – [costs] as shown in the formula below: Profit = [rQ]-[AC+cQ], where r is the revenue per unit, AC is the administrative costs, c is the supplier cost per unit, and Q is the demand or quantity sold. Thus, Using the means of each distribution (the uniform, the triangular, and the normal), calculate the profit below, Mean part cost= Mean admin cost= Mean demand, Q= Profitmean= Note: You do not use the MC simulator to obtain these values.
MC Simulation Next, use the MC simulator (Profit Worksheet) with 500 trials, fill in the yellow boxes and obtain the (from the simulation) the average/mean profit, max and min profit, and probability of a loss with this product. First, fill in the yellow boxes in the spreadsheet. Once the data is entered (in the yellow boxes), refresh the spreadsheet several times. Study the spreadsheet trials and results information to try to understand what is going on. Observe each column; parts cost, admin cost, demand, and profit. What does the MC simulation provide that is different from the mean profit calculation done on the prior slide? Should we introduce this product? Why or why not?