def chi2_pdf(self, x, df):
 Px = ((x ** ((df / 2.0) - 1)) * np.exp(((- x) / 2.0)))
 Px /= (special.gamma((df / 2.0)) * (2 ** (df / 2.0)))
 return Px

def chi2_pdf ( self , x , df ) : Px = ( ( x ** ( ( df / 2.0 ) - 1 ) ) * np . exp ( ( ( - x ) / 2.0 ) ) ) Px /= ( special . gamma ( ( df / 2.0 ) ) * ( 2 ** ( df / 2.0 ) ) ) return Px
pdf of chi-square distribution .