1
$\begingroup$

How to solve for small gamma in the integral equation in Scipy ? I recognize it has to be solved with both the numerical integral and a root solver (Newton's method)

$$ \int_{\gamma}^{+\infty}f(x) dx = 0.01 $$

The function f isn't a known analytical function, it is a probability distribution represented by an array of samples of a histogram.

So essentially the integral is :

$$ \sum_{k = \gamma}^{+\infty} f[k] \Delta x \approx 0.01 $$

$\endgroup$
1
  • 1
    $\begingroup$ This is called "quantile estimation". $\endgroup$ Aug 10 at 17:45
1
$\begingroup$

You might simply sort the data in ascending order, then figure out which value corresponds to the upper 99th percentile. If $y[0], \dots, y[N-1]$ is your sorted data, it'll be $y[I]$ where $I = 0.99 \times N$. This is a simple quantile estimation as mentioned in the comments by Mark Stone.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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