Case Studies in Statistical Thinking
Justin Bois
Lecturer, Caltech
Assessment of how reasonable the observed data are assuming a hypothesis is true
The probability of obtaining a value of your test statistic that is at least as extreme as what was observed, under the assumption the null hypothesis is true
The probability of obtaining a value of your test statistic that is at least as extreme as what was observed, under the assumption the null hypothesis is true
Requires clear specification of:
Null hypothesis: the active bout lengths of wild type and heterozygotic fish are identically distributed
Test statistic: Difference in mean active bout length between heterozygotes and wild type
At least as extreme as: Test statistic is greater than or equal to what was observed
For each replicate:
perm_reps = dcst.draw_perm_reps(
data_a, data_b, dcst.diff_of_means, size=10000
)
p-value is the fraction of replicates at least as extreme as what was observed
p_val = np.sum(perm_reps >= diff_means_obs) / len(perm_reps)
Case Studies in Statistical Thinking