LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Damage
 
Posts: n/a
Default Selecting at random with weighted probability

I'm trying to figure out the algorithms for a football-simulation game.
If I have a series of numbers which represent the skill levels for
various players, what function or combination of functions will return
a random player where a higher skill level means a higher probability
of being returned by the function?

E.g. player A = 5, player B = 10, player C = 50: I want to return a
random player, such that player B is twice as likely to be returned as
player A, and player C is five times more likely to be returned than
player B, etc.

I think a random number between 1 and A+B+C must be involved, but how
to correlate that random number with the different probabilities? (Some
horribly nested IF functions might work, but it could get pretty ugly
if there are a lot of players and the skill values are variable).
Any ideas, you clever people?

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Seed numbers for random number generation, uniform distribution darebo Excel Discussion (Misc queries) 3 April 21st 23 09:02 PM
How to keep random number from changing using RANDBETWEEN? TXlimogirl Excel Worksheet Functions 6 April 3rd 23 04:41 PM
excel locks up after selecting a cell sandenscot Excel Discussion (Misc queries) 7 January 28th 05 07:27 PM
Generating Correlated Random Values in Excel Randy Excel Discussion (Misc queries) 2 January 16th 05 09:50 PM
Random Numbers Change? Les Coover Excel Worksheet Functions 2 December 17th 04 02:49 AM


All times are GMT +1. The time now is 09:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"