Data quality and cleaning#

The question and the claim#

Cleaning is a sequence of accountable decisions about measurement. Formatting errors, missingness, implausible values, and exclusions need different responses. Preserve raw values and explain how each transformation affects the population or estimand.

What you should be able to do#

  • Specify the scientific target and the observations needed to address it.

  • Write a cleaning specification before coding; report retained and excluded counts by reason and compare the main result under two rules.

  • Explain the assumptions, uncertainty, and limits of your conclusion.

Worked investigation#

Introduce commas, missing values, and a negative reaction time into simulated trials. Parse values, retain an exclusion ledger, and compare two defensible inclusion rules. The worked notebook is self-contained and uses documented teaching data. Its output is evidence about that example, not a finding about a human population.

Challenge the result#

Taking an absolute value makes a negative reaction time positive without establishing why it was negative. Dropping missing rows can also change the target population. Before running an analysis, predict what this failure would change. After running it, distinguish a software check from a scientific justification.

Practice and verification#

Complete the exercise, then discuss the interpretation questions. Submit a runnable notebook, your assumptions, and a short evidence-based interpretation. The shared analysis workflow defines the reporting and assessment standard.

For AI assistance, first write your own target and expected behavior. Use generated suggestions as candidates, inspect the code or claims, and retain evidence of the checks you performed. The AI analysis guide includes a saved-output activity that requires no account or paid service.

Connection across lessons#

Apply the schema and key checks from data architecture; carry the cleaned data and ledger into visualization.

Earlier lecture resources#

The recordings and slides below are retained from the earlier course edition and have not been revised. Use the written chapter, revised notebook, and exercise for current definitions and procedures; earlier examples may conflict with the corrections described here.

Required readings#

Müller, H., & Freytag, J. C. (2003). Problems, Methods, and Challenges in Data Cleansing. Berlin: HUB-IB-164.

Lecture (Video)#

Techniques for data cleansing

Slides (PDF)#

Techniques for data cleansing