Ch 7 Extension — Answer Document
← Back to the activity
Work through
the Ch 7 messy-data activity
first — this page collects your code and answers as you go. Everything saves automatically in this browser as you type. When you're done, click "Print / Save as PDF" and submit that PDF.
Name
Step 0: Try the test anyway
S1 — the exact error message R gave you
S2 — why did it fail, in plain language?
Part A: Find the problems
A1 — gender: distinct values found, how many there should be, and the problem values
Your code (A2)
A2 — group: are the values consistent? List any problems
A3 — how many duplicate participant IDs?
A4 — suspicious values in age and post_score, and what you'd do with them
Your code (A5)
A5 — how many rows have a missing pre_score?
Part B: Clean the data
Your fix (B3 — group, two lines)
Your fix (B4 — sentinel values)
B5 — after cleaning, confirm each check passed (duplicates gone, 2 values each, no sentinels, both factors)
Part C: Run it again
C1 — does the t-test run now, and which group scored higher?
C2 — rows left, missing post_scores, and what that tells you
Part D: Reflect
D1 — when should cleaning judgment calls be made, and why does it matter?
D2 — two scenarios for a duplicate ID (one error, one legitimate)
D3 — who might write anomaly notes, and why document them in the data itself?
AI Use Log
List any AI tools used and what for. "None" is a complete answer.