Operations Research Models and Methods / Computation

 Random Variables

### Example: The Game of Craps

 The game of Craps is a popular gambling game. In this game, the player rolls a pair of dice and sums the numbers showing. A sum of 7 or 11 wins for the player, and a sum of 2, 3, or 12 loses. Any other number is called the point. The player then rolls the dice again. If she rolls the point number, she wins. If she throws a 7, she loses. Any other number requires another roll. The game continues until the gambler rolls a 7 or her point number.

### Simple probably analysis determines that the sum of two standard dice is a discrete random variable with integer values ranging from 2 through 12. The probability distribution of the sum is the triangular distribution with a mode of 7. To define this distribution for subsequent computation, select the Add_RV item from the OR_MS menu. The dialog box shown below opens.

Sixteen named distributions are available with one user defined distribution. The option buttons at the left select discrete distributions, while the option buttons on the right select continuous distributions. The User distribution allows entry of a user specified discrete probability distribution. For the example we name the random variable Dice, identify it as an integer triangular distribution, specify its lower value, mode and upper value as 2, 7 and 12 respectively. The check boxes on the right of the dialog, list optional information that will be shown with the distribution.

One or more random variables must be defined with the Add_RV option before any of the other programs or functions may be used. The names for random variables must be unique and not previously defined for the workbook. The cell reference shown at the top of the dialog box is the upper left corner of the worksheet range where the random variable information will be stored. The default value of the cell is the reference to the cursor location when the dialog is called. When the "Show Titles" checkbox is clicked, the titles associated with the distribution parameters are shown. When not clicked only the parameters are shown without titles. The latter is useful when a series of random variables are defined each with the same set of parameters.