Skip to content

Commit

Permalink
feat: added info about multiple seeds
Browse files Browse the repository at this point in the history
  • Loading branch information
nandanrao committed Mar 3, 2024
1 parent 747b888 commit 4e6db2a
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions content/fly/reference/seeds.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
---
title: Random Seeds
title: Randomization
weight: 7
---

## Using Random Seeds for Randomizing Logic
## Using Random Numbers for Randomizing Logic

Seeds work via hidden fields. Create a hidden field named `seed_N`, where `N` is replaced with the number of arms you wish to randomize. For example: `seed_2`, `seed_3`, `seed_4`, `seed_5`,..., `seed_100`.
Each respondent is given a set of random numbers, known as a "seed". Seeds work via hidden fields. Create a hidden field named `seed_N`, where `N` is replaced with the number of arms you wish to randomize. For example: `seed_2`, `seed_3`, `seed_4`, `seed_5`,..., `seed_100`.

This hidden field will have the assignment of each user, which will be an integer between 1 and N. For example, if you made a hidden field called `seed_3`, each user will have a value of that field equal to 1, 2, or 3.

Now use the hidden field in your logic jumps. If, for example, you create a hidden field called `seed_3`, then create logic jumps such that:

if `seed_3 == 1` do A, if `seed_3 == 2` do B, if `seed_3 == 3` do C.

## Using Multiple Random Numbers

Say you want to randomize twice in your survey, independently, what can you do?

You can create multiple seeds, with the same bucket size, by using the format `seed_N_V` where `N` is replaced with the number of arms, as before, but `V` is used to represent a different version. For example: `seed_3`, `seed_3_1`, and `seed_3_2` will ensure that you can have three distinct random arms, each of which is independent from the other.


## Testing Random Seeds

Random seeds can be tested just like any other hidden field, using the following format (testing seed_2):
Expand Down

0 comments on commit 4e6db2a

Please sign in to comment.