Questions, data types and data quality
Content revised on 3 October 2026. Any completion marker earned before this revision refers to the earlier content version and does not confirm completion of this revised lesson.
Learning goals
- Define an observational unit and target population
- Classify variables and identify data-quality risks
- Write an operational statistical question
Assumptions and scope
- Fictional operational data
- No causal inference from observational channel comparisons
Start with a question that data can answer
A useful statistical question names a group, a quantity and a time window. “Is service good?” is too vague. “What fraction of requests submitted to the help desk during a specified week received a first response within one working day?” identifies an eligible population and a measurable outcome. An observational unit is the entity represented by one row. Here it is a request, not an employee or a response message. Multiple messages for one request must not silently become multiple requests.
The target population is the collection about which you want to make a statement. The observed dataset may contain every eligible unit, called a census, or only a sample. A parameter describes the population; a statistic is calculated from a sample. A clean calculation does not establish that a sample represents its population. A voluntary feedback form may disproportionately attract unusually satisfied or dissatisfied respondents. Recording many responses reduces some random variation but does not automatically remove that selection mechanism.
Classify before calculating
A categorical variable identifies a group, such as request channel. Its categories may be unordered, or ordinal when they have a meaningful order such as low, medium and high urgency. Numerical labels do not turn categories into measured quantities: averaging ticket identification numbers has no useful interpretation. Quantitative variables measure amounts. A count of reopened requests is discrete; elapsed response time is conceptually continuous even when the system rounds it to whole minutes. Measurement resolution and the underlying variable are different ideas.
A data dictionary should record the variable name, definition, unit, valid values and missing-value convention. Define whether time includes weekends, whether cancelled requests remain eligible, and which timestamp starts the clock. A missing response time can mean an unresolved request, a system failure or an excluded case. These meanings produce different analyses. Never replace every missing value with zero: zero states that the measured amount was actually absent or instantaneous.
Audit the path from records to conclusions
Retain a raw copy and document each cleaning decision. Check duplicate unit identifiers, impossible values, mixed units, inconsistent labels and dates outside the stated window. A large value deserves investigation, but is not automatically a mistake. Removing valid long waits can make service look better precisely by discarding the experience that matters most. Report how many records were missing or excluded and why.
Finally, distinguish description from explanation. A table can show that one channel has longer waits without establishing that the channel caused those waits. Difficult requests may preferentially arrive through that channel. Before discussing causation, ask how units entered groups and what competing explanations remain. A responsible first analysis often ends with a clearer question and a transparent description of the available evidence.
Worked example: Audit a small extract
A file contains 48 rows for one week. Four rows are confirmed repeated copies of existing request IDs. Among the 44 distinct requests, 5 have unresolved response times. How many distinct requests and observed times are available?
Solution
There are 48 − 4 = 44 distinct requests and 44 − 5 = 39 observed response times. Summarize the 39 recorded times, explicitly disclose the 5 unresolved requests, and do not call this the mean for all 44 requests without an additional missing-data assumption.
Each row specifies one variable; no color or plot interpretation is required.
| Variable | Type | Definition | Missing convention |
|---|---|---|---|
| request_id | Identifier | One unique eligible request | Reject missing ID for reconciliation |
| channel | Categorical | Submission route | Unknown category, separately reported |
| response_minutes | Quantitative | First-response elapsed minutes | Blank means not observed, not zero |
Independent practice
-
Classify request channel, urgency category and number of attachments.
-
A file has 75 eligible orders, of which 9 lack delivery dates. What fraction has missing delivery dates?
-
A poll asks only people who complain about a service to rate it. Can its average be generalized to all users?
Practice answers and reasoning
-
Unordered categorical; ordinal categorical; discrete quantitative.
Channel is a label, urgency has order, and attachments are counted.
-
9/75 = 0.12, or 12%.
The denominator is all eligible orders, including incomplete ones.
-
Not from that design alone.
Selection is tied to dissatisfaction; additional responses from the same selected group do not remove the coverage problem.
Common errors to avoid
- Treating an ID as a measured quantity
- Calling missing values zero
- Confusing a large selected sample with a representative sample
Exit check
-
Is a postal-code average a meaningful location summary?
-
Should an unusually long but valid wait be deleted automatically?
Exit-check answers
-
No.
Numeric codes identify categories, not equal-interval measurements.
-
No.
Investigate and report it; deletion can distort the target quantity.