| Reference | Downloads | Github

How to add random intervals

I would like to add a random interval of 100 to 500ms between the alerting (auditory beep) in the trial and the onset of the stimulus. But I can’t find anything on that.

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10):
PsychoPy version (e.g. 1.84.x):
Standard Standalone? (y/n) If not then what?:
What are you trying to achieve?:

What did you try to make it work?:

What specifically went wrong when you tried that?:
Include pasted full error message if possible. “That didn’t work” is not enough information.

You really need to define this with the level of detail you would use in describing it in the methods section of a paper of thesis. “Random” encompasses a lot of possibilities.

e.g. a random value sampled from the uniform distribution of values between 100 and 500 ms with a granularity of 1 screen refresh duration, drawn independently on every trial?

or discrete values of 100, 200, 300, 400, or 500 ms drawn pseudo-randomly so that each value was balanced by being presented the same number of times within a session, but with the sequence of presentation vary randomly across subjects.

or …

or …