$\$
# install.packages("latex2exp") library(latex2exp) knitr::opts_chunk$set(echo = TRUE) set.seed(230)
# get some images that are used in this document SDS230::download_image("gingko_pills.jpg") SDS230::download_data("gingko_RCT.rda")
$\$
$\$
$\$
Joy Milne claimed to have the ability to smell whether someone had Parkinson’s disease.
To test this claim, researchers gave Joy 6 shirts that had been worn by people who had Parkinson’s disease and 6 people who did not.
Joy identified 11 out of the 12 shirts correctly.
Let's run a hypothesis test to assess whether there is significant evidence to suggest that Joy can really could smell whether someone has Parkinson's disease.
$\$
In words:
Using symbols
Rules of the game
$\$
$\$
$\$
$\$
$\$
Questions
Do you believe Joy can really smell Parkinson's disease?
Is it better to report the actual p-value or just whether we rejected the null hypothesis $H_0$?
$\$
Let's us examine the randomized controlled trial experiment by Solomon et al (2002) to see if there is evidence that taking a gingko pills improves memory. To read the original paper see: https://jamanetwork.com/journals/jama/fullarticle/195207
$\$
load("gingko_RCT.rda") # plot the data # create a stripchart
$\$
$\$
# combine the data from the treatment and placebo groups together # use a for loop to create shuffled treatment and placebo groups and shuffled statistics # shuffle data # create fake treatment and control groups # save the statistic of interest # plot the null distribution as a histogram
$\$
# plot the null distribution again with a red line a the value of the observed statistic # calculate the p-value
$\$
$\$
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.