BU283 Lecture Notes - Lecture 15: Lookup Table, Dollar Sign, Fixed Cost
Document Summary
If you"re given the events and their probabilities you should be able to make a. Range: start at 0+the probability= the left limit of the next range +probability gives you the right left, which is then the left limit of the next range and so forth. The dollar sign enables the program to go back and look at the table above. All you have to input in the first box of each column, then drag it down. Continuous uniform distribution in (a,b): a + (b-a)*rand( ) If you"re given 2,3,4,5; a=2 and b=5: since it"s a uniform distribution they all have the same probability, therefore: 0-0. 25 =2, 0. 25-0. 5 =3, 0. 50-0. 75=4, 0. 75-1. 0=5. If you have the lookup table: if not then, random no. 2+(5-2)(0. 99)=4. 97: but when you round these one goes into the right range, the other doesn"t which is why this formula is incorrect and why we should use the trunc one.