Back to Home
LDP Correction Estimators
Recover true statistics from LDP-perturbed data
How This Demo Works
1. Original data is fetched from the database. 2. LDP perturbation is applied with your selected ε=2. 3. Correction estimators recover the true statistics using the same ε.
Important: The correction formula must use the same epsilon that was used for perturbation. Changing ε re-processes the data with that privacy level, then corrects it accordingly.
Frequency Correction
F̂ = (observed - n×p) / (q-p)Truth Probability (q)
q = e^ε / (e^ε + d - 1)Lie Probability (p)
p = 1 / (e^ε + d - 1)More PrivacyMore Accuracy
Truth probability: 64.9%
No data available. Please check your database connection.
SQL Examples (GRRM)
-- Frequency correction
SELECT anon.ldp_frequency_estimate(observed_count, total_n, 2, 5);
-- Variance estimation
SELECT SQRT(anon.ldp_frequency_variance(observed_count, total_n, 2, 5)) as std_error;
-- Mean correction
SELECT anon.ldp_mean_from_frequencies(ARRAY[c1, c2, ...], 2, 5);
-- Confidence interval
SELECT anon.ldp_ci_lower(count, n, 2, 5, 0.95),
anon.ldp_ci_upper(count, n, 2, 5, 0.95);
anon.ldp_ci_upper(count, n, 2, 5, 0.95);