Chapter 17 Multiple choice questions

Quiz Content

not completed
. Before you start, make sure you have the BayesFactor package installed and activated. Download the data file for the multiple-choice questions for Chapter 17 , and open it in R.
The variable q1data contains some synthetic data created using the rnorm function, for 100 samples with a mean of 1 and a standard deviation of 3. Compute a one-sample t-test Bayes factor using the ttestBF function. The resulting Bayes factor:

not completed
. The variable q2data contains another set of 100 values. Calculate a Bayes factor for an independent samples t-test comparing q1data and q2data. The resulting Bayes factor:

not completed
. The variable q3data contains two variables (dv1 and dv2) that are correlated with r=0.48. Calculate a Bayes factor for a linear regression between the two variables using the lmBF function. The Bayes factor:

not completed
. The variable q4data is similar in structure to q3data, and produces a Bayes factor of 34. The two variables:

not completed
. The variable q5data contains data formatted for a one-way ANOVA with three groups (DV1-3). Plot these data to examine them. Then compute a standard ANOVA using aov(alldata ~ group, data = q5data), and a Bayes factor using the anovaBF function. The results reveal:

not completed
. We can produce plots of the posterior distributions for the t-test in Q1 by entering: plot(posterior(ttestBF(q1data),iterations=1000)). The peak of the sig2 density plot is around:

not completed
. The dataset puzzles is built into the BayesFactor package, and you can load it into the workspace by entering data(puzzles). It contains data on puzzle completion times (the DV, called RT) for different shapes (IV1, called shape) and colours (IV2, called color) of puzzles (e.g. jigsaws). Run a Bayes factor analysis for a two-way ANOVA with subject ID as a random factor as follows: anovaBF(RT ~ shape*color + ID, whichRandom = "ID", data = puzzles). Which model has the largest Bayes factor?

not completed
. Calculate a Bayes factor for the correlation between the two variables stored in q8data. The result suggests that:

not completed
. The within-participant correlation affects the power of repeated measures designs. The data object q9data is a 2 x 10 x 12 array. The first dimension is the two conditions from an experiment. The second dimension represents the correlation between repeated measures (10 levels increasing in magnitude). The third dimension represents observations from 12 subjects. Calculate the Bayes factor for a paired t-test for each level of correlation. As the correlation increases:

not completed
. Suppose that the probability of a man sporting a moustache is 0.1. However, during November lots more people grow moustaches for charity, and the probability of an individual man having a moustache increases to 0.3. Use Bayes rule to calculate the conditional probability that it is November given that you see a man with a moustache. The probability is:

Back to top