Parameter estimation: active bout length
Compute the mean active bout length for wild type and mutant, with 95% bootstrap confidence interval. The datasets are again available in the numpy arrays bout_lengths_wt and bout_lengths_mut. The dc_stat_think module has been imported as dcst.
Cet exercice fait partie du cours
Case Studies in Statistical Thinking
Instructions
- Compute the mean active bout length for wild type and mutant using
np.mean(). Store the results asmean_wtandmean_mut. - Draw 10,000 bootstrap replicates for each using
dcst.draw_bs_reps(), storing the results asbs_reps_wtandbs_reps_mut. - Compute a 95% confidence interval from the bootstrap replicates using
np.percentile(), storing the results asconf_int_wtandconf_int_mut. - Print the mean and confidence intervals to the screen.
Exercice interactif pratique
Essayez cet exercice en complétant cet exemple de code.
# Compute mean active bout length
mean_wt = ____
mean_mut = ____
# Draw bootstrap replicates
bs_reps_wt = ____(____, ____, size=____)
bs_reps_mut = ____
# Compute 95% confidence intervals
conf_int_wt = ____(____, [____, ____])
conf_int_mut = ____
# Print the results
print("""
wt: mean = {0:.3f} min., conf. int. = [{1:.1f}, {2:.1f}] min.
mut: mean = {3:.3f} min., conf. int. = [{4:.1f}, {5:.1f}] min.
""".format(mean_wt, *conf_int_wt, mean_mut, *conf_int_mut))