Large enough to achieve that polling is expensive so

This preview shows page 23 - 26 out of 28 pages.

large enough to achieve that. (Polling is expensive, so the sample also shouldn’t be bigger than necessary.) Michelle consults Chapter 14 of your textbook. Instead of making the conservative assumption that the population standard deviation is 0.5 (coding Yes voters as 1 and No voters as 0), she decides to assume that it’s equal to the standard deviation of the sample, ( Yes proportion in the sample ) × ( No proportion in the sample ) . Under that assumption, Michelle decides that a sample of 9,975 would suffice. Question 7 Does Michelle’s sample size achieve the desired standard deviation of sample means? What SD would you achieve with a smaller sample size? A higher sample size? To explore this, first compute the SD of sample means obtained by using Michelle’s sample size.
Question 8 Then, compute the SD of sample means that you would get from a smaller sample size. Ideally, you should pick a number that is significantly smaller, but any sample size smaller than Michelle’s will do.
23
With this smaller sample size, you would predict a sample mean SD of 0.015792 In [48]: ok . grade( "q3_8" ); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Running tests --------------------------------------------------------------------- Test summary Passed: 1 Failed: 0 [ooooooooook] 100.0% passed Question 9 Finally, compute the SD of sample means that you would get from a larger sample size. Here, a number that is significantly larger would make any difference more obvious, but any sample size larger than Michelle’s will do. In [51]: larger_sample_size = 20000 larger_sample_mean_sd = estimated_population_sd / (larger_sample_size **0.5 ) print ( "With this larger sample size, you would predict a sample mean SD of %f " % large With this larger sample size, you would predict a sample mean SD of 0.003531 In [52]: ok . grade( "q3_9" ); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Running tests --------------------------------------------------------------------- Test summary Passed: 1 Failed: 0 [ooooooooook] 100.0% passed Question 10 Based off of this, was Michelle’s sample size approximately the minimum suffi- cient sample, given her assumption that the sample SD is the same as the population SD? Assign min_sufficient to True if this 9975 was indeed approximately the minimum sufficient sample, and False if it wasn’t. In [53]: min_sufficient = True min_sufficient 24
Out[53]: True In [54]: ok . grade( "q3_10" ); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Running tests --------------------------------------------------------------------- Test summary Passed: 1 Failed: 0 [ooooooooook] 100.0% passed 1.4 4. Submission Once you’re finished, select "Save and Checkpoint" in the File menu and then execute the submit cell below. The result will contain a link that you can use to check that your assignment has been submitted successfully. If you submit more than once before the deadline, we will only grade your final submission. If you mistakenly submit the wrong one, you can head to okpy.org

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture