Exercise

# Assessing the growth rate

To compute the growth rate, you can do a linear regression of the logarithm of the total bacterial area versus time. Compute the growth rate and get a 95% confidence interval using pairs bootstrap. The time points, in units of hours, are stored in the `numpy`

array `t`

and the bacterial area, in units of square micrometers, is stored in `bac_area`

.

Instructions

**100 XP**

- Compute the logarithm of the bacterial area (
`bac_area`

) using`np.log()`

and store the result in the variable`log_bac_area`

. - Compute the slope and intercept of the semilog growth curve using
`np.polyfit()`

. Store the slope in the variable`growth_rate`

and the intercept in`log_a0`

. - Draw 10,000 pairs bootstrap replicates of the growth rate and log initial area using
`dcst.draw_bs_pairs_linreg()`

. Store the results in`growth_rate_bs_reps`

and`log_a0_bs_reps`

. - Use
`np.percentile()`

to compute the 95% confidence interval of the growth rate (`growth_rate_bs_reps`

). - Print the growth rate and confidence interval to the screen. This has been done for you, so hit 'Submit Answer' to view the results!