Random assignment, 2 groups


Author
Message
EN
EN
Associate Member (200 reputation)Associate Member (200 reputation)Associate Member (200 reputation)Associate Member (200 reputation)Associate Member (200 reputation)Associate Member (200 reputation)Associate Member (200 reputation)Associate Member (200 reputation)Associate Member (200 reputation)
Group: Forum Members
Posts: 50, Visits: 234
Hello,

There are 2 groups (A and B) in my Inquisit web study and I want to randomly assign participants to either group. Participants are re-directed to Inquisit through our local Sona system.
I noticed that so far more participants have been assigned to group B (23) than to group A (12) and would like to make sure that I'm doing things right before recruiting more participants (BTW, when I ran the pilot with 12 people, they were neatly assigned to each group in equal numbers).

The relevant IQX code looks like this:
--
<expt main1>
/groupAssignment = groupNumber
/blocks = [1=intro_procedure;
            ///...
            15=debrief_procedure]    
/groups = (1 of 2)
</expt>

<expt main2>
/groupAssignment = groupNumber
/blocks = [1=intro_procedure;
            ///...
            15=debrief_procedure]

/groups = (2 of 2)
</expt>
--
and in the Participant Ids settings:
--
Choose how participant ids should be generated

>> Sequential

Choose how the group id should be determined

>> Random with replacement

Enter the total number of groups (if any) in the experiment.

>> 2
--
If there is anything that needs to be corrected, would love to hear!
Thanks in advance,
EN




Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 108K
EN - 8/21/2025
Hello,

There are 2 groups (A and B) in my Inquisit web study and I want to randomly assign participants to either group. Participants are re-directed to Inquisit through our local Sona system.
I noticed that so far more participants have been assigned to group B (23) than to group A (12) and would like to make sure that I'm doing things right before recruiting more participants (BTW, when I ran the pilot with 12 people, they were neatly assigned to each group in equal numbers).

The relevant IQX code looks like this:
--
<expt main1>
/groupAssignment = groupNumber
/blocks = [1=intro_procedure;
            ///...
            15=debrief_procedure]    
/groups = (1 of 2)
</expt>

<expt main2>
/groupAssignment = groupNumber
/blocks = [1=intro_procedure;
            ///...
            15=debrief_procedure]

/groups = (2 of 2)
</expt>
--
and in the Participant Ids settings:
--
Choose how participant ids should be generated

>> Sequential

Choose how the group id should be determined

>> Random with replacement

Enter the total number of groups (if any) in the experiment.

>> 2
--
If there is anything that needs to be corrected, would love to hear!
Thanks in advance,
EN




> Choose how the group id should be determined

> >> Random with replacement

You should choose 'random without replacement' or sequential here; Random with replacement is essetially a coinflip, and if you toss a coin 10 times there is no guarantee whatsoever that it comes up 5x heads and 5x tails. In the without replacement case, for every set of two participants who hit the launch page, one will be randomly assigned to group 1, and the other to group 2. (Sequential works the same, except the 1st participant in every set of two gets group 1, the 2nd participant gets group 2.)

Also note that the group number is determined when a given participant hits the launch page, regardless of whether this participant ends up starting the experiment or decides to leave. That is: Even when generating group numbers randomly without replacement, you will get imbalances due to dropouts.
EN
EN
Associate Member (200 reputation)Associate Member (200 reputation)Associate Member (200 reputation)Associate Member (200 reputation)Associate Member (200 reputation)Associate Member (200 reputation)Associate Member (200 reputation)Associate Member (200 reputation)Associate Member (200 reputation)
Group: Forum Members
Posts: 50, Visits: 234
Dave - 8/21/2025
EN - 8/21/2025
Hello,

There are 2 groups (A and B) in my Inquisit web study and I want to randomly assign participants to either group. Participants are re-directed to Inquisit through our local Sona system.
I noticed that so far more participants have been assigned to group B (23) than to group A (12) and would like to make sure that I'm doing things right before recruiting more participants (BTW, when I ran the pilot with 12 people, they were neatly assigned to each group in equal numbers).

The relevant IQX code looks like this:
--
<expt main1>
/groupAssignment = groupNumber
/blocks = [1=intro_procedure;
            ///...
            15=debrief_procedure]    
/groups = (1 of 2)
</expt>

<expt main2>
/groupAssignment = groupNumber
/blocks = [1=intro_procedure;
            ///...
            15=debrief_procedure]

/groups = (2 of 2)
</expt>
--
and in the Participant Ids settings:
--
Choose how participant ids should be generated

>> Sequential

Choose how the group id should be determined

>> Random with replacement

Enter the total number of groups (if any) in the experiment.

>> 2
--
If there is anything that needs to be corrected, would love to hear!
Thanks in advance,
EN




> Choose how the group id should be determined

> >> Random with replacement

You should choose 'random without replacement' or sequential here; Random with replacement is essetially a coinflip, and if you toss a coin 10 times there is no guarantee whatsoever that it comes up 5x heads and 5x tails. In the without replacement case, for every set of two participants who hit the launch page, one will be randomly assigned to group 1, and the other to group 2. (Sequential works the same, except the 1st participant in every set of two gets group 1, the 2nd participant gets group 2.)

Also note that the group number is determined when a given participant hits the launch page, regardless of whether this participant ends up starting the experiment or decides to leave. That is: Even when generating group numbers randomly without replacement, you will get imbalances due to dropouts.

I'm glad I asked! Just changed to 'Random with replacement' so that --dropouts aside-- there will more balance between assignments to group A and group B!
Thank you as usual.
EN
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search