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

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.

Step by Step Solution

3.26 Rating (161 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Here are the ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!