A new report by the JPMorgan Chase Institute, looking at the effect of lower gas prices on consumer spending, finds the same pattern as earlier studies. The average American would have saved about $41 a month last winter by buying the same gallons and grades. Instead, Americans took home roughly $22 a month. People, in other words, used almost half of the windfall to buy more and fancier gas.

This is not rational behavior. Americans spent about 4 percent of pretax income on gas in 2014. One might expect them to spend about the same share of any windfall at the pump — maybe a little more because gas got cheaper. Instead they spent almost half.

Americans, in short, have not been behaving like the characters in economics textbooks.

There is, however, a pretty good explanation for this kind of pattern. Researchers have found that people treat money as earmarked for particular kinds of spending, a tendency behavioral economists call “mental accounting.” If someone is buying rounds at the neighborhood bar, people tend to treat the money they didn’t spend as “beer money,” and sooner or later they tend to spend it disproportionately on beer. As a result, they end up drinking more beer than they originally intended.

The JPMorgan study compares gas spending between December 2013 and February 2014, when prices averaged $3.31 a gallon, with gas spending by the same people in the same period one year later, when average prices were $1 lower. The study found that the average American spent $136 per month on gas during the high-price period and $114 per month on gas during the low-price period. While the price of gas fell by roughly 30 percent, spending on gas declined by only 16 percent.

The study, based on the spending patterns of about 1 million JPMorgan customers, does not track the kind of gas that consumers purchased. It shows that people bought more gas as prices fell, and that the increase in consumption is not sufficient to explain the entirety of the increase in spending on gas.

We know how that extra money was probably spent thanks to a separate 2013 study by economists Justine Hastings of Brown University and Jesse M. Shapiro of the University of Chicago, who got their hands on detailed accounts of the purchases made by 61,494 households at an unidentified retail chain that also sold gas.

Hastings and Shapiro showed that households adjusted their gas consumption much more sharply in response to changes in gas prices than in response to equivalent changes in overall income. In the fall of 2008, for example, as gas prices fell amid a broad economic collapse, consumers responded as if the decline of gas prices were the more important event, significantly increasing purchases of premium gas.

Moreover, this behavior was prevalent: 61 percent of the households made at least one irrational gas purchase. People “treat changes in gasoline prices as equivalent to very large changes in income when deciding which grade of gasoline to purchase,” they wrote.

Economic models are simplifications. As in Jorge Luis Borges’ parable of a map that grew to be the same size as the empire it charted, there is no purpose in a model that captures all of the messy complexity of reality. Models are helpful because they leave things out. And patterns of irrational behavior often are dismissed as insignificant variations. Economists didn’t think people actually spent windfalls on exactly the things they wanted most. But they regarded the reality as close enough.

The kind of extensive and detailed data used by JPMorgan and the earlier study, however, are making it possible not only to see the complexity beneath the simplification but also to aggregate all of those variations into a significantly different big picture.

A government devising a targeted tax cut, for example, would do well to remember that people are likely to spend the savings near the target.

And consumers would do well to remember that premium gas is usually a waste of money.