Frank Cook swears it's a true story.

A young couple is so rattled by the prospect of going house-hunting the next day that they begin drinking wine to calm themselves, said Cook, a journalist who has covered real estate for many years. They worry about buying the wrong house, and so they drink. They worry about whether they can even afford a house, and they drink some more. They worry about whether they're taking on too long a commute, and . . . well, the pattern continues into the night.

Next morning, when their real estate agent picks them up, they're so hung over that they want to end the ordeal as quickly as possible. So they buy the first house the agent shows them.

Might one infer a moral here? Could it be, never let your emotions get the better of you in a real estate deal?

Hardly. "For years, the couple agreed it was one of the best decisions they ever made," said Cook. He maintains that cut-and-dried advice about studying the numbers and sticking to financial logic is well-intentioned and useful, but overlooks the quirky power of emotion in real estate.

"Home buying is a lot more about you than it is about the house," he advises in his book, "You're Not Buying That House Are You?" "Home buying is more about your personality and who you believe you are than it is about mortgages, appraisals, closing costs and commission fees.

"I believe that in the core of my soul," Cook said. "People say 'money, money, money,' but in my opinion, the house is an ego purchase."

Conventional wisdom holds that emotion is an ever-present wild card in home buying. A seller, for instance, is thoroughly insulted by a "low-ball" offer and ends negotiations. A buyer says he has "fallen in love" with a house and has to have it, regardless of price. A seller indignantly announces to her agent that she would never sell her house to anyone who intends to tear it down and rebuild, because her children grew up there.

Katherine Lebaric takes a different view. "You run into emotions, of course," she said, but she puts her faith in statistics to carry the day. Lebaric, of Monterey, Calif., has developed software for agents and buyers that she said "strips away the emotion" of real estate negotiation. From the seller's standpoint, her new product calculates how long a property will stay on the market at a given price, or the likelihood of getting a better offer within a given time. From a buyer's point of view, her program specifically calculates what amount should constitute a fair offer.

Lebaric is not a real estate agent. She plans this year to begin graduate studies in computational finance at Carnegie Mellon University in Pittsburgh. Now she is concentrating on marketing her software, RealNegotiate, which she began to develop when her parents were considering making an offer on a house a few years ago.

"We only wanted to buy if we could get a fairly good deal," she said. "We wondered what was the probability of how quickly it would be purchased at the price the sellers wanted. But there just wasn't an objective way."

Real estate agents suggested likely scenarios to them, based on comparable sales, commonly called comps. Comps are derived from sales records for similar properties; agents throughout the industry routinely use them to advise their clients on pricing strategies. But because of the Lebarics' analytical inclinations -- her father is an engineer and her mother is a biologist -- they wanted something firmer. They wanted statistical probabilities.

RealNegotiate spins such probabilities from market data -- from the client's professionally generated comps or from those that her company will research for a fee. She said the utility of her program is obvious for consumers who are buying or selling without an agent, but she also has sold it to agents who consider it a negotiating tool.

"For instance, a buyer can go to the seller and say, 'You're holding to this price, but the likelihood [of getting it right now because of the time it has been on the market] is only 40 percent. Forget your list price; you're likely to wait another 60 days.'

"You can say to the seller, 'This is my situation, my offer is a reasonable offer,' " Lebaric said. "It's a way to show them that it's not you that's low-balling an offer. You're not, in a sense, cutting down their house."

She said some studies of behavior in negotiation have shown that using software-generated negotiating positions will significantly increase the likelihood of reaching an agreement that's more favorable to the presenter. And as far as the ability of emotion to derail even the most mundane transactions, Lebaric said emotion is factored in when comps come from a sizable, reliable database.

"In a sense, she could be right," said Cook, who is reminded of writer Isaac Asimov's concept of "psychohistory," a hybrid of history, psychology and statistics that's used to predict the behavior of large populations in his "Foundations" trilogy.

"It presumes that if you look out over what exists in mankind, every generation will produce a certain number of presidents, a certain number of serial killers, a certain number of home buyers at a certain level. I'm probably doing a huge disservice to Asimov in my comparison, but in [his concept], every generation will fill in all the blanks of society, all the slots will be filled."

Real estate agents respond in less literary terms. "I already am the software," said Koenig & Strey agent Colette Cachey of Chicago. "I go look at the whole neighborhood. I look at what sold fast, what didn't. I look at the expectations of my seller, what their carrying costs are, and what they have in the bank, in terms of whether they're comfortable having a house on the market for three months.

"I talk to my sellers and show them all the facts. Ultimately, I think my odds of success are as good as [RealNegotiate's]," Cachey said.

Within each deal, there are subterranean dynamics that defy formulization, Cachey said. Take, for example, her approach to getting sellers to spruce up certain features in order for the house to sell when there's a likelihood that they'll be offended by the suggestion.

"Somebody told me once that a house is a child -- their child. It's like in parent-teacher conferences, where the teachers have been instructed to first say nice things about the student, and then the one bad thing. In a home, you remind them that the countertops are beautiful and the location is great, but the carpet is awful.

"It's business, but it's personal," she said. "People become so connected with their real estate, and [the process] can get so feisty. I've seen it spin out of control. But my job as an agent is to manage that, calm both sides or at least one side, to keep everything in perspective."

John Veneris of Downers Grove Realty Executives in Illinois said "emotion comes first," no matter how meticulously the comps may have been researched.

"That software hasn't been inside the house," Veneris said. "I know I can speak with authority on that. You can make mathematical assumptions based on prices and square feet, but not necessarily conditions and decorating. That's where emotions do get involved."

As a side effect of her role as a widely known researcher of negotiation behavior and strategies, Margaret A. Neale, a professor at the Stanford University Graduate School of Business, said she occasionally gets what she calls "the Sunday night phone call," usually from friends of friends who are frantically seeking advice on how to negotiate their real estate deals.

"What I often hear is, 'I've fallen in love with the house,' " and the buyer can't bring himself to think of losing it in a deal. But he or she also is terrified of overpaying, she said.

In those cases, her advice usually is: You might as well pay the price and get it over with.

"You shouldn't fall in love with anything that you're going to negotiate over," Neale said. "If the buyer falls in love and says, 'I have to have the place,' well, when that is done, it dramatically constrains the negotiations. If I'm the seller and I find out you're in love, it's all over.

"What you need is an option," she said. "If you're going to fall in love, then I say you'd better fall in love with two or three houses."