Module 3 Assignment

Important

This assignment will be due on Tuesday, November 3, 2026 at 11:59pm.

Introduction

This is your assignment for Module 3, focused on the material you learned in the lectures and recitation activities on data distributions, correlations, and annotating statistics. This assignment is worth 8 points.

Submission info: you will submit this assignment by uploading a knitted .html to Carmen that you created from an R Markdown or Quarto document.

  • Make sure you include the Code Download button or another way to download your code
  • Show your code within your knitted .html
  • Customize the YAML and the document so you like how your final report looks - do check this before you submit
  • All code should be annotated (meaning, you should be writing descriptions in your own words about what the code is doing)
  • All decisions should be described in the text of your document
Note

Starting on this assignment, I will be considering for overall format and readability of your assignment as part of your grade. I am doing this because the format of your report will be considered for your final capstone assignment. This means you should have reasonable headers and header levels, understandable flow between plots and code, and use Markdown language when appropriate. If a question has subparts, they should be labelled so they are easily distinguishable.

CautionA reminder about generative AI use

Please remember that you can use generative AI to help with your coding, but it should NOT be used to generate your assignment text or on conceptual questions. You should be able to explain your code and your decisions in your own words. If you use generative AI for your code, please cite:

  1. what the goal of the use was
  2. your prompt
  3. what you got
  4. what edits you made

1. Understanding data distributions (4 points)

Load the following data and create a series of 3 plots that help you understand the underlying data distribution. Order your plots from providing the least to the most information. Each plot should be complete with appropriate labels and titles. For each plot, provide:

  1. the reason you selected that plot
  2. the code used to create the plot with annotation for each step

After creating these 3 plots, provide a short paragraph (~5 sentences) summarizing what you learned about the data distribution from your plots, and which you think is the most informative.

Note

Remember, you can use AI to help you with the code, but not in the selection of the plot.

You can download the data here. The data includes 198 observations of a response variable (outcome) measured in a study with two independent variables: sex (male or female) and dose (none, low, or high). The data are simulated to represent a hypothetical experiment.

# on a Mac/Linux
download.file("https://raw.githubusercontent.com/jcooperstone/jcooperstone.github.io/refs/heads/main/assignments/modules/module3/data/module3_q1.csv", 
              destfile = "module3_q1.csv")

# on a Windows machine
download.file("https://raw.githubusercontent.com/jcooperstone/jcooperstone.github.io/refs/heads/main/assignments/modules/module3/data/module3_q1.csv", 
              destfile = "module3_q1.csv", 
              mode = "wb")

2. Evaluating a collaborator’s data (1 point)

A collaborator sends you the following figure from an experiment comparing a response in a control group and a treated group (n = 30 per group), and says “treatment doesn’t seem to do much.”

They show you this figure:

The data can be downloaded here:

# on a Mac/Linux
download.file("https://raw.githubusercontent.com/jcooperstone/jcooperstone.github.io/refs/heads/main/assignments/modules/module3/data/module3_q2.csv", 
              destfile = "module3_q2.csv")

# on a Windows machine
download.file("https://raw.githubusercontent.com/jcooperstone/jcooperstone.github.io/refs/heads/main/assignments/modules/module3/data/module3_q2.csv", 
              destfile = "module3_q2.csv", 
              mode = "wb")
  1. In 3-4 sentences, describe what this plot communicates, and what information it hides from the reader. Be specific about what aspects of the distributions could be different between groups without changing what you see here.
  2. Create a replacement plot that would let the collaborator evaluate their claim. Include the code (annotated) and appropriate labels and titles.
  3. In 2-3 sentences, explain why you chose your plot type, and what you would tell your collaborator.

3. Redesigning a published figure (3 points)

Find a figure in a peer-reviewed paper from your own field that shows a distribution, a correlation, or a comparison between groups. It should not be from the paper we used in class. Include the figure (a screenshot is fine) and a full citation with a link or DOI.

  1. What question is the figure trying to answer, and who is the intended audience? (2-3 sentences)
  2. List at least two things the figure does well, and at least two things that could be improved or that could lead a reader to a wrong conclusion. Tie your points to ideas from this module (e.g., what the plot hides, the chosen geom, annotation of statistics, overplotting, color, scales).
  3. Make a redesigned version of the figure. You will not have the real data, so simulate data that resembles what the figure shows (e.g., similar groups, sample sizes, and approximate means/SDs, or a similar correlation). You are welcome to feed the figure into an LLM an ask it to approximate the data for you. Include your annotated code.
  4. In ~5 sentences, explain what you changed and why, and what you are giving up, if anything, compared to the original.
Note

You will be graded on the quality of your critique and the reasoning behind your redesign, not on how closely your simulated data match the original or how elaborate the figure is. As usual, generative AI can help with generating data and code, but your critique and design decisions must be your own.

Important

This assignment will be due on Tuesday, November 3, 2026 at 11:59pm.

Back to top