Trying to buy a ticket to a sold-out game? To get the cheapest price you have a decision to make: when to buy. During a visit to a sold-out basketball game at Duke University, "Science Nation" put the question to some die-hard Duke Blue Devil fans just prior to tip-off. With tickets in hand, many were adamant that the closer to game time, the more costly the ticket.

"Right now, my ticket is real valuable. We spent six hours driving here," exclaims one fan. "People who don't have will bring extra money to make sure they get in the ," insists another fan. "People who really want to get in are going to spend more. I'm here . . . whatever it costs," cries out another one.

It turns out those opinions are almost always wrong! According to Duke University economist Andrew Sweeting, those tickets likely cost more three months before the game. Just before game day is actually a good time to buy. With support from the National Science Foundation (NSF), Sweeting and his team of graduate students are researching the science and complexities of perishable goods markets, meaning markets for products with expiration dates. The researchers are using ticket pricing as a case study.

"The overall aim of my research is to understand how sellers behave and how markets of these kinds of goods should be designed. Once you look at how prices behave, that has a lot of implications for how consumers think about timing their decisions in these markets," explains Sweeting.

His research has important and direct implications for brokers' pricing decisions and the regulation of certain types of markets, but a side benefit for consumers is the information about when to get the best deals.

Sweeting studies websites such as StubHub.com that specialize in buying and selling tickets on the secondary market, including tickets to major league baseball games. He finds a consistent and strong trend of declining prices as a game approaches. "Even for the highest demand games such as Red Sox-versus-Yankees games, prices tend to decline," notes Sweeting. "Even popular games have a lot of availability of those tickets close to the game."

Sports tickets are a very different beast than airline tickets where the closer you are to take-off, the more likely prices will soar. According to Sweeting, airlines know that people who decide that they want to travel at the last minute, such as business people, tend to have pretty inflexible schedules and are willing to pay very high prices. Leisure travelers are less willing to pay high prices, but are also more likely to know that they want to travel well in advance. Airlines will therefore try to encourage leisure travelers to buy early by giving advance purchase discounts, so that they can set high last minute prices to extract as much revenue as possible from business travelers.

"It just doesn't pay for airlines to unload unsold tickets by lowering at the last minute," says Sweeting. "For sports events, there is no reason to believe that people who decide they want to go to a game at the last minute will be willing to pay more than dedicated fans who may plan to go to a game months in advance."

So Sweeting says the bottom line as far as tickets go is to buy at least two weeks early if you're looking to save on airfares, but for most performances and athletic events, buy early only if you're looking for certain seats or a certain number of seats together. That applies to everything from the contentious Red Sox-Yankees match-ups to the mighty Blue Devils of Duke.