A survey is based on a simple random sample of 300 UK adults finds that 140 of
Question:
A survey is based on a simple random sample of 300 UK adults finds that 140 of them plan to vote for the Tories in the next election. Write R code that will calculate a 70% confidence interval for the proportion of UK adults who plan to vote for the Tories in the next election.
B. Use the command t.test to test whether the following two samples are drawn from the same population:
Sample 1 - 5 64 83 98 73 70 90 91 55 9
Sample 2 - 47 59 85 62 21 11 30 63 77 37 68 56 18 22 84 74 38 67 14 41
Perform test against the alternative hypothesis that sample 1 is drawn from a population with a higher mean than the population from which sample 2 is drawn.
C. Now we take a third sample: Sample 3 - 68 69 4 30 21 53 57 76 64 22 66 50 16 56 80
Use the lm() command to test the hypothesis that all three samples are drawn from the same population against the hypothesis that not all three are drawn from the same population.
Statistics For Business And Economics
ISBN: 9780132745659
8th Edition
Authors: Paul Newbold, William Carlson, Betty Thorne