ASKurz / Doing-Bayesian-Data-Analysis-in-brms-and-the-tidyverse

The bookdown version lives here: https://bookdown.org/content/3686
GNU General Public License v3.0
147 stars 44 forks source link

Figure 11.11 #19

Open ASKurz opened 4 years ago

ASKurz commented 4 years ago

In Section 11.3.1, CI depends on intention, Kruschke presented several NHST simulations. In the previous issue, we focused on my difficulty with Figure 11.10. I believe my attempt at Figure 11.11 is not quite right, too. From the text, we read:

We can determine the CI for the experimenter who intended to test two coins, with a fixed N for both coins. Figure 11.11 shows the sampling distribution for different values of θ. The upper row shows the case of θ = 0.110, for which the sampling distribution has p = 2.5%. If θ is nudged any smaller, p is less than 2.5%, which means that smaller values of θ can be rejected. The lower row of Figure 11.11 shows the case of θ = 0.539, for which the sampling distribution has p = 2.5%. If θ is nudged any larger, p falls below 2.5%, which means that larger values of θ can be rejected. In summary, the range of θ values we would not reject is θ ∈ [0.110, 0.539]. This is the 95% CI when z = 7 and N = 24, for a data collector who intended to test two coins and stop when N reached a fixed value. (pp. 312--322)

Figure 11.11 looks like this: Screen Shot 2020-02-16 at 11 02 46 AM

If you have the chops to reproduce Kruschke's simulation and plot, please share your code. If at all possible tidyverse-oriented workflows are preferred.