Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Problem A project has three sequential tasks. The first task follows Exponential distribution with parameter of 5 days. The second task follows Uniform distribution with parameters of 5 and 10 days, the last task follows Normal distribution with parameters of 9 and 2 days. The numbers on the next page were generated using RAND() function in excel. Starting from the first row and column, moving through the first row first, and not using any given element twice, generate a random instance of duration of this project. 5/24/2017 Ardavan Asef-Vaziri 1-1 Problem 0.1 0.5 0.7 0.9 0.8 0.1 0.3 0.2 0.4 0.1 0.4 0.4 0.0 0.2 0.6 By not using any element twice we mean not using a specific element – in a specific row and column twice. For example you can not use the number in row 1 and column 1 twice. Obviously you can use all the three 0.1s as soon as you reach their corresponding box in the table. End of the book Table provide you with uniform [0,1] random numbers 5/24/2017 Ardavan Asef-Vaziri 1-2 Continuous Probability Distributions Uniform Distribution a Exponential Distribution b Normal Distribution s Uniform Probability Density Distribution b a Uniform Probability Density Function f (x) = 1/(b - a) for a < x < b = 0 elsewhere a = smallest value the variable can assume b = largest value the variable can assume µ = (a + b)/2 s 2 = (b - a)2/12 Continuous Probability Distributions a x1 x2 P(x1 ≤ x≤ x2) b a x1 P(x≤ x1) P(x≥ x1)= 1- P(x<x1) a x1 P(x≥ x1) b P(x =x1)= 0 b Generate a Uniform Random Number We want to select a student, randomly, to come to the white board. How? Simulation is based on random number generation Crystal Ball is a simulation software AutoMod is another simulation software Excel is also a simulation tool 5/24/2017 Ardavan Asef-Vaziri 1-6 Random Variable: Uniform Distribution The second task follows Uniform distribution with parameters of 5 and 10 days. The random number we have is the second number in the first row, and that is 0.1. For uniform distribution X a (b a) Rand () X 5 0.1(10 5) 5.5 The second activity takes 5.5 days 5/24/2017 Ardavan Asef-Vaziri 1-7 Exponential Probability Distribution f ( x) e F (x ) x .4 .3 P(x < x1 ) = area from 0 to x1 P( x x1 ) 1 e .2 .1 x1 x 1 2 3 4 5 6 7 8 Parameters: Mean and StDev. How can I generate an exponential random variable? 9 10 Random Variable: Exponential Distribution The first task follows exponential distribution with parameters of 5 days. The density function of exponential distribution is f ( x) e x I do not know how to use a random number between 0 and 1 to generate a random X from this distribution. But I know given a specific X, the probability of the exponential random variable to be less than or equal to that X is computed as P( x X ) 1 e 5/24/2017 X Ardavan Asef-Vaziri 1-9 Random Variable: Exponential Distribution I also know that P(x≤ X) is a number in the closed range of [0,1]. In addition I know that I have some tools – for example excel- to generate a uniform random number in the range of [0,1]. Therefore, I can generate a random probability and associate it with an exponential random variable. Then, I can claim that I have generated a random variable from exponential distribution. Rand () 1 e X e X 1 Rand () Furthermore, I know that 1-rand() is between 0 and 1. Therefore, for simplicity, I can replace 1-rand() with rand(). Thus X e Rand () X ln[ Rand ()] 5/24/2017 Ardavan Asef-Vaziri 1-10 Random Variable: Exponential Distribution X 1 ln[ Rand ()] Our Exponential distribution has a parameter of 5 days. Do not forget: lambda is rate, 1/lambda is time. Our 0 to 1 random number is 0.1. Therefore our exponential random variable has a value of X 1 ln[ Rand ()] X 5 ln( 0.1) X = 11.51 days. The first activity takes 11.51 days 5/24/2017 Ardavan Asef-Vaziri 1-11 Random Variable: Normal The last task follows Normal distribution with parameters of 9 and 2 days. The density function of exponential distribution is 1 (x μ)2 / 2 σ 2 f(x) e 2π σ I do not know how to use a random number between 0 and 1 to generate a random X from this distribution. However, I know that there is a standard normal variable with parameters of 0 and 1. Its density function is 1 z2/ 2 f(z) e 2π 5/24/2017 I also know that x= x + zsx Ardavan Asef-Vaziri 1-12 Random Variable: Standard Normal The first task follows exponential distribution with parameters of 5 days. The density function of exponential distribution is 1 z2/ 2 f(z) e 2π I do not know how to use a random number between 0 and 1 to generate a random z from this distribution. But I know that P(z≤ Z) is a number in the range of [0,1]. P( z Z ) rand () 5/24/2017 P( z Z ) 0.4 Ardavan Asef-Vaziri 1-13 Given Probability, Find z Given a 40% Probability The table will give you z Z =- 0.25 Random Variable: Normal Distribution We go to the end of the book. And find (after a little bit of manipulation) as shown on the next page z = -0.25 Then to generate our random variable we simple transform z into x X= 9 -0.25*2 = 8.5 The first task duration: 11.5 The second task duration: 5.5 The third task duration: 8.5 5/24/2017 Ardavan Asef-Vaziri 1-15 Port Automation Model 5/24/2017 Ardavan Asef-Vaziri 1-16