NSCS 344, Week 7:
Assignment 7: Handling data in Matlab
*** Due date: Start of class in Week 8 ***
Part 1: Look at the data (2 points)
- Download the behavioral data from D2L
- Note: if you are doing the course online and are NOT at the University of Arizona, you can download a "fake" dataset here
- Load it into Matlab
- Use "whos" to see what variables have been loaded
- Print out the text of the questions to the Command Line
- Follow along with the notes to image the choice data
Part 2: Plot the choice curves of people (2 points)
- Follow along with the notes to plot the average choice curve of all participants in the data set
- Make sure you have EV_safe - EV_risky on the x-axis and f_safe on the y-axis
- Plot three choice curves for three individual people from the data set. Note the choice probabilities here will be either 0 or 1 because each person only makes one choice for each.
Part 3: Plot the softmax choice curve with the human choice curve
- Follow along with the notes to plot the softmax choice curve on the same plot as the human choice curve.
- Start with a value of sigma = 3
- Then make the same plot but with a smaller sigma (e.g. sigma = 1) and then a larger sigma (e.g. sigma = 10)
- Finally, see if you can tweak sigma to get as close as you can to the human curve. What's your best guess for sigma? What does that mean?
Part 4: Process the blink rates (2 points)
- Follow along with the text to compute the mean blink rate
- Use the nanmedian function to compute the median blink rate
- Use the nanstd function to compute the standard deviation of the blink rate
- Use the max and min functions to compute the max and minimum blink rates in the data set
- Plot the histogram of blink rates using the hist function
Part 5: Individual differences in risk taking (2 points)
- Follow along with the notes to compute the average risk taking for each person
- Use the hist function to compute the distribution over the average number of times people choose the risky option
Part 6: The correlation between risk taking and blink rate (2 extra credit points)
- Plot the relationship between risk taking and blink rate
- Use the lsline function to add a best fitting straight line
- Use the corr function to determine whether there is a statistically significant relationship between blink rate and risk taking.
Part 7: Looking at the relationship between blinks and choice in a different way (2 more extra credit points!)
Another way to look at the effect of blink rate on choice is to compute the choice curves (i.e. pRisk vs EV in Question 1) for high and low blink rate people. To do this, perform a median split on blink rate and compute the choice curves for high and low blink rate people. Does this plot give any additional insight into the relationship between blink rate and risk taking?