<a id="ch-03"></a>

## Chapter 3 — Original contribution proposal

### Learning outcomes

You will (1) write a doctoral proposal with hypotheses and criteria; (2) generalise records to reach k-anonymity; (3) explain the utility cost of generalisation.

### 3.1 Hypotheses

Ines states two hypotheses. H1: a differentially private release of origin-destination counts with epsilon one yields lower measured linkage risk than a k-anonymised journey file with k equal to five. H2: planners will accept the differentially private counts for timetable decisions at that epsilon, defined as at least two of three planners rating them usable. Each hypothesis has a measurable criterion and a stated threshold set before data exist. Prof. Aaltonen asks her to justify both thresholds in writing, which she does by citing the authority's current planning practice and the error tolerance planners already accept in manual surveys.

### 3.2 Generalisation as the baseline

To build a fair baseline, Ines must produce a k-anonymous file that a competent data steward would actually release. She generalises zones into blocks and birth years into bands, and any rider still in a group smaller than five is suppressed. The lab tries four settings on 20,000 synthetic riders. Exact values would suppress every record, two-zone blocks with five-year bands still suppress 51.4%, four-zone blocks with five-year bands suppress only 0.1%, and eight-zone blocks with ten-year bands suppress none. Each step that removes suppression also blurs where people actually travel.

### 3.3 Choosing the baseline setting

Ines chooses four-zone blocks and five-year bands as the baseline, because it suppresses only 24 of 20,000 riders while keeping 1,400 classes. The coarser eight-zone setting suppresses nothing but merges distinct suburbs that planners need to distinguish. She records the choice and its reason in the protocol, because a weak baseline would make differential privacy look better than it is. This follows the advice in NIST SP 800-188 that de-identification choices should be documented and justified for the intended release, so that reviewers can see whether the comparison was fair.

### 3.4 Planners as judges of utility

Utility is often measured only as numerical error, but Ines's hypothesis H2 asks people who use the data. Three Valemont planners will each receive the same set of journey tables, produced by both methods, without labels, and rate whether they could use each for a timetable decision. Ines will also report mean absolute error so that readers can compare her result with other studies. She explains in the proposal that combining a human judgement with a numerical metric makes the study more relevant to the authority's actual decision about what kind of data to publish.

### Lab — Generalisation and suppression for k = 5

```python
# Generalise synthetic rider records until every class has k >= 5; report suppression and information loss.
import random
from collections import Counter
r = random.Random(7)
riders = [(r.randrange(40), r.randrange(40), r.randrange(1940, 2008)) for _ in range(20000)]
def gen(x, zw, yw):
    return (x[0] // zw, x[1] // zw, x[2] // yw)
for zw, yw in [(1, 1), (2, 5), (4, 5), (8, 10)]:
    keys = [gen(x, zw, yw) for x in riders]; c = Counter(keys)
    small = sum(1 for k in keys if c[k] < 5)
    print(f"zones/{zw:<2d} years/{yw:<2d} classes {len(c):6d}  suppressed for k=5 {small:6d} ({small/len(keys):5.1%})")
```

Run with `python3 lab_kanon.py`. Verified output:

```text
zones/1  years/1  classes  18228  suppressed for k=5  20000 (100.0%)
zones/2  years/5  classes   5430  suppressed for k=5  10282 (51.4%)
zones/4  years/5  classes   1400  suppressed for k=5     24 ( 0.1%)
zones/8  years/10 classes    175  suppressed for k=5      0 ( 0.0%)
```

### Worked example

Ines states H1 and H2 with thresholds, generalises synthetic records and chooses four-zone blocks with five-year bands as the k = 5 baseline: 1,400 classes and 24 riders suppressed.

> **Synthetic case.** All figures come from the synthetic population; NIST SP 800-188 and Sweeney (2002) are real.

### Errors and limits

Three planners are a small panel; acceptance is a coarse measure. The baseline is one reasonable choice among several.

### Exercises

- **EX015 — Hypothesis criteria.** What makes H2 testable? *Rubric:* 3 = a defined panel, a defined rating and a threshold of two of three set in advance;; 2 = mentions a threshold;; 1 = restates the hypothesis;; 0 = none.
- **EX016 — Exact values.** Why does releasing exact zones and birth years fail k = 5 entirely? *Rubric:* 3 = almost every combination is unique, so every record sits in a group below five;; 2 = says many are unique;; 1 = says it is too detailed;; 0 = none.
- **EX017 — Baseline choice.** Why does Ines prefer four-zone blocks with five-year bands over eight-zone blocks? *Rubric:* 3 = it suppresses only 24 riders while keeping finer geography planners need;; 2 = mentions suppression only;; 1 = picks eight-zone;; 0 = none.
- **EX018 — Weak baseline danger.** What happens if the k-anonymity baseline is badly chosen? *Rubric:* 3 = the comparison flatters differential privacy and the result misleads;; 2 = says results change;; 1 = ignores fairness;; 0 = none.
- **EX019 — Blind rating.** Why are the planners' tables unlabelled? *Rubric:* 3 = to stop expectations about either method influencing ratings;; 2 = says it is fairer;; 1 = omits the reason;; 0 = none.
- **EX020 — Two utility measures.** Why report both planner acceptance and mean absolute error? *Rubric:* 3 = acceptance shows real usefulness; error allows comparison with other studies;; 2 = names one;; 1 = says more data is better;; 0 = none.

### Synthesis

Chapter 3 fixes hypotheses, a fair k-anonymity baseline and a two-part utility test. Chapter 4 pilots the differentially private release.

### Continue studying — chapter 03 of 08

[← Chapter 02 (draft)](#ch-02) · [Course chapter index](../SUBJECTS.md) · [Chapter 04 (draft) →](#ch-04)

## Worked answers

<a id="answer-ex015"></a>
**EX015.** H2 names who judges, how they rate and the pass threshold of two out of three, all fixed before data exist.

<a id="answer-ex016"></a>
**EX016.** With exact values nearly every rider is unique, so every record falls in a class smaller than five and all 20,000 would be suppressed.

<a id="answer-ex017"></a>
**EX017.** It suppresses just 24 of 20,000 while keeping 1,400 classes; eight-zone blocks merge suburbs planners must distinguish.

<a id="answer-ex018"></a>
**EX018.** A weak baseline exaggerates the advantage of differential privacy, so the study would mislead the authority.

<a id="answer-ex019"></a>
**EX019.** Unlabelled tables prevent planners from favouring the method they expect to be better.

<a id="answer-ex020"></a>
**EX020.** Acceptance shows whether the data serve real decisions, while mean absolute error makes the result comparable with the literature.
