Next: Direct Transformation for the Up: Inverse Transform Technique Previous: Continuous Distributions without a

## Discrete Distribution

• All discrete distributions can be generated using the inverse transform technique.

• This section discusses the case of empirical distribution, (discrete) uniform distribution, and geometric distribution.

• Empirical discrete distribution. The idea is to collect and group the data, then develop the pdf and cdf. Use this information to obtain so that will be the random number function that we look for.

Example 9.4 on page 336.

• Discrete Uniform Distribution (Example 9.5 on page 338)
• pdf

• cdf

• Let F(X) = R
• Solve X in terms of R. Since x is discrete,

thus,

Consider the fact that i and k are integers and R is between (0,1). For the above relation to hold, we need

• For example, to generate a random variate X, uniformly distributed on {1, 2, ..., 10 } (thus k = 10)

• Example 9.6 on page 339 gives us another flavor. When an inverse function has more than one solution, one has to choose which one to use. In the example, one results in positive value and the other results in negative value. The choice is obvious.

• Example 9.7 on page 340: Geometric distribution.
• pmf

where
• cdf

• Let R = F(x), solve for x in term of R. Because this is a discrete random variate, use the inequality (9.12) on page 337,

that is

Notice that

Consider that x must be an integer, so

• Let the equation above becomes

The item in the ceiling function before subtracting one is the function to generate exponentially distributed variate.

• Thus one way to generate geometric distribution is to
1. let as the parameter to the exponential distribution,
2. generate an exponentially distributed variate by

3. subtract one and take the ceiling

• Example 9.8 on page 341

Next: Direct Transformation for the Up: Inverse Transform Technique Previous: Continuous Distributions without a
Meng Xiannong 2002-10-18