Domandata
FeaturesProductPlansAboutHelp
Sign InCreate Free Account
Back to Help
Flow

Random Variables and Permutation Assignments

Create hidden randomized values with random-mode variables, and fill several slots at once with permutation sets.

When To Use A Random Variable Or Permutation Set

Not every random draw needs to be a visible branching arm. Flow's Variables section can create a hidden random-assignment value — useful for randomizing an incentive amount, a message variant referenced only through pipe text, or a label you will branch on later without building a full condition set for it. Flow's Permutation assignments section does something different: it fills several named variables at once from a shared pool of values, such as assigning distinct role labels or ordering a fixed set of names per respondent.

Flow: Variables and Permutation Assignments

For assigning respondents to visible treatment arms and blocks, use experimental conditions instead. For the underlying even-vs-random choice that both features share with condition arms, see How Randomization Works.

Random-Mode Variables

  • Outcomes in set: each respondent is assigned one label from a list you define, such as low, medium, or high — or three incentive amounts, or three message variants.
  • Assignment percentages: default to an equal split across outcomes; edit any percentage to set a custom weighted split. Totals must be 100% (±1%).
  • Balance outcome sizes: choose even (block/balanced) or random (independent) assignment, the same choice available for condition-set arms. See "Even vs. Random" below.
  • Where the value goes: the resolved label is not shown to the respondent by itself. Reference it in pipe text, use it as the source for a "By Variable" branch, or use it to stratify a condition set.

Flow: Add a Random-Mode Variable

Permutation Assignments

A permutation set fills several ordered slot variables from one shared pool of values in a single seeded draw per respondent — for example, four slots named bot1 through bot4, each filled from a pool of candidate names, so every respondent sees the same four names but in an independently shuffled order.

  • Without Replacement: shuffles the pool and takes the first N values, one per slot. No value repeats within one respondent's set. The pool needs at least as many non-empty options as slots; extra options are ignored after shuffling.
  • With Replacement: each slot independently draws a uniform random value from the pool. Values can repeat within one respondent's set. The pool needs only one option and can be smaller than the slot count.
  • Slot variables: each slot is its own flow variable, so it can be renamed and referenced in pipe text or branching exactly like any other variable — it just shows "Permutation" as its source instead of "Question" or "Random."

Flow: Build a Permutation Set

Use Without Replacement when slots represent distinct roles or positions that should never collide (four different candidate names in four slots). Use With Replacement when slots are independent and repeats are fine or even expected (four independently randomized prices, where two prices happening to match is not a problem).

Configure It In Domandata

  1. Step 1: Open Flow. Select the Flow tab, then open the Branching panel.

    Step 1: Open Flow

  2. Step 2: For a hidden random value, add a Variable. Under Variables, add one, set its Source to Random Assignment, and list the outcomes with their percentages.

    Step 2: Add a random-mode variable

  3. Step 3: Decide even or random. Turn on Balance outcome sizes only if the study needs guaranteed cell sizes across the whole sample; leave it off for an independent draw per respondent.

    Step 3: Choose balancing

  4. Step 4: For several coordinated values, add a Permutation Set instead. Under Permutation assignments, add a set, choose Without Replacement or With Replacement, then list the slot variables and the value pool.

    Step 4: Build a permutation set

  5. Step 5: Name the variables for export and piping. Give each random or slot variable a short, stable name (such as incentive_amount or bot1) before referencing it elsewhere.

    Step 5: Name variables

  6. Step 6: Preview several times. Confirm the resolved values look right and that piped text reads naturally across a few draws.

    Step 6: Preview draws

Even vs. Random

Random-mode variables offer the same even (block/balanced) vs. random (independent) choice as condition-set arms: even draws each respondent from a pool that favors whichever outcome is currently below its target share, so outcome sizes stay balanced throughout the study; random draws each respondent independently, matching the target percentages only on average. Preview always uses an independent random draw regardless of this setting, so testing never consumes a real balance slot. Permutation assignments do not have a separate even/random toggle — Without Replacement already guarantees each respondent's own slots are distinct, and With Replacement is an independent draw by design. For the full picture across every randomization surface, see How Randomization Works.

Related Help

  • How Randomization Works
  • Create Experimental Conditions
  • Sample Allocation Across Condition Arms
  • Pipe Text From Variables and Answers
  • Survey Variable Names and Recodes