How to create uneven randomization allocation | XM Community
Skip to main content

I am trying to randomize people to 4 different conditions at a ratio of 2:1:1:1. Ie, in a sample of 1,000 - 400 see condition A, 200 see B, 200 see C, 200 see D. Is there a way to do this using the randomizer tool?

Yes. You have a simple ratio so it isn’t too bad. You will create an embedded variable to assign your condition. If your conditions are A, B, C, D and you want the 2, 1, 1, 1 ratio then you simply put the A value in twice and the other conditions in once. Then have the program randomly draw just one. See screen cap:
 

 


Thank you!


@bstrahin - Hi, what if the ratio is not simple, is there any other way out?

Thanks.


@bstrahin - Hi, what if the ratio is not simple, is there any other way out?

Thanks.

You can use JavaScript or a web service to set the embedded data field.


@TomG Hey, can you please explain what do you mean by that?

Although I am able to find an alternate way: generate a random number as embedded data. And then use the if branch to direct to a particular block. However, I am not sure about the equi-probable nature of random numbers!

Say, I want the 6 different conditions to appear in a ratio of 5:7:12:2:1:1; I can start by generating a number between  1 to 28 and then redirect to

Block 1 if number is between 1-5

Block 2 if number is between 6-12

Block 3 if number is between 13-24

Block 4 if number is between 25-26

Block 5 if number is 27

Block 6 if number is 28


@TomG Hey, can you please explain what do you mean by that?

Although I am able to find an alternate way: generate a random number as embedded data. And then use the if branch to direct to a particular block. However, I am not sure about the equi-probable nature of random numbers!

Say, I want the 6 different conditions to appear in a ratio of 5:7:12:2:1:1; I can start by generating a number between  1 to 28 and then redirect to

Block 1 if number is between 1-5

Block 2 if number is between 6-12

Block 3 if number is between 13-24

Block 4 if number is between 25-26

Block 5 if number is 27

Block 6 if number is 28

If you use JS or a web service you can control it any way you wish.  For example, you could create a quota for each group and randomly assign on a least fill basis to ensure you get the desired distribution. 

There is no guarantee of getting an even distribution using random numbers.  


If you use JS or a web service you can control it any way you wish.  For example, you could create a quota for each group and randomly assign on a least fill basis to ensure you get the desired distribution. 

There is no guarantee of getting an even distribution using random numbers.  

@TomG - I am new to this. Can you please explain by some example how can that be done?

Thanks for letting me know that the distribution won’t be uniform with random numbers. That certainly saves me!


Leave a Reply