knitr::opts_chunk$set(echo = TRUE)
library(SDS100)

Lie detector hypothesis test

$\$

# step 1: state null and alternative hypotheses





# step 2: compute observed statistic 
# (out of 48 questions, made correct detections 31 times)





# step 3: create the null distribution






# plot the null distribution







# step 4: calculate the p-value





# 5. decision?

What would have happened if we had tested whether lie detector tests get it correct more than 50% of the time?

$\$

Should you choose B on a multiple choice test?

Multiple-choice questions on Advanced Placement exams have five options: A, B, C, D, and E. A random sample of the correct choice on 400 multiple-choice questions on a variety of AP shows that B was the correct answer 90 of the 400 questions. Does this provide evidence that B occurs at a different rate than what is expected if each question is equally likely?

Please run a hypothesis test to find out!

$\$

# step 1: state null and alternative hypotheses




# step 2: compute observed statistic




# step 3: create the null distribution







# plot the null distribution








# step 4: calculate the p-value





# 5. decision?





# FYI: You don't need to look at the actual data to solve this problem, 
# but if you'd like it can be loaded using:
#  APMultipleChoice <- Lock5Data::APMultipleChoice



# Bonus, can you create a 95% CI for the proportion of answers that are B? 

$\$



emeyers/SDS100 documentation built on April 28, 2024, 5:07 p.m.