You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lectures/rand_resp.md
+39-33Lines changed: 39 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,13 +22,13 @@ These problems induce **selection** biases that present challenges to interpre
22
22
23
23
To illustrate how social scientists have thought about estimating the prevalence of such embarrassing activities and opinions, this lecture describes a classic approach of S. L. Warner {cite}`warner1965randomized`.
24
24
25
-
Warner used elementary probability to construct a way to protect the privacy of **individual** respondents to surveys while still estimating the fraction of a **collection** of individuals who have a socially stichmatized characteristic or who engage in a socially stimatized activity.
25
+
Warner used elementary probability to construct a way to protect the privacy of **individual** respondents to surveys while still estimating the fraction of a **collection** of individuals who have a socially stigmatized characteristic or who engage in a socially stigmatized activity.
26
26
27
-
Warner's idea was to add **noise** between the respondent's answer and the **signal** about that answer that the survey taker ultimately receives.
27
+
Warner's idea was to add **noise** between the respondent's answer and the **signal** about that answer that the survey maker ultimately receives.
28
28
29
-
Knowing about the structure of the noise assures the respondent that survey taker does not observe his answer.
29
+
Knowing about the structure of the noise assures the respondent that the survey maker does not observe his answer.
30
30
31
-
Statistical properties of the noise injection procedure provide the a respondent **plausible deniability**.
31
+
Statistical properties of the noise injection procedure provide the respondent **plausible deniability**.
32
32
33
33
Related ideas underlie modern **differential privacy** systems.
34
34
@@ -83,7 +83,7 @@ $$
83
83
\log(L)= n_1 \log \left[\pi p + (1-\pi)(1-p)\right] + (n-n_{1}) \log \left[(1-\pi) p +\pi (1-p)\right]
84
84
$$ (eq:two)
85
85
86
-
The first-order necessary condition for maximimizng the log likelihood function with respect to $\pi$ is:
86
+
The first-order necessary condition for maximizing the log likelihood function with respect to $\pi$ is:
87
87
88
88
$$
89
89
\frac{(n-n_1)(2p-1)}{(1-\pi) p +\pi (1-p)}=\frac{n_1 (2p-1)}{\pi p + (1-\pi)(1-p)}
@@ -197,48 +197,55 @@ under different values of $\pi_A$ and $n$:
@@ -249,10 +256,10 @@ Let's put the code to work for parameter values
249
256
250
257
We can generate MSE Ratios theoretically using the above formulas.
251
258
252
-
We can also perform a Monte-Carlo simulation of the MSE Ratio.
259
+
We can also perform a MonteCarlo simulation of the MSE Ratio.
253
260
254
261
```{code-cell} ipython3
255
-
cp1 = Comparison(0.6,1000)
262
+
cp1 = Comparison(0.6,1000)
256
263
df1_theoretical = cp1.theoretical()
257
264
df1_theoretical
258
265
```
@@ -264,7 +271,7 @@ df1_mc
264
271
265
272
The theoretical calculations do a good job of predicting the Monte Carlo results.
266
273
267
-
We see that in many situations, especially when the bias is not small, the MSE of the randomized-samplijng methods is smaller than that of the non-randomized sampling method.
274
+
We see that in many situations, especially when the bias is not small, the MSE of the randomized-sampling methods is smaller than that of the non-randomized sampling method.
268
275
269
276
These differences become larger as $p$ increases.
270
277
@@ -278,7 +285,7 @@ For example, for another situation described in Warner {cite}`warner1965randomiz
278
285
we can use the code
279
286
280
287
```{code-cell} ipython3
281
-
cp2=Comparison(0.5,1000)
288
+
cp2 = Comparison(0.5,1000)
282
289
df2_theoretical = cp2.theoretical()
283
290
df2_theoretical
284
291
```
@@ -296,7 +303,7 @@ We can also revisit a calculation in the concluding section of Warner {cite}`wa
296
303
We use the code
297
304
298
305
```{code-cell} ipython3
299
-
cp3=Comparison(0.6,2000)
306
+
cp3 = Comparison(0.6,2000)
300
307
df3_theoretical = cp3.theoretical()
301
308
df3_theoretical
302
309
```
@@ -310,8 +317,7 @@ Evidently, as $n$ increases, the randomized response method does better perform
310
317
311
318
## Concluding Remarks
312
319
313
-
{doc}`This quantecon lecture <util_rand_resp>` describes some alternative randomized response surveys.
320
+
{doc}`This QuantEcon lecture <util_rand_resp>` describes some alternative randomized response surveys.
314
321
315
322
That lecture presents the utilitarian analysis of those alternatives conducted by Lars Ljungqvist
0 commit comments