📝 Assignment 3
Due date: Friday, April 26 at midnight Pacific time (i.e., 1 minute after 11:59pm).
⏳ We recommend attempting each problem ASAP so you can accurately estimate the time needed to complete the assignment.
- This is not an assignment to start the night before the due date!
- Remember that MS&E 125 is a 4-unit course. For the median student, this is supposed to translate to 3 weekly hours of lecture and 9 weekly hours of working on assignments and studying.
Unless otherwise stated, assignments are to be done individually. You are welcome to work with others to master the principles and approaches used to solve the homework problems, but the work you turn in should be your own.
This assignment has not been seen by a previous cohort of MS&E 125 students, so there may be some unforeseen hiccups. If anything seems confusing or unclear, please create an Ed post.
We will use this Ed post to track errors and clarifications on HW3.
📮 Submission
Submit your assignment via Gradescope.
-
For the Google Colab submission, run all of your cells using the
Run all
command in theRuntime
menu. Then, download your completed Google Colab notebook as an.ipynb
file. Finally, use this website to convert your.ipynb
file to.pdf
format. Proofread the PDF to make sure all of your answers and plots are visible and not cut off. If your PDF is really long, it is possible that your code is printing out the entire dataset or a really long vector. Please make sure to comment out any code that prints more information than each question asks you for. -
Issues converting to
.pdf
? Make sure there are no error messages in the outputs after you run all cells. Please do not use any special characters in the filename of the.ipynb
file that you upload. -
For the plot(s) and caption, prepare a PDF with a photo of your plot(s) along with your caption.
-
For the hypothesis tests, prepare a PDF with the details of your hypothesis tests. This may take the form of handwritten notes, a text document, or a Colab file. Just make sure your answers are clearly demarcated.
Finally, concatenate the three PDFs above using a tool of your choice. For example, you could use this website.
Submit the concatenated PDF to Gradescope. Make sure to tag your answers properly on Gradescope, or else you may be docked points.
🩸🥾 Lab: Blood glucose and the bootstrap (60% of the assignment grade)
Complete the HW3 Lab Notebook.
- ⏳ This is the most time-consuming component of the assignment, so get started ASAP (and, if needed, get help early!).
Why complete this problem? The bootstrap is one of the most powerful, versatile, and intuitive tools for statistical inference. This lab will give you a sense of how the bootstrap can be applied across different scenarios.
🌍 Identifying and exploring public data (20%)
This exercise is designed help you brainstorm topics for your course project.
First, identify a public dataset related to a topic you find interesting.
Here are some topics that students have explored in previous iterations of the course:
- Athletic performance
- Gender inequality
- Farming practices
- Restaurant quality
- Music success
- Gentrification
- Standardized testing
Here are some example repositories for public data:
- Data.gov
- Integrated Postsecondary Education Data System (IPEDS)
- United States Census
- Kaggle
- Stanford Open Policing Project
- Chicago Public Data
- OSU Sports Datasets
- California Open Data
- Yale Public Environmental Data
- Tableau Public Datasets
Using your chosen dataset, write R
code to create a new plot that tells an interesting story about your dataset.
- You only have to make one plot, but you are welcome to make one or two more plots if it helps tell your story.
- Your story does not have to be complex! But it should be interesting and punchy.
- The plot should be publication-ready. In other words, it should be formatted nicely enough to be in a news article, and have a clear and interesting takeaway.
To reduce the time to complete this assignment, a screencast is no longer required. You will now just submit your plot, along with a descriptive caption of 3-5 sentences.
- Compensation for folks who finished their screencast scripts before we removed the screencast from the assignment: You are free to upload the full text script of your screencast as a substitute for the 3-5 sentence comment. Just upload the text of your script; do not upload a recording, as we will not watch it. Out of fairness, the option to write a full-text script instead of 3-5 sentences is available to everyone. We can award up to five points of extra credit on this assignment for exceptionally high-quality and polished scripts.
Finally, keeping in mind the feedback from your HW1 screencast, make another 1-2 minute screencast describing your new plot(s) to a classmate.
-
Refer to the HW1 screencast instructions and HW2 feedback instructions as you think about the structure and flow of your screencast. -
Feedback from your HW1 submission will be released after Tuesday’s lecture. So, you should not record your screencast until Tuesday. However, you can prepare your plot(s) before then.
🥼 Hypothesis testing (20%)
Between Lectures 7 and 8, every student was asked to rate their own screencast (from HW1) on a scale from 1-10, and also rate their reviewed screencast (from HW2) on a scale from 1-10.
There was a bit of deception involved in the data collection exercise. Each person who filled out the survey was randomized to one of two survey versions. Version A asked you to first rate your own screencast, and then rate the other screencast. Version B asked you to first rate the other screencast, and then rate your own screencast.
- This is an example of A/B testing, which is hugely popular in industry. You have almost certainly participated in many A/B tests without realizing it.
You can find the survey results here.
Data description:
version
: If the student rated their own screencast first, this column has the valueself_first
. Otherwise, it has the valueother_first
.self
: The rating the student gave their own screencast.other
: The rating the student gave to their reviewed screencast.
For each of the questions below, conduct one hypothesis test (i.e., two tests in total).
Research question 1. Is there evidence to support Josh’s theory?
Josh's theory: On average, students tend to rate their own screencasts better than the screencasts of other students.
Josh's reasoning: After staring at your own presentation for hours, it is hard to put yourself in the shoes of an audience member. Thus, you might find it harder to be critical of your own work.
Research question 2. Does the order of the survey questions affect students’ ratings of their own work? In other words, does the average self-rating differ when students are asked to rate their own work first, versus when they are asked to rate another student’s work first?
For each hypothesis test, provide the following:
-
Define your estimand. In other words, what population-level statistic provides a quantitative representation of the research question? You can assume that the students who completed the survey are a random draw from the population of all students.
-
State a null hypothesis.
-
Define an estimator, and construct a normally-approximated confidence interval for your estimate.
-
Given your confidence interval, how would you answer your research question?
You are not required to turn in R
code for this problem. However, you should show your work, and you should use R
to help you with calculations.