loxx

chi2Inv

loxx Updated   
Library "chi2Inv"

chi2Inv(p, n)
  Returns the inverse cumulative distribution function (icdf) of the chi-square distribution with degrees of freedom nu, evaluated at the probability values in p. Goldstein approximation
  Parameters:
    p: float, probability
    n: float, degress of freedom source.
  Returns: float.
Release Notes:
v2
The V1 release was returning low quality output, this one matches the desired result as measured against Microsoft Excels functions CHISQ.INV and CHISQ.INV.RT
Updated:
chi2Inv(pin, deg, tail)
  Returns the inverse of the right-tailed or left-tailed probability of the chi-squared distribution.
  Parameters:
    pin: float, probability
    deg: float, degress of freedom.
    tail: string, tail, either "r" for right or "l" for left
  Returns: float.

Public Telegram Group, t.me/algxtrading_public

VIP Membership Info: www.patreon.com/algxtrading/membership
Pine library

In true TradingView spirit, the author has published this Pine code as an open-source library so that other Pine programmers from our community can reuse it. Cheers to the author! You may use this library privately or in other open-source publications, but reuse of this code in a publication is governed by House Rules.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this library?

Copy the following line and paste it in your script.