Sampling#

Democracy is the theory people know what they want and deserve to get it, good and hard. - H.L. Mencken

The Student Government elections are an excellent opportunity to put some of your newfound analytical tools to use. In this lab, you will design and perform several experiments to predict who will win president.

Preamble#

As you will soon discover in the project_five_instructions, you will be assigned a partner for this lab. In the spirit of statistics and to put you in the right headspace for this lab, I will be using the following code snippet to randomly assign partners.

import random

names = [ "Larry", "Curly", "Moe", "Shemp"]

randomly_ordered_names = random.shuffle(names)

Note

Obviously, I will be using your real names in class.

Instructions#

You will complete the data collection portion of this project with a partner. You will work together to design a sampling technique and then perform the experiment. Since you are both using the same data, you should both have the same answers. However, you will turn in separate reports and receive separate grades.

  1. Create a folder named LASTNAME_FIRSTNAME_project_five, replacing LASTNAME and FIRSTNAME with your last name and first name, respectively.

  2. Create four spreadsheet files named simple_random.csv, stratified.csv, cluster.csv and systematic.csv. Place all of these files in the new folder you created in step 1.

  3. In the same folder, create a Python py script named project_five.py.

  4. Create a Python docstring at the very top of the script file. Keep all written answers in this area of the script.

  5. Review the sampling techniques found in Chapter 1, Section 3. Class notes for this seciton can be on the Sampling Techniques page.

  6. Perform all exercises and answer all questions in the Project section. Label your script with comments as indicated in the instructions of each problem.

  7. Answer the indicated questions in the Project section in the .docx document file.

  8. When you are done, zip your folder and all its contents in a file named LASTNAME_FIRSTNAME_project_five.zip

  9. Upload the zip file here: TODO

Collecting Data#

Everyone in highschool is eligible to vote in the elections and the population is large enough for draw statistically significant samples. You should, in theory, be able to make a reasonable prediction about the the outcome of the Student Government elections.

In order to ensure the accuracy of your predictions, we w

Project#