The CDF of

DiscreteUniformDistribution is an example of a right-continuous function:

A computer has 4 disks, numbered 0, 1, 2, 3, one of which is chosen at random on boot to store temporary files. Find the distribution of the chosen disk:

Find the probability that disk 1 is chosen:

Find the probability that an odd-numbered disk is chosen:

Simulate which disk is chosen on the next 30 boots:

A fair six-sided die can be modeled using a

DiscreteUniformDistribution:

Generate 10 throws of a die:

Compute the probability that the sum of three dice values is less than 6:

Verify by generating random dice throws, in this case

times three dice throws:

Verify by explicitly enumerating all possible dice outcomes:

Two fair dice are tossed. Find the distribution of the difference of the dice values:

Find the probability that the difference is at most 3:

Find the average difference:

Simulate differences for the 30 tosses:

In the game of craps [], two dice are thrown:

The resulting PDF can be tabulated as:

Find the probability of getting "snake eyes" []:

Or "boxcars" []:

Or "eighter from Decatur" []:

Or "little Joe" []:

The full list of probabilities:

Find the probability of losing in one throw or getting craps, i.e. any of the sums 2, 3, or 12:

Find the probability of winning in one throw, i.e., getting the sums 7 or 11:

A hypothetical R&D company has a holiday whenever at least one employee has a birthday. Find the number of employees that maximizes the days worked, assuming independent distributions of birthdays:

Find optimal number of employees:

Expected number of work days: