Observational study: can show the correlation between two variables but difficult to show causation. This is because there could be a confounding variable causing both to happen (e.g. voluntary assignment).
Randomized experiment (Gold Standard): avoids the issues with confounding variables by comparing two groups (treatment and control) that look on average the same.
Confounders: alternative explanations for differences between the experimental groups. Confounding variables correlate with both the experimental groups and the outcome variable.
Does eating ice cream cause drowning?
Experiment:
Control group: do not eat ice cream
Treatment group: eat ice cream
We randomly divide a population into the treatment and control groups and compare the number of drownings between groups.
We have survey data of the number of monthly ice cream sales and number of monthly drownings and calculate a correlation of 0.85.
Randomized assignment helps separate causation from correlation.
Additionally, randomized assignment helps rule out confounding variables.
Bernoulli trial = randomized experiment with exactly two outcomes.
rbernoulli(n = ____, p = ____)It can be framed as a “yes or no” (success or failure) question.
Examples:
