Randomized Response and Estimation
Trade truthful-response probability for privacy and see how it changes an unbiased prevalence estimate.
By Riano · Published · Updated · Report a correction
Randomized Response and Estimation
In survey sampling, directly asking sensitive questions often leads to evasive answers or untruthful responses. The randomized response technique introduces a probabilistic privacy mechanism: a respondent answers truthfully with some probability r, and otherwise gives a random response (such as flipping a fair coin). This plausible deniability protects individual privacy while still allowing the aggregate prevalence to be estimated.
Worked Example
Suppose the true population prevalence is π = 1/4 and the truthful response probability is r = 1/2.
- Calculate the probability of a "Yes" report (θ):
θ = r × π + (1 - r) / 2
θ = (1/2) × (1/4) + (1 - 1/2) / 2 = 1/8 + 1/4 = 3/8. - With n = 8 respondents, the expected number of "Yes" responses is nθ = 8 × (3/8) = 3.
- Suppose we observe y = 4 "Yes" responses. The unbiased moment estimator for the prevalence is:
π̂ = (y/n - (1 - r)/2) / r
π̂ = (4/8 - 1/4) / (1/2) = (1/4) / (1/2) = 1/2. - The true-law variance of this estimator is:
Var(π̂) = θ(1 - θ) / (nr2)
Var(π̂) = (3/8)(5/8) / (8 × (1/2)2) = (15/64) / 2 = 15/128 ≈ 0.1171875.
Experiment
Explore the trade-off between privacy and estimation variance:
- Set Prevalence quarters to 1.
- Set Truth quarters to 2.
- Set Respondents to 8.
- Adjust the Observed yes count and note how the Moment Estimate changes. Notice that it can exceed 1 or fall below 0, which is normal for this unbiased estimator.
- Change Truth quarters to 0 to observe that the prevalence becomes unidentifiable and the estimator unavailable.
Limitations
This module considers a specific unrelated-question design equivalent to a fair coin flip for the random response. Other designs exist (e.g., forced "Yes", forced "No", or using a different known-probability event). The moment estimator provided is unbiased but may yield estimates outside the meaningful [0, 1] range in small samples; these should not be silently truncated or interpreted as posterior probabilities.
References
Below is a reference to learn more about the survey-sampling methodology applied here.
- Penn State STAT506 survey-sampling notes (Section 12.3)
Experience it interactively
Adjust parameters, observe in real time, and build deep intuition with Riano’s interactive Randomized Response and Estimation module.
Try Randomized Response and Estimation on Riano →