x * (p) + (1-x)*(1-p) , 0<x<1,0<p<1, maximum