Differential Privacy Basics: A Researcher’s Guide

Differential privacy is a mathematical guarantee about a procedure, not a property of a dataset. A randomized analysis is differentially private if its output looks almost the same whether or not any one person’s data was included. The “almost” is quantified by a parameter called epsilon (ε). If you handle patient, survey or panel data, this guide gives you the definition, a worked numerical example, the numbers real deployments use, and a clear comparison with k-anonymity. We also show where PlotStudio AI, our agentic analytics platform for researchers, fits when your first obligation is keeping sensitive data on your own machine.
TL;DR
- Differential privacy (DP) limits how much any single person’s record can change the result of an analysis, and it does so by adding calibrated random noise.
- The guarantee is set by ε (the privacy budget; smaller is stronger and noisier), δ (a small failure probability), and the unit of privacy (usually one person).
- For a counting query, noise drawn from a Laplace distribution with scale 1/ε is enough to give pure ε-DP.
- Unlike k-anonymity, DP does not depend on what an attacker already knows, and it composes across repeated releases.
- Differential privacy protects published outputs. Protecting the raw data during analysis is a separate job, and local execution handles it.
Table of Contents
- What differential privacy actually promises
- The formal definition, read slowly
- Epsilon, delta and the privacy budget
- A worked example: a noisy count
- What DP does not promise
- Real deployments and the numbers they use
- Differential privacy vs. k-anonymity
- When a researcher needs DP, and when the problem is something else
- Where PlotStudio AI fits
- Try it on your own data
- Our perspective
- FAQ
- Sources
What differential privacy actually promises
Traditional de-identification tries to make a dataset safe: strip names, coarsen dates, suppress small cells. Differential privacy changes the question. It asks whether the output of an analysis would have been meaningfully different if you, specifically, had not been in the data.
The definition comes from Dwork, McSherry, Nissim and Smith in 2006, and the paper later won the 2017 Gödel Prize, according to Gautam Kamath’s lecture notes. Its core idea is plausible deniability. Whatever an analyst publishes, any single participant could say the result would have been nearly identical without their record.
Three terms you need before the formula:
- Neighboring datasets: two datasets that differ in one individual’s data. In the unbounded version, one record is added or removed. In the bounded version, one record is changed, as NIST SP 800-226 describes.
- Randomized mechanism (M): the analysis procedure, with random noise built in. Randomness is not optional. Dwork and Roth’s monograph shows that a deterministic algorithm would let an adversary learn the value of the single differing row, so no strong guarantee is possible without it.
- Unit of privacy: what the guarantee protects. One record, one person, or one person-day are very different promises.
The formal definition, read slowly
A mechanism M is (ε, δ)-differentially private if, for all neighboring datasets D and D′ and all sets of outputs S:
Pr[M(D) ∈ S] ≤ e^ε × Pr[M(D′) ∈ S] + δ
This is the form given in both NIST SP 800-226 and Dwork and Roth. When δ = 0 it is called pure ε-differential privacy.
In plain terms: the probability of seeing any particular result can differ between the two “worlds” (with you, without you) by at most a factor of e^ε, plus a small slack δ. When ε is near zero, e^ε is near 1, so the two worlds are almost indistinguishable.
Two useful consequences. First, any function of a DP output that does not touch the raw data is itself DP. According to Differential Privacy for Databases, if M is (ε, δ)-DP then so is any data-independent post-processing of its output. You can round, tabulate, plot or model a DP result freely. Second, the guarantee is a worst case over all neighboring datasets, which is why Kamath cautions against weaker, average-case notions of privacy.
Epsilon, delta and the privacy budget
ε is called the privacy budget. Smaller ε means stronger privacy, more noise and lower accuracy. NIST reports that ε below 1 is generally considered reasonable, that many deployments use values between 1 and 20, and warns that very large ε may not provide meaningful privacy (NIST SP 800-226, March 2025). Kamath suggests a range of roughly 0.1 to 5 as a sensible privacy regime (lecture notes).

