2

I am using E-Prime (version 3) to design an experiment. In my script I have the following

Variable = Random(1,100)

This makes my variable a random number ranging from 1 to 100.

I would like to make this variable be a random value pulled from a normal distribution, rather than just a random number from 1 to 100. Is there a specific command that executes this in E-Prime? Or will I have to generate more code for this?

Kelley
  • 21
  • 1
  • I had a bit of a poke around the docs and didn't find a function for this. But since you have the ability to draw uniformly distributed random numbers, you can convert these to normally distributed random numbers with the Box-Muller method. There's demo code at wikipedia.org/wiki/Box–Muller_transform but you will have to translate from C to E-Prime. Hope this helps. – steveLangsford Sep 20 '19 at 14:01
  • @steveLangsford - this sounds like a good-enough answer to me! Can you convert it to an answer? Perhaps add a link or two to the sample code? – AliceD Sep 24 '19 at 09:08
  • I am unfamiliar with E-Prime, but can you make a number array of [1-100], draw a number, and then delete it from the array before drawing again? Hacks like this aren't the most elegant, but in the end they work. – AliceD Sep 24 '19 at 09:10

0 Answers0