193k views
1 vote
Suppose it is relatively easy to generate random variables from any of the m cumulative distribution functions F₁(x),F₂(x),F₃(x),F₄(x),…,Fₘ (x). Given this, how would you generate a random variable having the cumulative distribution function F(x)=∑ᵐⱼ₌₁pⱼFⱼ(x) where ∑ᵐⱼ₌₁pⱼ=1.



User BlinkyTop
by
6.5k points

1 Answer

2 votes

Final answer:

To generate a random variable with a given mixed CDF, one must first generate a uniform random variable to select which component CDF to sample from, then generate a random sample from the chosen component CDF using its probabilistic weight.

Step-by-step explanation:

To generate a random variable that has a cumulative distribution function (CDF) given by F(x)=∑ₘₒ₁₁pₒFₒ(x), where the sum of the probabilities pₒ equals 1, one can use the following method:

  1. Generate a uniform random variable U on the interval [0,1].
  2. Using U, determine which Fₒ(x) to sample from by checking where U falls within the partitioned intervals created by the cumulative probabilities pₒ.
  3. Once the appropriate Fₒ(x) is selected based on U, generate a random variable X from this distribution.

Basically, you transform the uniform random variable into a random variable from the desired mixture distribution via the probabilistic 'weights' given by pₒ.

Each pₒ acts as a weight for its corresponding distribution Fₒ(x). Since it's already easy to generate random variables from each Fₒ(x), the process becomes a simple two-step procedure of choosing which distribution to sample from (via U) and then taking a sample from it.

User Tsahi Asher
by
7.7k points