def cumNorm(xx, sd, thresh, chance=0.5):
 xx = numpy.asarray(xx)
 y = ((special.erf(((xx - thresh) / (numpy.sqrt(2) * sd))) + 1) * 0.5)
 y = ((y * (1 - chance)) + chance)
 return y

def cumNorm ( xx , sd , thresh , chance = 0.5 ) : xx = numpy . asarray ( xx ) y = ( ( special . erf ( ( ( xx - thresh ) / ( numpy . sqrt ( 2 ) * sd ) ) ) + 1 ) * 0.5 ) y = ( ( y * ( 1 - chance ) ) + chance ) return y
for a given x value returns the probability (y) of the subject responding yes .