Rationality as optimal choice versus rationality as valid inference