The analogy between decision and inference