Skip to content

Yesterday I watched a friend suffer the consequences of not knowing the best way to get Qualtrics to spit out data in the easiest form. Instead of having a single outcome variable (what he was measuring to gauge the effects of a manipulation) and a single between-groups variable (one that reflected the random assignment), he had many variables, some of which were coded differently, that he had to combine.

That’s a headache, in any statistical software. So here I will walk you through how to set up a simple experiment on Qualtrics in a way that will give you a single outcome variable and a single predictor variable (factor or between-groups variable). My blog post on using logic can help with more complex designs. At a later date I might cover how to make sure all similar variables are coded the same way in Qualtrics.

Our example research question:

What kind of media makes people more anxious, the news or reality TV? We will have people self-report anxiety for the outcome variable.
Participants will be randomly assigned to one of two conditions, News or Reality TV.
Participants will watch a 3 minute clip (news or reality TV) and then complete the anxiety scale.
In the real world, we’d also be collecting demographics and possibly some other information. These will be included in our first block.

Basic set up for random assignment in Qualtrics:

You will need four blocks on Qualtrics

  1. Consent and demographics.
  2. News stimulus block
  3. Reality TV stimulus block.
  4. Outcome variable block.
First step: set up your blocks in the initial screen you get after creating a new survey:
random assignment in Qualtrics
Once you have your four blocks, select Survey Flow from the top tabs:
random assignment in Qualtrics
You will then be able to set up your random assignment on this screen:
initial survey flow
Blocks are presented to participants in order.
  1. Add a Randomizer block below your Consent by selecting “Add Below”calick here one
  2. You will get lots of options for Add Below. Select randomizerclick here 2
  3. Qualtrics will randomly assign participants to one or more of anything you put below this. You will need to click and drag your conditions to where it says “Add new element here)randomizer
  4. Below, you can see that I have dragged both stimuli blocks below the randomizerrandomizer 2
  5. If you leave it like this, all participants will see both clips:Set to one
    Select the quantity of blocks you wish each participant to view.
  6. You will need to set that to “1” to present only one clip. You can also select “Evenly present elements,” which is minor violation of random assignment, but will prevent randomicity from happening in a disagreeable fashion (e.g., getting 75 people in group 1 and 25 in group 2. The larger the sample, the less you need to worry about this).
    Final view of randomizing block below.Randomizer done
  7. As it is set up, participants will view (and complete) block one (consent and demographics), and then be randomly assigned to one of the two conditions.
    They will then all be presented with the Anxiety block (and complete the Anxiety Scale).
    When you download the data, you will get separates variable for the people assigned to News and TV (e.g., the variable that indicates the stimulus has been presented, and anything else, such as a timing variable that is on the separate blocks).
    You will get single variables for the Anxiety Scale (e.g., everyone will have A1, A2, A3, A4… completed in the same columns)
  8. If you have any other blocks (e.g., questionnaires for covariates), you can put them below the Anxiety block, and everyone will see them. Or you can just add an end of survey block, as I have done below:complete flow
  9. In real life, I have a customized end of survey message, but above it is just the Qualtrics standard.

End of Survey block

random assignment in Qualtrics

If you put an “End of Survey” block below a randomizer or any other sub-block, participants will not be presented with any further blocks (higher up in tree, but below the End block).

There are plenty of reasons to do this, but I won’t go into it now.

If you want to add a control condition, there are several ways to do it. You can set up a control block, with an innocuous message (matched in experimental blocks), that will be part of the random assignment below our randomizing block. Or you can set up a series of if-then statements, but that’s a bit more work.

To get a variable that specifies what condition each participant was assigned to, you need to select “export viewing order data for randomized surveys” when you download the data (export function on the Data and Analyses tab). You can then either use this variable (it will state the block each participant was assigned to) or recode it into a numerical variable, depending on the needs of your analyses and statistical software.

I’ll stop here for now, because this is the basic format. If you have a question, feel free to comment and I’ll try to answer it.

For questions concerning logic (conditional display of questions, etc) see my new post: Qualtrics tips: Using Logic.

To learn how to efficiently export data from randomization, see my blog post on Downloading Data from Qualtrics.

Feeling grateful for all the time I’ve just saved you? Please buy me a coffee via Ko-Fi by clicking on the link below!
Buy Me a Coffee at ko-fi.com

