ComeçarComece de graça

Parameter estimates of beak depths

Estimate the difference of the mean beak depth of the G. scandens samples from 1975 and 2012 and report a 95% confidence interval.

Since in this exercise you will use the draw_bs_reps() function you wrote in chapter 2, it may be helpful to refer back to it.

Este exercício faz parte do curso

Statistical Thinking in Python (Part 2)

Ver curso

Instruções do exercício

  • Compute the difference of the sample means.
  • Take 10,000 bootstrap replicates of the mean for the 1975 beak depths using your draw_bs_reps() function. Also get 10,000 bootstrap replicates of the mean for the 2012 beak depths.
  • Subtract the 1975 replicates from the 2012 replicates to get bootstrap replicates of the difference of means.
  • Use the replicates to compute the 95% confidence interval.
  • Hit submit to view the results!

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

# Compute the difference of the sample means: mean_diff
mean_diff = ____

# Get bootstrap replicates of means
bs_replicates_1975 = ____
bs_replicates_2012 = ____

# Compute samples of difference of means: bs_diff_replicates
bs_diff_replicates = ____

# Compute 95% confidence interval: conf_int
conf_int = ____

# Print the results
print('difference of means =', mean_diff, 'mm')
print('95% confidence interval =', conf_int, 'mm')
Editar e executar o código