Local Differential Privacy Lab

Decentralized Randomized Response & Live Reconstruction Statistics

● Local-only mode
Privacy and classroom notice: Randomization occurs in this browser using the Web Crypto API. Integer draws use rejection sampling, so no outcome receives extra probability from modulo bias. In local-only mode, no response is transmitted. Joining a shared room loads MQTT.js and sends only the station number and randomized Yes/No output through a public demonstration broker. Use a unique classroom code, never enter personal information, and have every device join before collection because earlier submissions are not stored or replayed.
Step 1: Choose Your Randomization Device
Step 2: Private Local Execution
1st Coin (Pathfinder)
★
Flip the first coin in private. If Heads, answer truthfully. If Tails, flip the second coin to inject noise. Each student has a 50% chance of needing the second flip, so a small class may not split exactly in half.
✓ Protocol Compliance Rule:

Sample Question

Response Aggregator & Statistics

Total Submissions: 0
Station Observed Yes Observed Proportion (P̂Y) Live Inversion Formula Raw Reconstruction and Feasible Summary (π̂) Privacy (ε)
Station 1: Coin 0 / 0 — Waiting for submissions —Estimate undefined when n = 0 ε ≈ 1.10
Station 2: Die 0 / 0 — Waiting for submissions —Estimate undefined when n = 0 ε ≈ 1.61
Station 3: Spinner 0 / 0 — Waiting for submissions —Estimate undefined when n = 0 ε ≈ 1.10
The raw inversion is an unbiased estimate and may fall below 0% or above 100% in a small sample. The feasible value is clipped only for display. The 95% interval transforms a Wilson interval for the observed Yes proportion and then clips its endpoints to the feasible 0%–100% range.
Key comparison: Stations 1 and 3 use different procedures but produce the same channel: P(report Yes | true Yes) = 0.75 and P(report Yes | true No) = 0.25. They therefore have the same reconstruction formula and ε. The die reports the truthful value with probability 5/6, so it provides more statistical signal but weaker privacy because ln(5) > ln(3). All stations use the same question so their results can be compared without changing the underlying survey item.

📈 Mathematical Proofs of Reconstruction

Station 1 (Coin: Two-Coin Forced Response) P(Y=Yes | X=Yes)=0.75; P(Y=Yes | X=No)=0.25 P(Y=Yes) = 0.5π + 0.25 Inversion: π̂ = 2 × (P̂ - 0.25) Privacy: ε = ln(0.75 / 0.25) = ln(3) ≈ 1.10
Station 2 (Die: Die-Based Forced Response) P(Y=Yes | X=Yes)=5/6; P(Y=Yes | X=No)=1/6 P(Y=Yes) = (4/6)π + 1/6 Inversion: π̂ = (6P̂ - 1) / 4 Privacy: ε = ln((5/6) / (1/6)) = ln(5) ≈ 1.61
Station 3 (Spinner: Warner Complementary Question) P(Y=Yes | X=Yes)=0.75; P(Y=Yes | X=No)=0.25 P(Y=Yes) = 0.75π + 0.25(1-π) = 0.5π + 0.25 Inversion: π̂ = 2 × (P̂ - 0.25) Privacy: ε = ln(0.75 / 0.25) = ln(3) ≈ 1.10