Correctness of Response in Labvanced
In many experiments, participants are asked to respond to a stimulus—for example by pressing a key, clicking a button, or typing an answer. Correctness of response refers to whether the participant’s answer matches the expected (correct) answer.
Labvanced allows you to define what counts as a correct response and automatically evaluate participant performance.
The Big Picture
In Labvanced, response correctness is typically handled using:
- Input elements (how participants respond)
- Variables (store responses and correct answers)
- Conditions / logic (compare response vs. correct answer)
The general flow looks like this:
- Show a stimulus
- Collect a response
- Compare response to the correct answer
- Store whether it was correct or incorrect
Step 1: Collecting a Response
First, you need a way for participants to respond.
Common input elements:
- Buttons (e.g.,
Yes/No) - Keyboard input (e.g., press
ForJ) - Text fields (typed answers)
Each response is automatically stored in a Variable.
Example:
- Button click → variable named
response= stores valueyes
Step 2: Defining the Correct Answer
Next, you define what the correct response should be.
There are two common approaches:
Option A: Fixed Correct Answer
- You manually set the correct answer
- Example: Correct answer =
yes
Option B: Variable-Based Correct Answer
- The correct answer changes per trial using data frames or the
Trial System - Stored in a variable (e.g.,
correct_answer)
Example:
- Trial 1 → correct_answer =
cat - Trial 2 → correct_answer =
dog
This is useful when using multiple stimuli.
Step 3: Comparing Response to Correct Answer
Now you check whether the participant’s response is correct.
This is done using conditions (if statements):
Example logic:
if
response==correct_answer, then:Accuracy= 1
else:Accuracy= 0
In Labvanced, this is created visually using the logic editor (no coding required).
Step 4: Storing Correctness
The result of the comparison is usually stored in a variable such as:
Accuracy(1 = correct, 0 = incorrect)
This allows you to:
- Analyze accuracy later
- Filter trials
- Compute performance metrics
Step 5: Providing Feedback
You can show participants whether they were correct.
Common feedback:
- “Correct!”
- “Incorrect”
- Visual cues (green/red screen)
This is done by:
- Adding a feedback frame
- Displaying different content based on the
correctnessvariable
Example:
- If correct → Jump to “Correct!” frame
- If incorrect → Jump to “Incorrect” frame
Step 6: Using Correctness in Trial Flow
Correctness can also control what happens next.
Examples:
- Repeat trial if incorrect
- Move on only after correct response
- Adjust difficulty dynamically
This is done using conditional branching.
Example: Simple Choice Task
Experiment flow:
- Show an image (e.g., a fruit)
- Participant presses a key:
F= AppleJ= Banana
- Compare response to correct answer
- Show feedback
- Next trial
In Labvanced:
- Store correct answer per trial
- Capture key press
- Compare using logic
- Save correctness
Tips for Beginners
- Keep variable names clear (
response,correct_answer,correctness) - Test your logic with a few trials
- Use simple conditions before building complex ones
- Double-check that response formats match (e.g., text vs. key codes)
Summary
Correctness of response in Labvanced involves:
- Collecting responses (buttons, keys, input)
- Defining correct answers (fixed or variable)
- Comparing responses using logic
- Storing results for analysis
- Providing feedback to participants
Essentially, the approach you should pick depends on the task you are designing. If you need a suggestion, please reach out to our support!
Once set up, Labvanced automatically tracks accuracy, making it easy to analyze participant performance.