Exercise

Reaction times

The website humanbenchmark.com has a fun reaction time test, which you should check out!

The test involves clicking your mouse when a green light appears, with the number of milliseconds y it takes for you to click is recorded.

Suppose you are interested in learning about my average reaction time in milliseconds M.

Assume that a single reaction time y is normal with mean M and known standard deviation s. The curve displayed to the right represents the sampling model for the observed reaction times.

Suppose that for a prior, you specify that M could be 250, 260, 270, 280, and 290 milliseconds, and you assign probabilities to these five values that reflect your opinion about my reaction ability.

Now you can construct and graph several possible priors for M!

Instructions

100 XP
  • Construct a probability vector Prior1 that reflects your belief that the five possible values of M are equally likely. The components of Prior1 should add up to 1.
  • Use the prob_plot() function to display this prior distribution. This function takes as its argument a data frame with variables Model and Prior1.
  • The value M = 270 reflects the reaction ability of a person with "average" reaction times. Construct a second vector Prior2 that reflects your belief that values between 250 and 260 seconds are three times more likely than values between 280 and 290 seconds. Suppose your belief that M = 270 is 0.2.
  • Use the prob_plot() function again to display this second prior distribution.