cleverly.datasets.randomized_pilot_truth#

cleverly.datasets.randomized_pilot_truth() → dict[str, float][source]#

Return the exact counterfactual means and the average effect of the pilot law.

Returns:
dict of str to float

ey0 and ey1, the share of successful transitions if no one or everyone got the offer, and ate, their difference.

See also

cleverly.datasets.make_randomized_pilot

Draws data from this law.

Notes

The success probability is smooth in \(S\) on each side of the risk threshold \(S = 0\), so each side is integrated with 200 Gauss-Legendre nodes on [0, 12] against the standard normal density. The mass beyond 12 is below 1e-32. \(P\) enters through a standard normal integral, taken with 80 Gauss-Hermite nodes.

Examples

>>> from cleverly.datasets import randomized_pilot_truth
>>> truth = randomized_pilot_truth()
>>> round(truth["ate"], 4)
0.142