I am currently working on Differential Privacy and want to visualize my noise distribution of the data set. I am using Laplacian distribution as my noise addition mechanism.
I have already calculated beta (scale parameter) and the true output of the data set (mean) and wonder which of the Laplace functions I should be using (dlaplace()
, plaplace()
, qlaplace()
, rlaplace()
from the rmutil
package) for a noise distribution. I also don't understand why I can't just generate a noise distribution with a Laplace parameter and mean, without specifying the data (y
,q
,p
,n
) in the functions mentioned above.
My thought of getting the Laplace distribution and visualising it is shown as below:
df <- ?laplace(?,m=33.6, s=7.32)
plot(df)
? represents the areas that I am unsure about, m
is the mean and s
is the scale parameter.
If you want to plot the density:
ggplot2
equivalent:If you want random deviates:
(the first argument, 10000, is the number of random deviates desired; use
geom_histogram()
inggplot
)