As Prof. Eldar Shafir at Princeton University and I argue in our new book, “Scarcity: Why Having Too Little Means So Much” (Times Books), a similar psychology of scarcity operates across these examples but with varying degrees of force. If a cookie can tax our mental resources, imagine how much more psychological impact other forms of scarcity can have.

Take the case of poverty. In a paper published last month in Science, with Profs. Anandi Mani at the University of Warwick and Jiaying Zhao at the University of British Columbia, Professor Shafir and I waded into politically charged territory. Some people argue that the poor make terrible choices and do so because they are inherently less capable. But our analysis of scarcity suggests a different perspective: perhaps the poor are just as capable as everyone else. Perhaps the problem is not poor people but the mental strain that poverty imposes on anyone who must endure it.

One of our studies focused on Indian sugar cane farmers, who typically feel themselves to be both poor and rich, depending on the season. They are paid once a year at harvest time. When the crop is sold, they are flush with cash. But the money runs out quickly, and by the time the next harvest arrives they are stretched thin: they are, for example, 20 times as likely to pawn an item before harvest as after it. Rather than compare poor and rich farmers, we compare each farmer to himself: when he is rich against when he is poor. This kind of comparison is important because it addresses valid concerns that differences in psychological tests merely reflect differences in culture or test familiarity.

We measured farmers’ mental function — on what psychologists call fluid intelligence and executive control — one month before and one month after harvest. And the effects were large: preharvest I.Q., for example, was lower by about nine to 10 points, which in a common descriptive classification is the distance between “average” and “superior” intelligence. To put that in perspective, a full night without sleep has a similar effect on I.Q.

Bandwidth scarcity has far-reaching consequences, whether we are talking about poor farmers or affluent dieters. We all use bandwidth to make decisions at work, to resist the urge to yell at our children when they annoy us, or even to focus on a conversation during dinner or in a meeting. The diversity of these behaviors — combined with the size of the measurable effects — suggests a very different way to interpret the choices and behaviors of the poor. Just picture how distracting that cookie was, and multiply that experience by a factor of 10.

For dieters, bandwidth scarcity has one particularly important consequence, illustrated in one study that gave people a choice between fruit salad and cake. Before choosing, half of the subjects had their bandwidth taxed: they were asked to remember a seven-digit number. The other half had a mentally less-demanding task: they were asked to remember a two-digit number. Those with less available bandwidth ate more cake: they were 50 percent more likely to choose cake than the others. There is a paradox here: diets create mental conditions that make it hard to diet.