Random number generator


Author
Message
paughl
paughl
Guru (8.7K reputation)Guru (8.7K reputation)Guru (8.7K reputation)Guru (8.7K reputation)Guru (8.7K reputation)Guru (8.7K reputation)Guru (8.7K reputation)Guru (8.7K reputation)Guru (8.7K reputation)
Group: Forum Members
Posts: 46, Visits: 154
Hi again,

Does Inquisit have a simple random number generator?

I'm wanting to connect my inquisit script to MTurk, and to verify that participants have completed the task, I want to generate and display a random number within a set range (eg: higher than 160,000 and lower than 165,000) at the final inquisit page. Participants will then need to input this number into Mturk, allowing me to verify that they completed the task if the number is within the specified range.

Thanks in advance,
paul
maf1974
maf1974
Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)Esteemed Member (2K reputation)
Group: Forum Members
Posts: 8, Visits: 45
Hi Paul,
I did this by combining the Inquisit survey with a Qualtrics survey.  You may be able to do this purely in Inqusit alone but I don't know how. 

I set up a Qualtrics survey to provide participants with an information and consent page, asked them a few demographic questions, randomly assigned them to some experimental groups and then redirected them to the Inquisit link to do the Age IAT (the dependent variable in my study). After completing the IAT they were redirected back to Qualtrics which used an embedded web service element to generate random confirmation codes that participants then enter in to MTURK to confirm their participation.

Are you using any other survey provider, or just Inquisit?
Mike

paughl
paughl
Guru (8.7K reputation)Guru (8.7K reputation)Guru (8.7K reputation)Guru (8.7K reputation)Guru (8.7K reputation)Guru (8.7K reputation)Guru (8.7K reputation)Guru (8.7K reputation)Guru (8.7K reputation)
Group: Forum Members
Posts: 46, Visits: 154
Thanks for your response Mike. No, just using Inquisit.
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
Yes, Inquisit has a rand() function (and others) you can use to do this easily. See the functions reference for details.

<values>
/ myvalue = 0
</values>

<trial mytrial>
/ ontrialbegin = [values.myvalue = floor(rand(160001,165000))]
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>

<text mytext>
/ items = ("Your random code: <%values.myvalue%>")
</text>

paughl
paughl
Guru (8.7K reputation)Guru (8.7K reputation)Guru (8.7K reputation)Guru (8.7K reputation)Guru (8.7K reputation)Guru (8.7K reputation)Guru (8.7K reputation)Guru (8.7K reputation)Guru (8.7K reputation)
Group: Forum Members
Posts: 46, Visits: 154
Thanks a bunch Dave. Champ!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search