1
$\begingroup$

I'd like to be able to plot a line like the cumulative distribution function for the normal distribution, because it's useful for simulating the adoption curve:

Adoption curve

Specifically, I'd like to be able to use initial data (percentage adoption of a product) to extrapolate what the rest of that curve would look like, to give a rough estimate of the timeline to each of the phases.

So, for example, if we got to 10% penetration by 30 days and 20% penetration by 40 days, and we try to fit this curve, I'd like to know when we're going to get to 80% penetration (vs another population that may have taken 50 days to get to 10% penetration).

So, my question is, how could I go about doing this? I would ideally be able to provide initial data (time and penetration), and use Python to plot out the rest of the chart for me. But I don't know where to start! Can anyone point me in the right direction?

$\endgroup$
2

1 Answer 1

0
$\begingroup$

You problem ressembles that of isotonic regression in which a weighted least-squares penalty is optimized over non-decreasing functions. To be more specific, you seem to have only the red points in this figure:

ecdf

On my example running the default sklearn.isotonic.IsotonicRegression of scikit-learn, I get the following

ecdf_iso

Now if I instead use linear interpolation, I get the following:

ecdf_lerp

Finally, If you know your data is approximately gaussian (you mention the gaussian example), you can simply use scipy's curve fitting routine to approximate the CDF. In my case, I get the curve below:

ecdf_gauss

The fact it doesn't perfectly fit is because my data is not gaussian. You should try these techniques yourself and decide based on the results.

$\endgroup$
2
  • $\begingroup$ This is extremely helpful. Thank you so much—I really appreciate it! $\endgroup$
    – Chris
    Feb 22, 2021 at 10:16
  • $\begingroup$ Glad you found this useful :) $\endgroup$ Feb 22, 2021 at 10:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.