Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

Below, is the full question, however I am having trouble with the quot;close_novas.sample.

Below, is the full question, however I am having trouble with the "close_novas.sample..." section of bootstrap_ages, please help.

Question 9 It's time to bootstrap so that we can quantify the variability in our estimate! Simulate 1000 resamples from close_novas. For each resample, compute the slope of the least-squares regression line, and multiply it by 1 million to compute an estimate of the age of the universe. Store these ages in an array called bootstrap_ages, and then use them to compute a 95% confidence interval for the age of the universe.

bootstrap_ages = make_array()

for i in np.arange(1000):

  bootstrap_ages = np.append(bootstrap_ages, 1e6*fit_line(close_novas.sample

lower_end = percentile(2.5, bootstrap_ages) 

upper_end = percentile(97.5, bootstrap_ages)

Table().with_column("Age estimate", bootstrap_ages*1e-9).hist(bins=np.arange(12, 16, .1), unit= "billion years")

print("95% confidence interval for the age of the universe: [{:g}, {:g}] billion years".format(lower_end*1e-9, upper_end*1e-9)

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question