Exercise

# Updating by Bayes' rule

Good work!

The vector `times`

contains ten reaction time measurements. These times are assumed to be a sample from a normal curve with mean `M`

and standard deviation `s`

= 20 milliseconds. For these data, \(\bar y = 275.9\) and \(se = 6.32\).

In the editor, the vectors `M`

, `Prior`

, `times`

, and constants `ybar`

, `se`

are defined.

Instructions

**100 XP**

- Use the
`dnorm()`

function to compute the likelihoods. - Create a data frame
`bayes_df`

containing`M`

,`Prior`

, and`Likelihood`

. - Compute the posterior probabilities using the
`bayesian_crank()`

function and save the result back to`bayes_df`

. - Use the
`prior_post_plot()`

function to compare the prior and posterior probabilities for`M`

.