Let's say you are headed to a movie. As you are about to enter the theater, you reach into your pocket and find to your dismay that you have lost your ticket.

Let's say you are headed to a movie. As you are about to enter the theater, you reach into your pocket and find to your dismay that you have lost your ticket.

You don't have a receipt, so if you still want to see the movie, you have to pay another $10 for a new ticket.

If you are like most people, you would probably think twice. You may still plonk down the money, but you will now feel that you paid $20 for a $10 movie.

But let's construct the scenario differently. You are going to a movie. As you stand in line at the box office to buy your ticket, you discover that you have dropped a $10 bill on the Metro. You are disappointed, of course, but would this affect your decision to buy the movie ticket? Again, if you are like most people, you may feel sore about the lost money, but it probably won't affect your decision to buy the ticket.

Psychologists once conducted an experiment along these lines. They found that only 46 percent of those who lost a ticket were willing to buy a replacement ticket, whereas 88 percent of those who lost an equivalent amount of cash were willing to buy a ticket. Since the lost ticket and the lost cash had the same value, their loss should have been experienced in the same way — so why were nearly twice as many people willing to ignore the lost cash but not the lost ticket?

The difference is because of a psychological phenomenon known as mental accounting — and it has enormous consequences in everyday life. It affects how people spend money and how they save. It influences how people deal with losses and windfall gains. It tells us what to do as we weigh different kinds of payment plans for a luxury item. The effects of mental accounting are felt in domains that seem far removed from the conventional understanding of economics — it may even help explain why it is so hard to find a cab on a rainy evening.

Here is the simplest definition of mental accounting: People carry around different running tabs in their heads. You have, for example, an "entertainment account." Losing a movie ticket and having to buy a second one takes $20 out of your entertainment account when you planned to take only $10. Lost cash, on the other hand, is not charged to the entertainment account — which is why most people don't hesitate to buy a movie ticket after they lose some cash.

However, compartmentalizing income and spending into different mental accounts violates one of the basic rules of economics — that money is fungible, or interchangeable. The $10 movie ticket is supposed to be worth exactly the same as $10 in cash. But this is not the way human beings actually think, which is why economic models of human behavior often turn out to be wrong.

"The source of the money affects how it is spent," said Suzanne Fogel, who heads the marketing department at DePaul University in Chicago. When she was a graduate student, Fogel waited tables to help pay the bills. She found that she carried around a figure in her head; the amount she wanted to make each day. On any day she passed that target, any additional income became "free money" — even though this money ought to have been a cushion for the days she did not meet her income target.

"Someone gives you money for your birthday and they don't say, 'pay your electric bill,' but money is money and completely fungible, and if you are behind on your electric bill, you should definitely spend your money on that," she added. "But there is a reluctance to do that."

Mental accounting is really the household equivalent of financial accounting, said Richard Thaler, an economist at the University of Chicago who was the first to describe how the phenomenon works. Just as an office expense-account maven might tell you that your budget for lunch is no more than $25, you make projections on how much you will spend using your own money. This mostly ends up saving you time. You don't have to think twice (although maybe you should) about the $3 latte you get each morning because you have a mental account that says you are entitled to a $3 latte each day.

The alternative to having mental accounts, Thaler said, is to consciously ask yourself what every purchase is worth and compare it with every other purchase. Is a latte worth the same as a pair of socks? Just as your boss doesn't want to be bothered with trivial decisions on whether you charge the company $20 or $22 for a meal, you don't want to waste time thinking about trivial purchasing decisions.

The effect of setting up accounts, however, has paradoxical effects — in exactly the same way that office accounting can create problems in a workplace, Thaler said. At the end of the financial year, your boss may not be willing to let you buy a new laptop, because the hardware budget is down to zero, but will allow you to take a trip to Los Angeles because there is money left in the travel budget. Your argument that you need a laptop more than the trip falls on deaf ears.

Mental accounting also explains why, when people are given a choice to get a cash bonus or a gift such as a free vacation for doing well on the job, they invariably choose cash. That's because people think they want the flexibility of cash. The problem is that flexibility comes with a price. You have to remember your obligations, such as fixing that leaky roof.

This is why studies show that employees who are not given a choice and are given a gift instead of cash usually turn out much happier. A vacation or a gift is "guilt-free" — yours to enjoy. If you get cash instead, you could spend it buying yourself the same vacation or gift, but mental accounting would remind you that you are wasting money on frivolities.

Ohio State University psychologist Hal Arkes once found that mental accounting influences how people deal with sudden gains, such as lottery winnings. The same phenomenon influences millions of Americans at tax time, when they gleefully look forward to refund checks from the government — even though refunds are really their own money being returned to them, minus interest. In terms of mental accounting, lottery winnings and refunds are invariably counted in the category of "free money" — which is why people spend such dough not on health care, utilities and eliminating credit card debt but on discretionary items such as vacations or new patios.

Arkes and his colleagues once cited an anecdote in a study: Employees of a publishing firm who were in the Bahamas for an annual meeting were each given a cash bonus for getting a big contract. Almost to a person, the bonus recipients took the money to a local casino and blew it. What is interesting is that most of these people did not lose more than the $50 — they slowed down or stopped when they felt they were playing with their "own" money rather than with the $50 of "free" money. The irony, of course, is that the $50 these people lost was their own money, too.

What does mental accounting have to do with the other puzzle we discussed at the start — the difficulty of finding cabs on rainy evenings? Mental accounting, like financial accounting, requires people to close the books and balance their accounts. But people in different professions unwittingly balance their books at different times — wage employees may balance books on a biweekly or monthly basis, whereas cab drivers often balance their mental books on a daily basis. Business is brisker on rainy evenings, so once cabbies meet their mental income targets for the day, they go home, leaving fewer cabs on the street, Thaler said.