Imagine: The outcome of the final game of the World Cup has come down to you. Sixty-thousand fans chant your name as you place the ball on a white spot just 12 yards from the opposing goal. After 90 minutes of play and 30 minutes of overtime, the game will be decided by a shootout. Each team gets five shots on goal. Now, if you miss this one, your team loses.

But wait: You're Roberto Baggio, captain of the Italian soccer squad and arguably the best soccer player of the 1990s. You've made this shot thousands of times. Never mind that a billion people are watching you on TV. You step back, take a deep breath, and kick as hard as you can: Plaf! The ball sails up, up ... and completely over the crossbar. Brazil wins the 1994 World Cup.

The best-known soccer stars, from Maradona to Beckham, have all failed at one point in the shootout. Who could have known that it would be so decisive – or so unpredictable – when it was conceived by German referee Karl Wald in 1970? Three of this year's quarterfinal World Cup matches were determined by penalty kicks. And so the shootout, considered by many fans to be a flip of the coin or a test of character at best, is becoming a science.

Germany, which has never lost a shootout in the World Cup, eliminated Argentina last week. England, facing Portugal, missed three kicks and went home early – the fifth time England had lost an international soccer competition from the penalty spot.

Scientists at Liverpool John Moores University in England studied video footage of every penalty kick taken by the English squad since 1962 to calculate a formula for the perfect penalty shot. The factors in the formula include the position of the kicker's foot, the number of steps he takes running up to the ball, and the speed of the ball when struck.

"It says to the players: 'This is not a lottery.' If it goes into the back of the net, it's because you get this right," says David Lewis, the mathematician behind the formula for the "perfect" penalty kick.

The ideal number of steps to take before kicking the ball, according to Mr. Lewis, is between four and six. That makes it easier for the player to get the right velocity which, contrary to the "blast it and hope" advice of TV commentators, should be around 82 to 95 feet per second. Anything faster than 98 feet per second (67 miles per hour) will increase the chance of a miss, as the shot loses accuracy the faster it goes. He spoke by phone from his laboratory in England.

"You need to kick with the inside of the boot," says Lewis, noting that 75 percent of all shots scored are kicked this way. Kicking the ball with the laces reduces the probability of putting the ball in the net by 25 percent.

The ideal timing of the shot? Less than three seconds, to try to take the goalie off-guard, or after more than 13 seconds to make the goalie nervous, Lewis says.

Waiting for the keeper to start moving before you kick is key; but wait too long (more than 0.41 milliseconds after the goalie starts to move), and your chances of scoring are halved.

But the most important thing to remember is that "every game is played in a pitch between the player's ears," says Lewis, "and that's where you're going to win the game."

"It's a mental battle," agrees Richard Ginsburg, a sports psychologist for Massachusetts General Hospital and Harvard Medical School, as well as the author of "Whose Game Is It Anyway?" written for athletes who need to perform under stressful situations like a penalty shot.

"The advantage is on the kicker," Ginsburg says. "If it was in their backyard, they would score with their eyes closed," he says. "But the pressure is also on him. To me, it's about how much the goalie tries to distract the shooter."

Just before German goalkeeper Jens Lehmann faced Argentina in a shootout last week, he took a little piece of paper from his sock and appeared to consult it. Although no one knows for certain, European media reports said he had directions on the kicking styles of the Argentine players taken from a website run by the son of a former coach of a pro soccer team in Berlin. Lehman then blocked the two shots to give Germany its ticket to the semifinals.

"There's a lot of speculation, but at the end of the day [the note] could have been blank," says Andreas Herren, head of the International Football (Soccer) Federation (FIFA), on the telephone from Germany. "As a former goalkeeper, I can say it's always a mental game."

Mr. Ginsburg says that as a sports psychologist he tries to help players avoid the creeping sensation of defeat. "We try to break the last-minute shot into the present, not what happened last year." He asks players to follow preshot rituals. "I ask them: Do you take a certain number of breaths? Do you tie your shoelaces? It's like putting in golfing. Golfers have routines each time. It's just that in this case, you have to be able to react to the goalie."

Ginsburg compares England's shootout losses with the 86-year World Series drought endured by the Boston Red Sox. Each loss, he says, spurs a "self-fulfilling prophecy" both for the fans and the players.

But Mark Hooper, spokesman for the English Football Association (FA), says that England is not demoralized by the loss its national squad suffered. The trouble the team faces is training players to shoot a penalty in front of a crowd. "With our youth teams, we have certainly done more training," he says. "But it's impossible to replicate the environment because you are training in an [empty] field. And in a stadium you have thousands of fans watching you take the shot," he says in a phone interview.

Ginsburg suggests playing games once a week, where a large crowd will gather and try to distract the player as he takes the shot.

But some fans are not convinced that penalty shooting is something you can teach.

"Maybe you can teach half of it," says Sandor Hajnal, a retired semiprofessional soccer player from Hungary who has coached youth soccer in the US. "But the other half is all in the player and how he deals with pressure."

Hector Noriega, a Salvadoran soccer fan and manager of a Greek restaurant in Boston, says there's no telling what will make the difference. He recalls hearing the same words, again and again, at every pickup soccer game he played after the 1994 World Cup final: "Hey, if Baggio missed it, why not us?"