Extrapolating beyond the maximum x-value in the data.

17 views
Skip to first unread message

bla...@tcd.ie

unread,
Sep 3, 2017, 1:40:51 PM9/3/17
to powerlaw-general
Thanks for the useful Python package!

I have a dataset that contains amplitudes of geomagnetic events for 25 years. I am interested in fitting a powerlaw to the data, and extrapolating to larger X values, estimating the frequency of occurrence of rare events.

I'm only interested in the tail of the data (i.e., values greater than X). Suppose I am interested in the largest 25% of the data (call this data2).

I can calculate the CCDF of data2, then multiply this by len(data2) to get the # events > X expected per 25 years.

The best fit CCDF can be found from "fit.power_law.ccdf()". I can multiply this by len(data2) to get the estimated # of events for per 25 years.



Is there a simple way to extrapolate the best fit CCDF (dashed green line in above plot) for greater values of X? I can get the slope manually, but I am wondering if there is a more elegant way to do it.

Thanks!

Jeff Alstott

unread,
Sep 3, 2017, 3:15:01 PM9/3/17
to powerlaw...@googlegroups.com
Try:

`fit.power_law.ccdf(data=[whatever x values you are interested in])`

Same thing can be done for PDF.

Check out the documentation for the `ccdf` method:


The complementary cumulative distribution function (CCDF) of the theoretical distribution. Calculated for the values given in data within xmin and xmax, if present. 

Parameters 
---------- 
data : list or array, optional 
If not provided, attempts to use the data from the Fit object in which the Distribution object is contained.

--
You received this message because you are subscribed to the Google Groups "powerlaw-general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to powerlaw-general+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

bla...@tcd.ie

unread,
Sep 4, 2017, 7:08:15 AM9/4/17
to powerlaw-general
Hi Jeff

That's brilliant, thank you. I must have misread the docs.
To unsubscribe from this group and stop receiving emails from it, send an email to powerlaw-gener...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages