An expected-utility model of electoral competition