Skip to content

The people behind the rows

Rows are often people. Find out why removing names doesn't anonymize a table, use the privacy tools in CodeSplash, and finish the track by critiquing a report from end to end.

Applied ~15 min8 steps

You will be able to

  • Explain why quasi-identifiers can re-identify people after names are gone
  • Check the smallest group in a table before you share it
  • Choose what AI features may see, and what a synthetic copy may keep
  • Critique a report for honesty, fairness and privacy

Read first

01

No names, no problem?

Predict

Predict first

You're sharing a customer table. You removed names, emails and account numbers, and kept age, postcode, signup date and plan. Is it anonymous?

Yes: without identifiers it's anonymousProbably, unless someone has a lot of skillNo: the remaining columns may still single people out
Reveal

No: the remaining columns may still single people out. Those are quasi-identifiersQuasi-identifierA column that identifies people only in combination with others, such as age, postcode and occupation together.. None identifies anyone alone, but together they can, and someone with another table can join on them. Latanya Sweeney showed that most Americans could be picked out by ZIP code, birth date and sex alone. She used that to find a state governor's health record in "anonymous" data.

02

How small is your smallest group?

Reflect

A quick check is to count the people who share each combination of quasi-identifiers. If some combination has only one person, that row is that person's. The smallest count is called kk, and the table is then kk-anonymous.

Run this on a table you've shared or might share. Which columns push kk down to 1? Could you round ages into bands, or shorten a date to a month, and still answer your question?

Python
import pandas as pd

df = pd.read_csv("customers.csv")
quasi = ["age", "region", "plan"]
counts = df.groupby(quasi, dropna=False).size()
print("smallest group:", counts.min())
print("people alone in their group:", (counts == 1).sum())
R
df <- read.csv("customers.csv")
quasi <- c("age", "region", "plan")
counts <- table(do.call(paste, df[quasi]))
cat("smallest group:", min(counts), "\n")
cat("people alone in their group:", sum(counts == 1), "\n")
03

Summaries leak too

Checkpoint

Check yourself

You publish a table of average salary by department and gender. One department has exactly one woman. What have you done?

Show the answer

Answer: b

An average of one is that person's value. Combine small cells, or suppress them, and check differences between tables too: two totals that differ by one person reveal that person.

04

Is a synthetic copy private?

Explore

Synthetic data is generated to look like the real thing. Make it more faithful, and watch the privacy ratio. Lower the noise until copies sit closer to real rows than real rows sit to each other.

DExplorable · Synthetic data: fidelity against privacy

Can synthetic data look like the real thing without copying it?

A ratio near 1 means synthetic rows sit about as far from the training data as new real rows do. What will this generator's ratio be?

1.50
How sure?

How it's generated

0.10

Used by “Copy rows and add noise”.

300
  • Real (training)
  • Synthetic
as far as new real rows
  • Privacy ratio
  • Largest column KS × 4

Commit your prediction above to see the result

Make your prediction first; the figure appears when you commit.

Make your prediction to see the result.

Fidelity and privacy pull against each other, and "synthetic" doesn't settle it. A copy can reveal the people it learned from, so judge it by its scores before you share it.

05

The tools you have

In the app
  • A dataset's Dictionary warns when columns look like personal data, and suggests an AI policy for each. Sensitive shares name and type only, and Exclude shares nothing.
  • Settings has Privacy for this project, where you choose what AI features may send. What will be sent shows each request before it goes.
  • Synthetic data in Studios has a Privacy scan that separates identifiers from quasi-identifiers, and a scorecard for the result.

None of this replaces the rules that apply to your data.

07

Critique a report

Checkpoint

Read this paragraph, written about an observational customer table.

"We tested 40 segments and found that the premium plan significantly reduces churn in new users (p=.04p = .04). There was no difference elsewhere. We removed some outliers to clean the data. The model is fair, since we excluded gender. The attached file contains anonymized records with age, postcode and signup date."

Check yourself · choose all that apply

Which problems does it have? Choose all that apply.

Show the answer

Answer: a, b, c, d, e, f, g

All of those, from one short paragraph, and each has a fix from this track. Report the denominator, the size and the interval. Label the search. State the rule. Measure outcomes by group. Check what the file can reveal.

Check yourself

Put these in the order an honest analysis goes.

  1. 1Collect or open the outcome data
  2. 2Run the planned analysis, and report it whatever it shows
  3. 3Check whose data this is, and whether you should use it
  4. 4Report the denominator, the estimate, the interval and what you can't claim
  5. 5Explore, and label what you find as exploratory
  6. 6Write down the question, outcome, exclusions and analysis

Show the answer

The order:

  1. Check whose data this is, and whether you should use it
  2. Write down the question, outcome, exclusions and analysis
  3. Collect or open the outcome data
  4. Run the planned analysis, and report it whatever it shows
  5. Explore, and label what you find as exploratory
  6. Report the denominator, the estimate, the interval and what you can't claim

Ethics first, while changing course is cheap. Then the plan, the data and the planned analysis, and only then exploration. The report covers all of it.

08

Recap

Recap
  • Removing names doesn't anonymize a table, because quasi-identifiers and small cells can still reveal people.
  • CodeSplash can show you risks and limit what AI features see, and the judgment stays with you.
  • Plan first, report everything, label exploration, say what you can't claim, and remember who's in the rows.

Concepts in this lesson