Lab Assignment 5 (Lab projects?)

  1. Go though LabAssignment5.pdf LabAssignment5.pdf

  2. Download LabAssignment5.Rmd LabAssignment5.Rmd in RStudio and run codes inside. Things should be exactly same as LabAssignment5.pdf.

  3. Download, open LabAssignment5_boba.Rmd LabAssignment5_boba.Rmd and save as a new Rmd file for your own Lab Assignment submission. Knit this Rmd file to see if you can make a html, pdf or words. If you couldn’t, just use RStudio Cloud or the Binder RStudio Binder set by Po.

  4. Run/add/edit/delete the codes in your own copy of LabAssignment5_boba.Rmd and add/edit/delete some writings. Knit to see how the .pdf looks like. Tidy up the codes and writings. Knit and submit!

Lady tasting tea

https://en.wikipedia.org/wiki/Lady_tasting_tea

https://en.wikipedia.org/wiki/Fisher%27s_exact_test

https://en.wikipedia.org/wiki/Ronald_Fisher

https://en.wikipedia.org/wiki/Muriel_Bristol

One day at Rothamsted, Ronald Fisher offered Bristol a cup of hot tea that he had just drawn from an urn. Bristol declined it, saying that she preferred the flavour when the milk was poured into the cup before the tea. Fisher scoffed that the order of pouring could not affect the flavour. Bristol insisted that it did and that she could tell the difference. Overhearing this debate, William Roach said, “Let’s test her.”

David Salsburg reports that a colleague of Fisher, H. Fairfield Smith, revealed that in the actual experiment the lady succeeded in identifying all eight cups correctly.

tea <- matrix(c(4,0,0,4),2,2)
rownames(tea) <- c(paste0(emo::ji("tea"), emo::ji("milk_glass")), paste0(emo::ji("milk_glass"), emo::ji("tea")))
colnames(tea) <- c(emo::ji("smile"), emo::ji("upset"))
knitr::kable(tea)
😄 😫
🍵🥛 4 0
🥛🍵 0 4
fisher.test(tea, alternative="greater")
## 
##  Fisher's Exact Test for Count Data
## 
## data:  tea
## p-value = 0.01429
## alternative hypothesis: true odds ratio is greater than 1
## 95 percent confidence interval:
##  2.003768      Inf
## sample estimates:
## odds ratio 
##        Inf

Help/Documentation

There is no secret ingredient. – Mr. Ping 🍜

Read the R Documentation of every functions you have seen.

?fisher.test

How Po knows all those built-in functions in R?

R tutorials that help you survive in Village 🍄