Classical tests live in base R—t.test(), prop.test(), chisq.test(). Understand null/alternative hypotheses, p-values, and assumptions before trusting output.
t-test example
group_a <- c(88, 90, 85, 92)
group_b <- c(78, 80, 82, 79)
print(t.test(group_a, group_b))
Interpretation cautions
- p-value is not effect size
- Check normality/sample size assumptions
- Pre-register analysis plans in regulated industries
Important interview questions and answers
- Q: p-value meaning?
A: Probability of observing data at least this extreme if the null hypothesis were true—NOT P(null is true). - Q: t.test variants?
A: One-sample, two-sample, paired—match design to test function.
Self-check
- What function runs a two-sample t-test?
- Why is p-value not effect size?
Pitfall: p-values without effect sizes and CIs leave business questions unanswered.
Interview prep
- p-value misuse?
Not probability null is true; not effect size; not business significance alone.