# Thread: Weighted Probabilities with random numbers Thanks: 0 Likes: 0

1. ## Weighted Probabilities with random numbers

Hi guys, this has been killing me but does anyone know how to incorporate weighted probabilities with random numbers? For example:

I need to have a random number between 1-9 and have these probabilities:
 1 5% 2 10% 3 0% 4 20% 5 30% 6 10% 7 10% 8 10% 9 5%

Any help would be much appreciated!

I just need a formula please and thank you.

2. ## Re: Weighted Probabilities with random numbers

Welcome to the board.

=match(rand(), {0;5;15;15;35;65;75;85;95}%)

3. ## Re: Weighted Probabilities with random numbers

Thank you so much!

4. ## Re: Weighted Probabilities with random numbers

You're welcome.

5. ## Re: Weighted Probabilities with random numbers

Originally Posted by shg
Welcome to the board.

=match(rand(), {0;5;15;15;35;65;75;85;95}%)
Hi shg - how does this work?

Not being a mathematician, I can't see immediately the relationship between the percentages senx7810 wanted and the number you put in the curly brackets.

Thanks