vendredi 8 novembre 2019

How to select a random number from a super set with different probability of each sub set

I need to select a number at random from a set Y of 100 numbers as [1.00 to 2.00) with four subsets of following probability.

  1. Y1--> [1.00-1.39)---probability(0.4)
  2. Y2--> [1.40-1.69)---probability(0.3)
  3. Y1--> [1.70-1.89)---probability(0.2)
  4. Y1--> [1.90-1.99)---probability(0.1)

How do I approach this problem?




Aucun commentaire:

Enregistrer un commentaire