Lecture 8 Flashcards
Analytical Statistical Assessment in R
What is the goal of data analysis?
To understand underlying processes and find meaningful associations between variables.
What are some reasons for misleading associations in data analysis?
Not robust, Reverse causation, Common cause, Indirect effect, Common consequence.
What is the multiple testing problem?
Running many tests increases false positives.
Example: 100 million tests can lead to 5 million false positives at p ≤ 0.05.
When is the binomial test used?
When testing proportions for a binary outcome (e.g., coin tosses).
What is the null hypothesis in a coin toss experiment?
The coin is fair: H0:p=0.5.
How do you perform a binomial test in R?
binom.test(10, 12, p = 0.5, alternative = “two.sided”).
What is a contingency table used for?
To summarize frequencies of two categorical (binary) variables.
What is Fisher’s Exact Test?
A test for small sample sizes in contingency tables to determine association.
How do you run Fisher’s Exact Test in R?
cont_tab <- matrix(c(10, 20, 10, 70), nrow=2)
fisher.test(cont_tab, alternative = “greater”)