I have a CDF which I have defined:
cdf = pd.DataFrame.from_dict({'x':[10e6,20e6,50e6,100e6,250e6],'cdf':[0.4,0.6,0.7,0.8,1]})
I want to draw 10,000 samples from this cdf by two methods:
- Directly using the cdf without any smoothing
- Directly using the cdf but smoothing between points (e.g. using a spline)
I can probably do
- by hand by sampling from a uniform distribution but I'm not sure how to do
- manually.
Is there any package that can help with sampling from a given CDF?