Skip to content

Privacy and preparation

Privacy sampling for high-risk strata: how to oversample where PII hides

By SourceX Editorial · Reviewed by Noah Loul ·

10 sections

Short answer

A privacy audit should sample high-risk parts of a dataset by splitting it into strata by how likely each is to hide personal data, drawing a random sample in each, and giving risky strata more reviews than their size alone would. Weight each stratum's miss rate by its size to report one unbiased dataset-wide rate, and judge every stratum against its own limit.

Redaction

Privacy sampling high risk

This page covers privacy sampling for high-risk strata: how to oversample where PII hides.Illustrative

Key takeaways

  • Split the dataset into four to eight strata by signals that make missed identifiers more likely, such as free-text length, attachments and record category.
  • Give every stratum a floor, then allocate the rest by size times expected variability, reviewing small high-risk strata in full.
  • Weight stratum results by size to report one dataset-wide rate; unweighted pooling overstates it when risky strata were oversampled.
  • Judge each stratum against its own limit, because a good overall rate can hide a failing stratum.
  • Keep targeted searches separate from the random sample, and treat re-identification risk as its own review.

How should a privacy audit sample high-risk parts of a dataset?

A privacy audit should split the dataset into strata by how likely each part is to hide personal data, draw a separate random sample in each stratum, and give the risky strata a larger share of the review budget than their size alone would earn. It then weights each stratum's result by the stratum's size to report one dataset-wide miss rate, and reports every stratum's result on its own as well.

That design does two jobs at once. Oversampling the risky strata finds problems where they are most likely, which a simple random sample spends too little effort on. Weighting keeps the dataset-wide number honest, because a sample that deliberately over-represents risky records would otherwise overstate the overall miss rate.

The design applies after automated redaction or de-identification has run, when a team needs to know how often identifiers survive. Detection tools are imperfect: Microsoft Presidio's documentation says that because it uses automated detection there is no assurance it will find all sensitive information, so a measured residual rate is the evidence a reviewer needs.

Why does a simple random sample under-review the risky records?

A simple random sample spends its effort in proportion to volume, and in most business archives the records most likely to hide personal data are a small share of the total. Short structured CRM fields may make up half the records while long free-text notes, attachments and complaint threads hold most of the risk. A proportional sample spends most of its reviews where misses are rare.

Auditors have handled the same problem for decades. The PCAOB's audit sampling standard, AS 2315, says an auditor may be able to reduce the required sample size by separating the items into relatively homogeneous groups on the basis of a characteristic related to the audit objective, and it names bases such as book value, the nature of controls over the items and special considerations. The privacy version groups records by the characteristics that make missed identifiers more likely.

Stratifying does not mean giving up randomness. Within each stratum every record still has a known chance of selection, which is what lets you compute a rate and an uncertainty band rather than a list of anecdotes.

Which risk signals should define the strata?

Define strata with signals you can read from the data or its metadata before anyone opens a record, and that plausibly change the chance of a missed identifier. Keep the number of strata small, usually four to eight, so each one gets enough reviews to say something on its own.

Make the strata mutually exclusive by applying the rules in a fixed priority order. A complaint email with a photo attached could match three rules; assign it to the first matching stratum in the order you wrote down, typically the most sensitive first, so every record sits in exactly one stratum and the stratum counts add up to the dataset total.

Which risk signals should define the strata?
Risk signalWhy it raises the chance of a missHow to measure it before reviewExample stratum rule
Free-text lengthMore text means more names, numbers and context the detector must catchWord count of notes, bodies and descriptionsRecords with 50 or more words of free text
Attachments presentImages, scans and files carry identifiers text detection never readsAttachment count and file types from the exportRecords with any image, scan or PDF attached
Source system and channelEmail and chat carry signatures and quoted replies; structured fields do notSystem of origin and channel fieldEmail-origin and chat-origin records
Record categoryComplaints, billing disputes and legal or HR matters attract personal detailCategory, tag or queue fieldRecords tagged complaint, dispute, legal or HR
Customer typeConsumers are named individuals; business contacts often appear with rolesAccount type or segment fieldRecords linked to consumer accounts
Record ageOlder records may predate current redaction settings or form designsCreated date against the date settings changedRecords created before the form or setting change
Detector signalMany detections or low-confidence detections suggest dense or unusual identifiersCount and confidence scores from the redaction runRecords with detections above a set count or near the threshold
Language or formatDetectors are often weaker outside their main language or on unusual formatsLanguage detection and file formatRecords not in the detector's main language

The risk-stratified privacy sampling design

The design below is the reusable asset. Fill in the decision column before review starts and keep it with the audit record, so a reviewer can see what was planned and compare it with what was done.

At a glance

The risk-stratified privacy sampling design

Two rows carry most of the weight. The defect definition decides what the whole audit measures, so settle borderline cases, such as a first name alone or a staff member's name in a signature, before the first record is opened. The allocation row decides where the effort goes, so write down the pilot rates and the floor even if they were rough guesses; a later reviewer needs them to understand why the strata received the reviews they did.

