Question
R Exercise 1. Run 10,000 simulations of the situation from problem (5) above (where 46% support the Democrat and 54% the Republican). Find the fraction
R Exercise
1. Run 10,000 simulations of the situation from problem (5) above (where 46% support the Democrat and 54% the Republican). Find the fraction of the simulations in which less than half the people (3 or fewer) support the Republican candidate. Compare this result to your answer in Question 5 of the previous section.
2. Change the code to simulate 10,000 polls of 100 people (rather than 10,000 polls of 8 people as in problem 5). Find the fraction of simulations in which less than half the people support the Republican candidate. In other words, use the simulations to approximate the likelihood that a poll of 100 people will incorrectly guess the winner of the election.
3. Graph the simulations so you can visualize the distribution.
4. Change the code again to simulate 10,000 polls of 1,000 people. Find the fraction of simulations in which between 43% and 49% of the people support the Democratic candidate. In other words, use the simulations to approximate the likelihood that a poll of 1,000 people will be off from the true probability by 3% or less.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started