Exercise

A continuous prior

Suppose that an average reaction time of M = 240 milliseconds (or smaller) is considered "fast", and a reaction time of M = 280 (or higher) is considered "slow".

My friend John thinks that (1) the probability that I am "fast" is 0.02 and (2) the probability that I am "slow" is 0.40.

In other words, the 0.02 quantile of M is 240 and the 0.60 (1 - 0.40) quantile of M is 280. You can specify a single quantile as a list, for example:

quantile1 <- list(p = 0.02, x = 240)

Now you can use the normal.select() function to find John's normal prior!

Instructions

100 XP
  • Specify a list of values p and x for John's first and second quantiles.
  • Use the normal.select() function to find the vector of beta parameters. Store the result in a list called normal_par.
  • Use the normal_draw() function to plot John's prior curve.