Irrational choices follow patterns you can measure and redesign