The Lomax pareto distribution in SciPy17/3/2023 The Python library SciPy, contains a version of the Lomax distribution which it defines as: $$f(x,c) = \frac{c}{(a+x)^{(c+1)}}$$ Whereas, the ‘standard’ specification is [1]: $$f(x,c, \lambda) = \frac{c \lambda ^ c}{(a+x)^{(c+1)}}$$ Which is also the definition in the IFoA core reading [2]: So, how can we use the SciPy version of the Lomax to simulate the standard version, given we are missing the $ \lambda ^c$ term? To answer this we need to go to the relevant section of the SciPy documentation [3]: It’s not obvious from this, but we can show that the Lomax from Scipy, with loc = 0, c = the tail parameter (alpha from wikipeda), and scale = the shape parameter (lamda from Wikipedia), is actually equal to the Lomax distribution in the standard specification.
To see this, first note that $lomax.pdf(x,c,l,s) = \frac{ lomax(y,c)} {scale}$, where $y = \frac{x-l}{s}$, using the definition of $lomax(x,c)$, setting $loc = 0$, this is equal to : $$\frac{\frac{c}{(1+\frac{x}{s})^{c+1}}}{s} = \frac{c * s^{-1}}{(1+\frac{x}{s})^{c+1}} = \frac{c * s^{-1}}{(\frac{x+s}{s})^{c+1}} = \frac{c * s^{-1} s^{c+1}}{(x+s)^{c+1}} = \frac{c * s^{c}}{(x+s)^{c+1}}$$ Which get’s us the desired result. i.e. by just using $loc = 0$, and setting $c = \alpha$, and $scale = \lambda$, the SciPy lomax becomes the regular Lomax. [1] https://en.wikipedia.org/wiki/Lomax_distribution [2] IFoA - Core Reading for the 2022 Exams - CS2 Risk Modelling and Survival Analysis [3] https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.lomax.html |
AuthorI work as an actuary and underwriter at a global reinsurer in London. Categories
All
Archives
April 2024
|
Leave a Reply.