Plan the reviewers as carefully as the sample. Two reviewers who read an overlapping portion of each stratum will show whether the miss rules are applied the same way, and disagreements usually expose a rule that needs sharper wording rather than a careless reviewer.

The risk-stratified privacy sampling design
Design elementDecision to makeSuggested defaultRecord in the plan
Sampling unitWhat one sampled item isOne record as delivered, with its attachmentsUnit definition and how attachments are counted
Defect definitionWhat counts as a missAny identifier the written rules say should be removed that survivesThe miss rules, with examples of borderline cases
StrataWhich signals split the datasetFour to eight strata from the risk signal table, mutually exclusiveRule for each stratum and its record count
AllocationHow the review budget is splitA floor per stratum, then the rest by Neyman allocation using pilot miss ratesPilot rates used, floor size and the resulting sample per stratum
Take-all strataWhich strata are reviewed in fullAny stratum whose allocation reaches its size, and small high-sensitivity strataNames of take-all strata and why
SelectionHow records are drawnSeeded random selection within each stratumSeed, tool and date of the draw
Targeted searchHow known hard patterns are huntedRun separately; findings are fixed but not counted in the estimateSearch terms used and what they found
EstimationHow results become one numberSize-weighted rate across strata with a standard errorFormula, weights and the result
AcceptanceWhat result passesA per-stratum limit, plus a dataset-wide limitLimits set before review and who set them
ResamplingWhat happens after a fixFresh draw in every stratum the fix could affectFix description and new draw details

How do you split the review budget across strata?

Split the budget in two steps: give every stratum a floor so none is ignored, then share the rest in proportion to each stratum's size multiplied by how variable its results are likely to be. That second step is Neyman allocation, the classic rule credited to Tchuprov and Neyman for getting the most precise overall estimate from a fixed total sample.

For a miss rate, variability comes from the expected rate itself: a stratum where about one record in twenty fails is far more variable than one where one in five hundred fails. Use a small pilot sample, or the previous audit's results, to estimate each stratum's rate. The estimates only steer the allocation; a wrong guess makes the result less precise, not biased.

Two practical limits apply. The raw Neyman formula can ask for more records than a small stratum contains, and research on the recursive Neyman algorithm treats such strata as take-all strata that are reviewed in full while the rest of the budget is reallocated. Methods also exist for lower and upper bounds on each stratum at once, which is how the floor and the take-all rule fit together. If cost per review differs a lot between strata, for example because attachment records take much longer to read, adjust the allocation for cost as well.

Illustrative worked example: five strata and one review budget

Illustrative example: a fictional HVAC services company prepares 401,500 job and customer records after automated redaction and can afford 1,500 reviews. All counts and rates below are illustrative. The pilot rates came from a small earlier sample in this fictional case; a real audit uses its own.

  • The proportional plan would spend half the budget on stratum A, where misses are rarest, and only six reviews on complaints.
  • The floor-plus-Neyman plan gives stratum E its floor of 100, then splits the remaining 1,400 reviews across A to D by size times expected variability.
  • Suppose the review finds 0, 2, 8, 10 and 7 misses in strata A to E. The per-stratum rates are 0%, about 0.46%, about 1.85%, 5% and 7%.
  • Weighted by stratum size, the dataset-wide miss rate is about 0.69%, with a standard error of about 0.16 percentage points. Pooling the raw counts without weights would report 27 misses in 1,500 reviews, or 1.8%, overstating the overall rate because the risky strata were oversampled on purpose.
  • The decision in this illustration is driven by strata D and E, not the overall number: both fail any reasonable per-stratum limit, so photos and complaint records go back for treatment or exclusion before anything is shared.
Illustrative worked example: five strata and one review budget
StratumRecordsAssumed pilot miss rateProportional sampleFloor plus Neyman sample
A Structured CRM fields only200,0000.2%747328
B Short job notes under 50 words120,0001%448439
C Long notes and customer emails60,0004%224433
D Records with photos or PDFs20,0008%75200
E Complaints and billing disputes1,50010%6100 (floor)

How do you turn stratum results into one honest number?

Turn stratum results into one number by weighting each stratum's miss rate by its share of all records and adding them up. The PCAOB standard describes the same step for audit groups: the auditor projects the results of each group separately and sums them. The standard error comes from the same weights applied to each stratum's own sampling variability, with a finite population correction for strata where a large share was reviewed.

Report the per-stratum results next to the weighted total. A low dataset-wide rate can hide a stratum that fails badly, and the per-stratum view is what tells a team where to fix the pipeline. A stratum with zero misses still has an upper bound that depends on how many records were reviewed in it, so state that bound rather than reporting zero as if it were exact.

Keep estimation and acceptance separate in your head. NIST's engineering statistics handbook notes that the main purpose of lot acceptance sampling is to decide whether a lot is likely to be acceptable, not to estimate its quality. Per-stratum acceptance limits answer the decision; the weighted rate and its uncertainty describe the dataset for the record.

When should a stratified design give way to something else?

A stratified design should give way to a full review when a high-risk stratum is small enough to read entirely, and to a simple random pilot when you do not yet know where the risk sits. Stratifying on guessed signals that turn out to be unrelated to misses adds bookkeeping without adding precision.

Targeted searches are the other exception. Hunting for known hard patterns, such as spelled-out email addresses, signature blocks or account number formats, is the fastest way to find problems, and every finding should be fixed. Those records were not drawn at random, though, so they must not be counted in the estimate. Run targeted searches alongside the random sample and report them separately.

Detector quality also changes the picture. Presidio's evaluation guidance notes that in PII detection recall, the share of actual identifiers found, is often more important than precision. A stratum where the detector is known to have weak recall, such as a second language or scanned forms, deserves a larger floor even before a pilot confirms it.

What can a passed privacy sample not tell you?

A passed sample tells you how often identifiers covered by your written rules survive; it does not tell you whether the remaining details can identify someone. Job descriptions, dates, locations and unusual events can point to a person without any name present.

The UK ICO's anonymization guidance frames that question through a motivated intruder who is reasonably competent and has access to resources such as the internet and public documents, and it accepts that the risk will never be exactly zero. That assessment is a separate review, informed by the strata where the sample found the most problems.

The strata themselves are useful input to it. The records that failed most often in the sample tend to be the ones whose surviving context is richest, so start the re-identification review there rather than with a fresh random draw.

  • Escalate to a privacy specialist when any stratum involves health, financial, children's or legal records, or when a take-all stratum still shows misses after a fix.
  • Narrow the scope when one stratum keeps failing after two rounds of fixes; excluding it is often cheaper than further redaction.
  • Pause sharing when the weighted rate passes but a single stratum fails its own limit.
  • Ask counsel to review whether the residual rate and the remaining details meet the standard that applies to the intended use.

Where risk-weighted sampling fits in a SourceX preparation

Sampling evidence speaks to privacy preparation only. Who owns the records, what customers were told and what contracts permit are separate questions that counsel reviews for the specific dataset, and a low residual rate does not settle any of them.

In a SourceX engagement, preparing selected records for an AI license includes the de-identification work, which SourceX performs through approved processing routes, next to rights review and contracting. Datasets at the scale buyers generally look for, which SourceX's general guide puts at two or more years of consistent history and tens of thousands of records in one system, are also the scale where stratified review earns its effort. Eligibility comes first, through a brief SourceX assessment of the company for which nothing is uploaded.

Frequently asked questions

What is risk-stratified sampling in a privacy audit?

It is a sampling design that splits a dataset into groups by how likely each group is to contain missed personal data, draws a random sample from each group, and gives riskier groups more reviews. Results are weighted by group size to give one overall rate, and each group's result is also reported on its own.

Does oversampling risky records bias the result?

Only if the results are pooled without weights. Weighting each stratum's miss rate by its share of all records removes the bias that oversampling would otherwise introduce, while keeping the extra precision in the strata that matter most.

How many strata should a privacy sample have?

Usually four to eight. Fewer strata miss real differences in risk; more strata spread the budget so thin that no stratum can support a conclusion. Merge strata whose pilot miss rates are similar.

Should targeted keyword searches count toward the sample?

No. Targeted searches find problems efficiently and every finding should be fixed, but the records were chosen because they looked risky, not at random. Counting them would distort the estimate, so report them separately.

What if a high-risk stratum is very small?

Review it in full. When a stratum is small or its allocation reaches its size, reading every record removes sampling uncertainty for that stratum and frees the remaining budget for the others.

Sources

  • The PCAOB's AS 2315 says an auditor may reduce the required sample size by separating items into relatively homogeneous groups, and projects each group's results separately before summing them. Source
  • Research on the recursive Neyman allocation describes the classical Tchuprov and Neyman optimal allocation and proves optimality when strata hitting their upper bound are taken in full. Source
  • The RNABOX paper gives an algorithm for optimum sample allocation under both lower and upper bounds on stratum sample sizes, generalizing the recursive Neyman algorithm. Source
  • The NIST/SEMATECH e-Handbook says the main purpose of lot acceptance sampling is to decide whether a lot is likely to be acceptable, not to estimate its quality. Source
  • Presidio's evaluation guidance defines recall as TP / (TP + FN) and notes that in PII detection recall is often more important than precision. Source
  • Presidio's documentation says automated detection may not find all sensitive information and additional protections should be employed. Source
  • The ICO's anonymization guidance uses a motivated intruder test and accepts that the risk of identification will never be zero. Source

See if your company qualifies

A short company assessment. No data uploads are needed.

See if your company qualifies