Experiments 🔗

study, rct, randomized controlled trial, randomize, balance, randomization, equal groups, measure

The *experiment keyword operates just like *randomize except it keeps group numbers balanced. So if you are randomizing people into groups A, B, and C, the first participant to take your study could randomly be assigned any one of those. Let's say they get assigned group B. The second participant could only be assigned A or C, since B was just taken. If they get assigned C, then the third participant will be in group A. The fourth participant once again has an equal chance of being assigned any one of the three groups. This ensures that the difference in the size of the groups is never more than 1.

*experiment: My_Experiment
	*group: GroupA
		For the next 10 seconds, visualize yourself in a warm, happy place.
		*wait: 10.seconds

	*group: GroupB
		For the next 10 seconds, write about a warm, happy place.
		*question: My warm happy place is…

	*group: GroupC
		For the next 10 seconds, visualize yourself in a cold, miserable place.
		*wait: 10.seconds

Unlike *randomize , it doesn't make sense for *experiment to choose more than one group. So, instead of using the inline text to specify how many things to randomize (e.g., *randomize: 3 , *randomize: all ), *experiment uses it to name the experiment so that the CSV is much easier to read.

In most cases, when you're running an actual experiment (where you want to see how a change in one thing in the program affects some other thing) you should use *experiment . When you merely want things to be random (but you're not conducting an experiment) *randomize is probably the right choice.


Next: