A theory of second-order expectations and behavior