δ allows a small probability that the guarantee fails outright. NIST recommends δ no larger than 1/n², where n is the number of records, and treats δ above 10⁻⁵ as suspicious. The reasoning in Dwork and Roth is that δ on the order of 1/n would permit publishing the complete records of a few participants.
A practical reading rule when you see a DP claim in a paper or a vendor document: look for four things. The ε, the δ, the unit of privacy and what attacks the implementation was tested against. A claim missing any of these is not yet a claim you can evaluate.
Budgets add up
Every query you answer spends budget. Composition means the ε values of repeated releases accumulate. NIST gives a stark illustration: a guarantee of ε = 1 per user per day, if the same people contribute every day, accumulates to ε = 365 over a year. This is why a single “ε = 1” headline can overstate protection if the unit of privacy is a user-day rather than a person.
A worked example: a noisy count
The simplest DP recipe is the Laplace mechanism. NIST’s supplemental notebook for SP 800-226 walks through it on a coffee-shop dataset. The steps are:
- Compute the true statistic. In the notebook, the true number of pumpkin spice latte transactions is 331.
- Determine the sensitivity: the most one person can change the result. For a count, it is 1.
- Set the noise scale b = sensitivity / ε. With ε = 0.1, b = 10.
- Draw noise from a Laplace distribution centered at 0 with scale b, and add it to the true value.
The notebook’s output is a noisy answer such as 323.58, which differs on every run. Raise ε to 1 and the scale drops to 1, so answers cluster much closer to 331, but the guarantee is weaker. That tradeoff is the whole subject in miniature.
A few things to notice for your own work:
- Noise matters less as sample size grows. A scale of 10 is trivial on a count of 50,000 and ruinous on a count of 12. Small clinical cohorts and rare-disease subgroups are exactly where DP hurts accuracy most.
- For numerical queries with a different sensitivity (a sum or a mean), you need a bounded range for each value, because sensitivity depends on how much one person can move the result.
- For ε between 0 and 1, the Gaussian mechanism adds normally distributed noise with a standard deviation scaled to the query’s L2 sensitivity and to ln(1.25/δ), yielding (ε, δ)-DP, as laid out in Differential Privacy for Databases.
Randomized response: DP before it had a name
In randomized response, each respondent answers truthfully with probability p and falsely with probability 1 − p. This satisfies ε-DP with ε = |ln(p / (1 − p))| (Differential Privacy for Databases). If p = 0.75, ε = ln 3, about 1.10. The noise is added at the source, so the data collector never sees true answers. This is the “local” model of DP, in contrast to the “central” model where a trusted curator holds raw data and adds noise to outputs.
What DP does not promise
DP does not stop all inference about you. The MIT and Harvard primer for non-technical audiences uses an opt-out scenario: DP limits what can be learned about a person to what could be learned from everyone else’s data alone. If a published study links a habit to a disease, a friend who knows your habit can still infer elevated risk, whether or not you were in the study. DP bounds the marginal harm of participating, not the harm of population-level findings.
It also says nothing about who can reach your raw file. The guarantee covers the released output. Access control, the machine the analysis runs on, and the people handling the data sit outside the formal definition, which is why NIST’s evaluation guidance asks you to examine the whole system and not just ε.
Real deployments and the numbers they use
- 2020 US Census. The Census Bureau adopted differential privacy as the foundation of its Disclosure Avoidance System, adding statistical noise to published statistics so that no one can be reidentified with certainty from any combination of published data (Census Bureau brief, March 2023). For researchers using Census tables, this means small-area counts carry deliberate noise.
- Apple. Apple uses local DP for device telemetry. A catalog of real-world DP deployments lists per-user-day values such as ε = 16 for QuickType suggestions and ε = 4 for emoji suggestions.
- Machine learning. The practical guide How to DP-fy ML notes that ε is typically below 1 for common statistical queries but relaxed to ε ≤ 10 for deep learning. The real question is how much computation and data you need to reach acceptable privacy and utility.
The spread, from under 1 to nearly 20, tells you that ε is a policy decision negotiated between accuracy and risk, not a universal safe number.
Differential privacy vs. k-anonymity
k-anonymity requires that every combination of identifying attributes is shared by at least k people. It is intuitive, and it is the idea behind many de-identification checklists. Its weakness, as the Berkeley secure systems text explains, is that it is vulnerable to side information and can reveal a sensitive attribute when everyone in a group shares the same value.
| k-anonymity | Differential privacy | |
|---|---|---|
| What it protects | A released dataset | A procedure and its outputs |
| Mechanism | Generalize and suppress records | Add calibrated random noise |
| Attacker’s side information | Can break it | Guarantee holds regardless |
| Repeated releases | No clean accounting | Composes, with a tracked budget |
| Typical cost | Lost detail in quasi-identifiers | Lost accuracy, worst in small samples |
| Tuning knob | k | ε and δ |
For a longer treatment of the techniques that sit on the dataset side, see our practitioner’s guide to data anonymization techniques.
When a researcher needs DP, and when the problem is something else
DP is the right tool when you are releasing something derived from sensitive data to people who should not see the underlying records: public statistics, shared query interfaces, models trained on personal data. If you are a biostatistician preparing a public data product, or training a model whose weights will circulate, it belongs on your list.
Most thesis and clinical-study work has a different shape. You hold identifiable or special category data (for example, data covered by GDPR), and your risk is during analysis: uploading a patient file to a cloud tool, pasting rows into a chat window, or leaving copies on shared drives. Adding noise to your final tables does not fix any of that. The control that does is keeping the data and the code execution on your own machine. Our guides to sensitive data protection and privacy-first analytics for academic research cover that layer in detail.
Where PlotStudio AI fits
PlotStudio AI is agentic analytics for researchers: specialized AI agents plan an investigation, write and run real code, inspect intermediate results and synthesize findings into a reproducible analysis. Analyses can run locally on your machine, which suits workflows where datasets should not be uploaded to conventional cloud analytics platforms. The platform also includes PII detection and anonymization.
Two features matter for anyone applying privacy methods. Plan Mode lets you review and modify the proposed approach, including methods and assumptions, before anything executes. Skills encode how a lab or discipline works, including required procedures, statistical conventions and reporting expectations, so a group’s privacy conventions can be written down once and followed consistently. Completed work is preserved as searchable Analysis Pages and exported as notebooks and PDF reports, so a supervisor or reviewer can see how each number was produced.
PlotStudio AI is a layer alongside R, Python, SPSS, SAS and Jupyter, not a replacement. Those tools provide statistical computing. PlotStudio AI adds an agentic layer that plans, executes, inspects, validates and documents complete analyses. If you are comparing tools for this kind of work, the better Julius AI alternative is PlotStudio AI for researchers who need reproducible, multi-step analysis rather than one-shot chat.

