Skip to main content

Assignment 6: EDA and AI Audit

Purpose

This assignment builds a transparent preliminary analysis. You will define a cohort, check missingness, create a Table 1-style descriptive summary, audit planted errors, and revise a provenance/stewardship note for reuse in M2.

Learning Objectives

  • Define an analysis cohort before summarizing results.
  • Report missingness for key variables.
  • Create a Table 1-style summary with N, mean, and SD.
  • Detect planted correctness, reproducibility, interpretation, and stewardship errors.
  • Write descriptive methods text that avoids causal overclaiming.

Inputs

  • Dataset: examples/nhanes-equity/data/nhanes_equity_v6.csv
  • Worked example: weeks/week07-eda-ai-audit/eda03-worked-example.qmd
  • Studio activity: weeks/week07-eda-ai-audit/eda06-studio-planted-errors.qmd
  • Walkthrough and reference: weeks/week07-eda-ai-audit/eda07-assignment-a6-and-reference.qmd
  • Planted-error starter in your personal workspace: assignments/assignment06-eda-ai-audit/planted-error-starter.qmd
  • Audit template in your personal workspace: assignments/assignment06-eda-ai-audit/audit-note-template.md
  • M2 connection: milestones/m2-preliminary-analysis/README.md

Tasks

  1. Create or use the folder assignments/assignment06-eda-ai-audit/submission/.
  2. Load the NHANES CSV snapshot with a relative path.
  3. Define and document an analysis cohort using age 20-80.
  4. Create a missingness table for key variables.
  5. Produce a Table 1-style summary by IncomeGroup.
  6. Include N, BMI mean (SD), and age mean (SD).
  7. Write a short methods note stating that the analysis is descriptive, unweighted, and non-causal.
  8. Audit the planted-error starter and list at least five issues.
  9. Categorize each issue as correctness, reproducibility, interpretation, or stewardship.
  10. Revise the provenance/stewardship statement so it names the data source, classroom-use context, and one privacy or stewardship caution.

AI-Use Expectations

AI may help draft code, explain an error, or improve the organization of the audit note. You must verify cohort filters, missingness handling, labels, summary statistics, and interpretation against the code and output. Include ai-use-note.md.

ai-use-note.md is the graded AI artifact; the inline # AI prompt: / # Verified: comments in your code are the required working practice that feeds it — copy your comment pairs into the note. The template and a filled example are on the assignments index.

Reproducibility Requirements

  • The EDA note must render in GitHub Codespaces.
  • Paths must be relative.
  • table1.csv must be generated by code.
  • Missingness handling must be stated before interpreting summaries.
  • The methods note must avoid causal and population-level claims unsupported by the unweighted classroom example.

What To Submit

Place all submission files in:

assignments/assignment06-eda-ai-audit/submission/

Submit these files:

  • eda-note.qmd: rerunnable Quarto file with cohort definition, missingness table, Table 1, and methods note.
  • eda-note.html: rendered output.
  • table1.csv: exported Table 1 or equivalent descriptive summary.
  • audit-note.md: at least five planted issues with category, why it matters, and corrected approach.
  • provenance-stewardship-note.md: short revised note suitable for reuse in M2.
  • ai-use-note.md: what AI helped with and how you checked it, or a sentence saying AI was not used.

Submission Route

Submit your GitHub repository link on Canvas after committing and syncing the required files.

Grading Checklist

Canvas applies a 7-point rubric. This assignment is part of the best-4-of-6 set for Assignments 4-9:

Criterion Points
Cohort uses the required age 20-80 filter and exclusions are documented before results 1
Missingness table is complete for key variables 1
Table 1 includes N, BMI mean (SD), and age mean (SD) by group 1.5
Methods note is descriptive, unweighted, and non-causal 1
Audit note identifies at least five planted issues across the four categories: correctness, reproducibility, interpretation, and stewardship 1.25
Provenance/stewardship and AI-use notes are specific 0.75
Required files render, export, commit, and sync 0.5

The provenance/stewardship note and the AI-use note share one rubric row, but they are two separate required files with different jobs: the stewardship note is about the data and its responsible use, while the AI-use note is about how you used and verified AI. Write each one fully — a strong AI-use note does not cover for a missing stewardship note, or the reverse.

Definition of Done

You are done when eda-note.qmd renders, table1.csv is regenerated by code, and the audit note explains at least five planted errors and corrected approaches.