UNSW Sydney · FACULTY OF MARKETING

MARK5827 Chap.3 Data Preparation and Measurement

- one subject, every graph, every model, every mark
6 Chapters4-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 3 of 5 · MARK5827

Data Preparation and Measurement

Data preparation begins by asking whether the sample and variables can answer the business objective. This chapter covers representative and stratified sampling, respondent relevance, range and logic checks, outliers, missing responses, categorical measurement, dummy coding and reproducible repair decisions.

It emphasises that a perfectly cleaned file can still be unsuitable when the wrong population was observed, and that numeric storage does not make a customer ID or postcode a metric variable. Sample design comes first because cell-level repair cannot restore customers excluded by the extraction rule.

Measurement comes next: binary flags must respect their definitions, categorical labels need an encoding that does not invent distance, and durations or balances need plausible business ranges. Missingness is treated as a decision rather than an empty cell. Neutral substitution, model-based imputation, casewise deletion and pairwise deletion each change variation, sample composition or comparability.

The analyst should compare results before and after a material treatment, test sensitivity where several choices are defensible, and retain an audit trail that explains rather than hides each repair.

In this chapter

What this chapter covers

  • 01

    Target population and sample fitness

  • 02

    Random and stratified sampling choices

  • 03

    Range, logic and extreme-value checks

  • 04

    Missing-value deletion and imputation trade-offs

  • 05

    Nominal, ordinal and metric measurement

  • 06

    K minus one dummy-variable recoding

Worked example · free

Diagnose five fields before modelling

Q [5 marks]. The five marks shown here are not a university mark allocation; they structure this newly written AskSia exercise. A loyalty file contains a product flag of 3, negative spend, a 96-year relationship, four numeric region codes and missing income. State the next check for each field.
The tree puts sample fit before cell-level cleaning, because perfectly repaired values still cannot rescue a population that does not answer the business questiThe tree puts sample fit before cell-level cleaning, because perfectly repaired values still cannot rescue a population that does not answer the business question. Research objective Does the sample fit? no Redesigncoverage first yes Audit values and codingrange logic missing type Document repairretain audit trail
The tree puts sample fit before cell-level cleaning, because perfectly repaired values still cannot rescue a population that does not answer the business question.
  • 1Trace the invalid product flag to its coding definition or original record.
  • 1Check whether negative spend represents a legitimate return before changing it.
  • 1Recompute relationship duration from validated dates because 96 years is implausible.
  • 1Treat region as categorical and use three reference-coded indicators when all four categories are retained.
  • 1Investigate the missingness pattern before choosing deletion or imputation for income.
Each field requires a definition-led decision rather than one automatic cleaning rule. Trace invalid codes, verify whether unusual values are legitimate, recompute impossible durations, recode nominal regions categorically and assess why income is missing before selecting a treatment.
Sia tip — For every suspected value, write the rule it violates and the evidence needed to repair it.
Glossary

Key terms

Representative Sample
A sample whose selection and coverage suit the population required by the research objective.
Casewise Deletion
Removal of an observation when any required variable is missing.
Pairwise Deletion
Use of available complete pairs for each calculation rather than one shared complete sample.
Variable Respecification
Creation or recoding of variables so they better represent the research objective.
FAQ

Data Preparation and Measurement FAQ

Can cleaning fix an unrepresentative sample?

No. Cleaning can correct or document recorded values, but it cannot restore customers who were excluded by the selection rule. If the sample covers only premium or active customers, redesign the extraction before making claims about all customers or inactive groups.

Why should numeric codes not be treated as continuous?

A numeric postcode, customer ID or category label often lacks meaningful order and distance. Arithmetic on those codes invents relationships that do not exist. Use indicators, a justified ordinal treatment or a theoretically meaningful aggregation based on the variable definition.

How should missing values be handled?

Begin by examining why values are absent and whether missingness differs across groups or outcomes. Mean substitution, model-based imputation, casewise deletion and pairwise deletion each alter variation, sample size or comparability. Select and document the method that best fits the decision.

What should a cleaning audit trail record?

Record the original definition, observed issue, explanation considered, evidence checked, treatment chosen, number of affected rows and change in important summaries. This allows another analyst to reproduce the decision and prevents an unusual but legitimate customer from being silently converted into an error.

Study strategy

Assessment move

Use a fixed audit order: objective, population, sampling rule, variable definition, range, logical consistency, missingness, transformation and documentation. Practise on small tables by identifying the field, naming the violated rule and specifying the next check. Memorise the K minus one reference-coding rule, but do not apply it blindly when a theoretically meaningful grouping is available.

In R, rerun the preparation script from a clean session and compare row counts and summaries before and after every material treatment. Create a three-column audit sheet with observed issue, possible explanation and decision required. An extreme negative balance may be an error, a reversal or a legitimate business event; the next step differs for each explanation.

For missing data, compare rates across groups and the target outcome before choosing deletion or imputation. Record whether a transformation changes units, meaning or only representation. At the end, explain how the cleaned data could still mislead the decision. This final challenge keeps sampling and measurement quality visible after the script runs successfully.

Preserve one untouched input extract and a compact decision log so another analyst can reproduce every exclusion, recode and transformation without relying on memory.

Working through Data Preparation and Measurement in MARK5827? Sia is AskSia’s AI Marketing tutor — ask any MARK5827 Data Preparation and Measurement question and get a clear, step-by-step explanation grounded in how MARK5827 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.

A+Everything unlocked
Unlocks this Bible + all 100 of your UNSW Sydney subjects - and 1,000+ Bibles across every Australian university.
Sia - your MARK5827 tutor, unlimited, worked the way the exam marks it
The full 4-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works
MARK5827 · Customer Analytics - independent study guide on the AskSia Library. More UNSW Sydney subjects · Microeconomics across all universities