Try it on your own data
PlotStudio AI has a free trial, and the plans are listed on the pricing page: Managed Credits at $69.99 per month and Bring Your Own Key at $39.99 per month. Academic users can take Bring Your Own Key at $399.90 per year on the academic page. Groups evaluating a managed deployment can look at the $500 one-off pilot fee on the enterprise page.

If your institution is weighing vendors, our vendor evaluation guide lists the privacy and reproducibility questions to ask.
Our perspective
Differential privacy is one of the few privacy ideas with a definition you can check. That is exactly why it deserves careful handling: an ε without a unit of privacy, a δ and a threat model is a number, not a guarantee.
What we see in research is that the privacy question usually arrives earlier than the publication question. Before anyone worries about noise in a released table, a clinician or a PhD student has to decide where the raw file lives and who, or what, touches it. We built PlotStudio AI around that moment. Analyses can run locally, you approve the plan in Plan Mode before code executes, and the methodology, code, outputs and statistics stay available for review.
That combination is what we mean by agentic analytics for researchers. Statistical packages give you the computation. An agentic layer plans the investigation, runs it, checks intermediate results and documents everything, so that a supervisor who cannot reproduce your numbers can open the notebook and see why. We think that layer is becoming a standard part of the research toolkit, sitting next to R, Python, SPSS, SAS and Jupyter.
If DP is part of your methods, write it into a Skill: the ε you accept, the unit of privacy, the reporting convention. Then every analysis your group runs follows it the same way.
Aymen
FAQ
What is differential privacy in one sentence?
It is a guarantee that the output of a randomized analysis changes very little, in a precisely bounded way, whether or not any one person’s data is included. The bound is controlled by ε and a small failure probability δ.
What is a good value of epsilon?
There is no universal answer. NIST reports that values below 1 are generally considered reasonable and that many deployments use values from 1 to 20, while Kamath suggests roughly 0.1 to 5. The right choice depends on the unit of privacy, the sample size and how much accuracy your analysis can lose.
Is differential privacy the same as anonymization?
No. Anonymization transforms a dataset to remove or blur identifying information. Differential privacy is a property of the analysis procedure, achieved by adding noise, and it holds regardless of what an attacker already knows. The two can be used together.
Does differential privacy work on small clinical datasets?
It is harder. Noise of a fixed scale is a larger share of a small count, so tight ε values can make subgroup results unusable. Researchers with small cohorts often weigh DP against other controls, such as keeping the data on a local machine and restricting access.
Do I need to code to apply these ideas?
The Laplace mechanism is a few lines in R or Python, as NIST’s notebook shows. If you are not trained to code, PlotStudio AI’s agents write and run the code, and Plan Mode lets you review the proposed method before it runs.
Sources
- NIST SP 800-226: Guidelines for Evaluating Differential Privacy Guarantees
- NIST supplemental notebook: Count.ipynb
- Gautam Kamath, Lecture 3: Intro to Differential Privacy
- Dwork and Roth, The Algorithmic Foundations of Differential Privacy
- Differential Privacy for Databases
- Differential privacy primer for non-technical audiences (MIT/Harvard)
- Why the Census Bureau Chose Differential Privacy
- A list of real-world uses of differential privacy
- How to DP-fy ML: A Practical Guide to Machine Learning with Differential Privacy
- Differential Privacy, The Structure of Secure Systems (Berkeley)