Randomly assign participants to differnet question groups

2 months 2 weeks ago #179936 by Ellaisa
Hello everyone,

I tried to randomly assign participants to differnet question groups.
I have created 2 different szenarios within 2 different questiongroups. Some people should see szenario 1 and the other szenario 2.
Therefore I created a question group (that is always hidden) including in one question the randomization with: if(is_empty(randnumber.NAOK), rand(1, 2), randnumber.NAOK) - question type is equation

Now I have created another question group, that is my first szenario. In the relevance euqation I have added: randnumber == "1"

Afterwards my questions for this szenario follow.

I have done the same with szenario number 2, only changed: randnumber == "2"

I tought that this should lead to a 50/50 randomization. Now I have started a pretest and I mostly offers szenario 1 (85% of participants).

Can anyone tell me what I have done wrong or could do better?

Thanks a lot!

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
2 months 2 weeks ago #179937 by tpartner
What is your sample size? The larger the sample size, the closer you will get to 50/50.

You might also try:

if(is_empty(randnumber.NAOK), rand(1, 100), randnumber.NAOK)

And then use relevance:

intval(randnumber) < 51
intval(randnumber) > 50

Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in or Create an account to join the conversation.

2 months 2 weeks ago #179938 by Ellaisa
Until now I have 40 completed questionnaires.
I was just wondering, as the first 10 were only scenario 1, afterwards 2x scenario 2 appeared and then it went on with scenario one.

I will try your solution!
Can you see any mistake in the way I did it? Or should it work out with a bigger sample size?
I need at least 100 participants

Please Log in or Create an account to join the conversation.

2 months 2 weeks ago #179940 by Joffm
Hi, Ellaisa

everything you did was fine.
But as always:
If you throw a coin 10 times, you won't expect it to be a 5/5 distribution.
If you throw it 100 times, you won't expect a 50/50 distributiion, but will be nearer to a 50%/50%.

I just tested:
40 times with randnumber=rand(1,2): 19 times 1, 21 times 2
40 times with randnumber=rand(1,100): 18 times 1-50, 22 times 51-100

To be able to finetune a distribution survey, I prefer the following:
1. create your random number : r1=rand(1,100)
2. The relevance of your 2 scenarios is: r1<51, resp. r1>50.

If you see that the distribution gets unbalanced, just change the relevance equation (e.g. too much "2") like
scenario 1: r1<31
scenario 2: r1>30

or even (you only need "2")
scenario 1: r1==0
scenario 2: r1>0

You can do this, even if the survey is activated.

Best regards

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!