26 thoughts on “Random assignment in Qualtrics”

  1. Hi Jessica, thank you so much for your explanation! I just exported my data from Qualtrics into SPSS, but it is not very clear to me how I analyse the data in regards to the randomisation now. Do I have to make a new item in SPSS which summarizes my 6 different advertisements (I have a between-subject experimental design)?

    1. Do you have 6 conditions, or fewer conditions (2-3) with random assignment within condition?
      If you have 6, then the easiest thing to do is an automatic recode (under transform). That will need to be your first step in any case! This is assuming that you exported randomized order information from Qualtrics… then you just recode that variable.
      If you have fewer conditions, you will need to then make a new variable with the specific conditions (recode into different variable)

  2. Hello,
    I’m working on a research project where we have created 2 questionnaires. One of them has condition x and the other one has condition y. I was wondering how I can make sure participants will get randomly assigned to one of the two questionnaires. Could you help me?
    Thanks in advance,

  3. Hi Jessica,
    I understand that it is possible to create different cells in qualtrics for an experimental study and randomly assign our sample to these cells.
    Is it also possible to add a condition which helps us to move our sample to cells according to their gender, age or income randomly? Because in some experimental studies it is important to have equal number of demographic factors of sample in each cell ( like for 50 people in each cell, 25 man, 25 woman). Can we do this in qualtrics as well ?
    Thanks alot.

  4. Hi again Jessica,
    For conducting an experimental study and randomly assign our sample to cells (for example we have 8 condition in factorial design), and also randomly and in equall numbers assingning that sample to cells according to their gender (like for 50 people in each cell, 25 man, 25 woman); do I need to use randomization or block randomization??
    Thanks.

  5. Pingback: Qualtrics tips: Using logic | jessica e black

  6. Hello Jessica,
    Thanks for your help. I have a question regarding this. I have a survey covering 5 products (so five parts). Each product /part has 8 blocks of questions. I have followed a similar instruction to what you have given here and have randomized how respondents will interact with the survey. As it is now, respondent A who is randomnly assigned question 1 of product 1, is randomnly assigned to question 3 of product 2, then to question 8 of product 3, ect…
    What i really want is for respondent A who assigned to question 2 of product 1, to be assigned to question 2 of product 2, then to question 2 of product 3 until the end.
    I want the order of assignment to product 1, to continue in the following blocks. Any idea how i can do that ? I tried branching but this is pulling individual question but not an entire block.
    Thank you.

    1. If I understand correctly, each participant should answer the same question for each product (and only that one question per products), correct? And you only want ONE random assignment, to the first product/question combo? If so, you will need to set up a block for each question and product. Randomly assign to product/question (amongst all 40 options, if I understand correctly), and then set up if-then branching statements such that if participant originally is assigned Product 1, question 2 s/he then is presented with P2-Q2, P3-Q2, and so forth (this is all under the same branch, and you will need 40 branches… well, depending on how you do it).
      There are many ways to do this, with more or fewer instances of randomization. You could more simply randomly assign to question number, and then within that, present product blocks in random order.
      Let me know if this isn’t quite what you want to do!

  7. Pingback: Qualtrics tips: Using logic : Wild World of Research

  8. Pingback: Tips on using MTurk with Qualtrics : Wild World of Research

  9. Pingback: Qualtrics tips: Embedded data : Wild World of Research

  10. Pingback: How to prepare and submit an IRB application successfully

  11. Pingback: Downloading data from Qualtrics : Wild World of Research

  12. Pingback: How to insert videos in Qualtrics : Wild World of Research

  13. Hello Jessica,
    Thanks for your help. I have a question regarding this . For my research I employed a 2 (influencer-product congruence: congruent vs. incongruent) x 2 (influencer-consumer: congruent vs. incongruent) between-subjects experimental My question is the follow, I don’t know how to fulfill the experience conditions in Qualtrics

    1. You can randomly assign to 1/4 cells (con1-con2, con1-inc2, con2-inc1, inc1-inc2).
      Or you can randomly assign for factor 1 first and then use logic to randomly assign to factor 2 within each condition of factor 2.

  14. Hello Jessica I’m back once again, in the case of my search
    For the 4 conditions it makes 4 block in Qualtrics ,now my question is the follow since the 4 conditions have the same questions, how should I do to fulfill the 4 conditions with the same questions thanks again

Leave a Reply