Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

conditioned randomization


I have 32 words to be presented in the middle screen (Focal) along with another 32 words to be presented either on the left or right the screen (Periphery). If I use completely randomized design, there would be 1024 compositions, but I want to present only 32 pairs randomly selected from the possible pairs of 32 focal and 32 periphery words.

Please can you kindly advice how to deal with this randomized selection ?

Thanks in advance,



  • Hi Masoud,

    What do you mean with:

    but I want to present only 32 pairs randomly selected from the possible pairs of 32 focal and 32 periphery words.

    YOu can shuffle both word lists and then just select one by one from each list. Would that work?


  • Dear Eduard,

    Please could you advice how to to this? Is there need for an inline script?


  • Yes, I think so.

    Syntax is straightfoward:

    import random
    list1 = [1,2,3]
    list2 = [4,5,6]
    combined_list = [(l1,l2) for (l1,l2) in zip(list1,list2)]

    Now you have a list of lists (representing trials). Within a trial list, the first item can be shown in the center and the second on in the periphery.


    Thanked by 1mfp49
  • Dear Eduard


    I have the following variables in the Loop:

    correct_response focal periphery periphery_position





    The participant is expected to press RCTRL when see a reading stuff in the middle screen otherwise LCTRL.

    Shall I use the "list1" and list2" as the column names in the Loop? Please kindly advice where to introduce the variable names in the inline script?



  • Hi Masoud,

    No, you have to use Inline coding to define these lists (i.e. onelist = focal, secondlist=peripherie). Once randomized, and matched, you have to put another inline script in the loop sequence, in which you extract the current pair from the list (based on the current trial number). That means, that in your loop table, you only need a trial counter ( a variable that counts from 0-31). Based on that counter you can index the lists, set the correct response (e.g. "if reading in middle: correct_response = RCTRL"), and the position of the words.

    Hope this helps. In any case, try to get started on it and see how far you get. Maybe learning some Python in the mean time will also be very helpful, certainly on the long run.


    Thanked by 1mfp49
Sign In or Register to comment.