def kendall_pval(tau, n):
 test_stat = (tau / (((2 * ((2 * n) + 5)) / float(((9 * n) * (n - 1)))) ** 0.5))
 return normprob(test_stat, direction='two-sided')

def kendall_pval ( tau , n ) : test_stat = ( tau / ( ( ( 2 * ( ( 2 * n ) + 5 ) ) / float ( ( ( 9 * n ) * ( n - 1 ) ) ) ) ** 0.5 ) ) return normprob ( test_stat , direction = 'two-sided' )
calculate the p-value for the passed tau and vector length n .