# functionH: Create a DP-CDF by creating a K-degree noisy tree In CDF.PSIdekick: Evaluate Differentially Private Algorithms for Publishing Cumulative Distribution Functions

## Description

This function creates a storage tree of degree K using gran and range, adds independent noise to each node proportional to epsilon, and then searches the tree to create a DP-CDF.

## Usage

 `1` ```functionH(eps, cdfstep, data, range, gran, K = 2, ...) ```

## Arguments

 `eps` Epsilon value for Differential privacy control `cdfstep` The step sized used in outputting the approximate CDF; the values output are [min, min + cdfstep], [min, min + 2 * cdfstep], etc. Setting cdfstep equal to 0 (default) will set cdfstep = granularity `data` A vector of the data (single variable to compute CDFs from) `range` A vector length 2 containing user-specified min and max to truncate the universe to `gran` The smallest unit of measurement in the data (one [year] for a list of ages) `K` This sets the degree of the underlying tree. `...` Optionally add additional parameters.

## Value

A list with 2 vectors: one is the y coordinates of the DP-CDF, the other is the abs values of the anlytically expected bounds on it at 95 percent probability.

## Examples

 `1` ```functionH(eps = .01, cdfstep = .1, data = rexp(10000,.4), range= c(1,10), gran = .1, K= 2) ```

### Example output

```\$theCDF
[1] 0.4202823 0.6866966 0.8063364 0.5713300 0.4901609 0.6486537 0.5381161
[8] 0.4263911 0.2871118 0.2764890 0.4454992 0.6254455 0.7545758 0.7808705
[15] 0.7340240 0.6229966 0.4289536 0.4223708 0.4180654 0.5379615 0.6518236
[22] 0.6620248 0.9144190 0.5314434 0.1831348 0.6769623 0.9407613 0.8351937
[29] 0.9918340 0.8379280 0.9973508 0.9142286 0.9514350 0.9529804 0.9863279
[36] 1.0869111 0.6934110 1.0653929 1.1346607 1.1179231 1.0947219 1.1031852
[43] 1.3698387 1.0494682 1.0843905 1.3328654 1.4512877 1.3898643 1.1032489
[50] 1.0700774 0.9927833 1.1678492 0.9413619 1.0624446 0.9122677 1.1533673
[57] 1.3957678 1.3676243 1.3138082 1.3942932 1.3405236 1.5507676 1.5185751
[64] 0.8633733 0.7464454 1.0368992 1.0178365 0.8898505 0.8526851 0.9130864
[71] 0.9420904 1.0550290 1.1309865 1.0351799 1.1299070 1.1186788 1.0243415
[78] 1.1605188 1.2206535 0.8918584 0.9478096 0.9413568 1.0398875 0.9992994
[85] 0.7589409 1.0259346 1.0729967 1.0063146 0.8944061 0.9305767 1.0000000

\$bound
[1] 0.03563636 0.03528000 0.06414546 0.03484445 0.06414546 0.06272000
[7] 0.08552727 0.03430000 0.06414546 0.06272000 0.08552727 0.06097778
[13] 0.08552727 0.08232000 0.09978182 0.03360000 0.06414546 0.06272000
[19] 0.08552727 0.06097778 0.08552727 0.08232000 0.09978182 0.05880000
[25] 0.08552727 0.08232000 0.09978182 0.07840000 0.09978182 0.09408000
[31] 0.10690909 0.03266667 0.06414546 0.06272000 0.08552727 0.06097778
[37] 0.08552727 0.08232000 0.09978182 0.05880000 0.08552727 0.08232000
[43] 0.09978182 0.07840000 0.09978182 0.09408000 0.10690909 0.05600000
[49] 0.08552727 0.08232000 0.09978182 0.07840000 0.09978182 0.09408000
[55] 0.10690909 0.07350000 0.09978182 0.09408000 0.10690909 0.08711111
[61] 0.10690909 0.09800000 0.10690909 0.03136000 0.06097778 0.05880000
[67] 0.07840000 0.05600000 0.07840000 0.07350000 0.08711111 0.05226667
[73] 0.07840000 0.07350000 0.08711111 0.06720000 0.08711111 0.07840000
[79] 0.08711111 0.04704000 0.07350000 0.06720000 0.07840000 0.05880000
[85] 0.07840000 0.06720000 0.07350000 0.04704000 0.05226667 0.03136000
[91] 0.00000000
```

CDF.PSIdekick documentation built on May 30, 2017, 5:09 a.m.