Exercise

Repeated sampling, point estimates and inference

In the previous exercise, you used a single sample of ninety days to make your conclusion. However, what if you had a different ninety days. Would your conclusions be different?

One way to assess this is by taking repeated samples. By repeatedly sampling from your data and computing your point estimate you can see how it changes.

The same data btc_sp_df has been loaded for you, as have the packages Pandas as pd and NumPy as np.

Instructions 1/2

undefined XP
    1
    2
  • Write a for loop that runs ten times.
  • Inside the loop, select a random starting row number, avoiding the last 90 row numbers.
  • Select the ninety rows after the starting row.
  • Using your sample_df, compute the percent change of BTC closing price using the Close_BTC column.