def z_transform_pval(z, n):
 if (n <= 3):
  return nan
 return normprob((z * ((n - 3) ** 0.5)), direction='two-sided')

def z_transform_pval ( z , n ) : if ( n <= 3 ) : return nan return normprob ( ( z * ( ( n - 3 ) ** 0.5 ) ) , direction = 'two-sided' )
calculate two tailed probability of value as or more extreme than z .