# Randomize multiple variables with multiple conditions

OS (e.g. Win7):
PsychoPy version (e.g. 1.84.2):

Hi, I have to create an experiment with two variables: first variable, “prime stimuli”, has three conditions (we call it F, S and P); second variable, “triads”, has two conditions (left and right). There are 60 images of target objects, so I create 180 prime stimuli (60 for each condition) and 120 triads (60 for each conditions).
The experiment consists in a fixation cross, a prime stimulus and a triad. I have to show only 60 of this sequence.
In the Builder mode, how could I make Psychopy randomize the selection of a prime stimulus from each of the three conditions list, and then match the related triad, but rondomizing its condition (left o right)?

Thanks a lot for help.

Hi Alfonso.

“Randomise” is a very ambiguous word in experimental design. You need to specify exactly what you mean, which will likely differ for each condition. Think about how you would explain it in a methods section of a paper.

Also, showing the first few rows of your conditions file would help us talk in more concrete terms.

I selected 60 target objects, on the basis of which I created 120 triads of objects. In these triads the target object was always in the center, and in 60 triads a related object was placed on his right, while on his left was palced a distractor; conversely, in the others 60 triads the related object was on the left, while the distractor on the right.

For each target object was also created 3 prime stimuli (one functional, one structural, one pointing): in total I have 180 prime stimuli.

The experiment provide the presentation of 60 triads (one for each target object), each of wich was preceded by a prime stimuli (relative to the same target object of the triad). In the experiment, 20 triads was preceded by a functional prime, 20 by a structural prime and 20 by a poitning prime. In the half of the triads the related object was on the right.

So Psychopy have to show, for each target object, one of the three prime relative to it, in a random manner, and then show the triad relative to the same object, with the related object on the right or on the left, in a random manner. The order of presentation of the target objects have also to be randomized.

I would make this in the Builder mode.

I hope I have been more clear. Thanks.