Westonci.ca is the premier destination for reliable answers to your questions, provided by a community of experts. Our platform provides a seamless experience for finding reliable answers from a knowledgeable network of professionals. Get detailed and accurate answers to your questions from a dedicated community of experts on our Q&A platform.

below, with the help of one resampled proportion, complete the given codethat will use bootstrapped samples fromvotesto compute estimates of the true proportion ofvoters who are planning on voting forcandidate c. make sure that you understand what's goingon here. it may be helpful to explain proportions in resamplesto a friend or ta

Sagot :

Coding is similar to writing a set of instructions because it instructs a machine what to do.

How to give the output for the following coding ?

We connect with computers through coding, often known as computer programming. Coding is similar to writing a set of instructions because it instructs a machine what to do. You can instruct computers what to do or how to behave much more quickly by learning to write code.

def proportions_in_resamples():

   statistics = make_array()

   for i in np.arange(5000):

       bootstrap = votes.sample()

       sample_statistic = np.count_nonzero(bootstrap.column('vote') == 'C')/num_votes

       statistics = np.append(statistics, sample_statistic)

   return statistics

sampled_proportions = proportions_in_resamples()

Table().with_column('Estimated Proportion', sampled_proportions).hist(bins=np.arange(0.2,0.6,0.01))

The complete question is : Below, we have given you code that will use bootstrapped samples from votes to compute estimates of the true proportion of voters who are planning on voting for Candidate C.

def proportions_in_resamples():

   statistics = make_array()

   for i in np.arange(5000):

       bootstrap = votes.sample()

       sample_statistic = np.count_nonzero(bootstrap.column('vote') == 'C')/num_votes

       statistics = np.append(statistics, sample_statistic)

   return statistics

sampled_proportions = proportions_in_resamples()

Table().with_column('Estimated Proportion', sampled_proportions).hist(bins=np.arange(0.2,0.6,0.01))

To learn more about coding refer to :

https://brainly.com/question/23275071

#SPJ4

View image BinitaR