troubleshooting Question

'randomly' distributing elements into buckets

Avatar of ugeb
ugebFlag for United States of America asked on
Math / Science
8 Comments2 Solutions354 ViewsLast Modified:
Hi,

I have the task of placing users of a game into buckets based on their user ID.  The number of buckets is set for a given trial, but could vary from trial to trial.

For example, let's say I have 1000 users of a game, and I would like to place them randomly but evenly into 5 buckets, 1 through 5. However, whenever I compute the bucket for a given user, I always need to place them in the exact same bucket, so I need a deterministic way of 'randomly' placing a user in one of N buckets.  I would like each bucket to be representational of the whole data set.

Another follow on issue is that I have a certain % chance that they won't be placed in ANY bucket, but be left out of the experiment.  For example, maybe there's a 70% chance they will be placed in a bucket, and 30% chance they won't. If they ARE placed in a bucket, then I have to know which bucket.  It has to be repeatable for a given user.

Any suggestions on how I can approach this problem or on solutions already available?

Thanks!





ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 2 Answers and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros