89,284 views
4 votes
4 votes
question 2. complete the percentages in resamples function such that it returns an array of 2500 bootstrapped estimates of the percentage of voters who will vote for brown sugar cafe. you should use the one resampled percentage function you wrote above. note: there are no public tests for this question, the autograder cell below will return 0.0% passed.

User Adarsh Hegde
by
3.3k points

1 Answer

3 votes
3 votes

Final answer:

To complete the percentages in the resamples function, use a loop and the one resampled percentage function to generate 2500 bootstrapped estimates of the percentage of voters who will vote for Brown Sugar Cafe.

Step-by-step explanation:

To complete the percentages in the resamples function, you need to use the one resampled percentage function mentioned above. This function should return an array of 2500 bootstrapped estimates of the percentage of voters who will vote for Brown Sugar Cafe.

Here is an example:

  1. Define the resamples function as a loop that runs 2500 times.
  2. Inside the loop, call the one resampled percentage function to get a bootstrapped estimate of the percentage.
  3. Store each estimate in an array.
  4. After the loop, return the array of estimates.

By using the resamples function, you will get 2500 different bootstrapped estimates of the percentage of voters who will vote for Brown Sugar Cafe.

User Lukaserat
by
3.1k points