If you’ve come here during a penalty shootout, scroll down for some cool charts. The next several paragraphs explain our methodology in some detail.

FiveThirtyEight has some credibility staked on the performance of the Brazilian national team. It was our pretournament favorite to win the World Cup. (Many other forecasts had Brazil favored, but not as heavily as we did.) So, like the 23 Brazilians on the pitch and the 200 million watching at home, we were sweating the outcome when Brazil went to a penalty shootout with Chile on Saturday.

We were curious about the Brazilians’ chances of winning at various points in the shootout. How safe were they after Brazil’s David Luiz made his first penalty and Chile’s Mauricio Pinilla missed his? How close did things get after the shootout was tied at 2-2, and how bad would it have been if Neymar had then missed for Brazil?

What follows is a series of charts to provide some reasonable estimates of these probabilities. We’ll start with the case in which both teams are assumed to be equally likely to convert penalty kicks, and then explore alternatives where one team (perhaps like Brazil against Chile) might be thought to have a marginal edge.

There’s a cottage industry around predicting the outcome of penalty kicks. Some theories are worth exploring. There’s some evidence, for example, that whichever team shoots first has a slight advantage. Others are probably more dubious and may rely on overinterpreting evidence from small sample sizes (see Phil Birnbaum’s cautionary note for more on this).

Our goal is not to litigate those theories. Instead, we make some simple assumptions: that the outcome of one penalty kick is independent from the next one, and that a team’s chances of making a penalty is consistent with long-run averages.

In the history of the World Cup, teams have made 71.5 percent of their penalty-shootout kicks. But the sample size is not huge, and the percentage has been slightly higher — closer to 75 percent — in other major international tournaments like the European Championships. So we fudge just a pinch upward and assume that the long-run rate of made penalties in the World Cup is 72.5 percent.

It’s important to clarify that this percentage pertains to penalty kicks attempted during shootouts. The success rate is higher — in the range of 75 to 80 percent — for penalties attempted after a foul is called in the box in regulation play. But those cases are a little different. A team will usually designate its best penalty taker to make the one attempt instead of having to rotate through at least five players as in a shootout. (If Neymar or Lionel Messi got to make every attempt, the success rate in shootouts would rise.) Furthermore, the rebound is live in penalties attempted during regulation play; rebounds are not live during a shootout. (Even if goals scored on the rebound are not counted as penalty-kick conversions, the possibility of a rebound may affect the strategy of the kick taker and the goalkeeper.) Finally, players may be under more pressure during a shootout, and they’ll have the opportunity to alter their behavior after observing their teammates’ kicks.

So to repeat: Our initial assumption is simply that each penalty kick has a 72.5 percent chance of being made. From there, calculating the probability of a team winning the shootout is fairly straightforward given any condition of the game (for instance, a team being ahead 2-1 after each team has attempted three penalties). The technique we’re applying is technically known as a Markov chain, but that makes it sound more elaborate than it is.

Time for the first chart. This assumes two-evenly matched teams, which we’ll call Team A and Team B. Team A shoots first.

You can follow the action by moving down one row after every penalty-kick attempt. Whenever Team A makes a penalty, move down and to the left. Whenever Team B does, move down and to the right. When there’s a miss, move straight down (don’t alter your horizontal direction). A cell tinged in blue means that Team A is favored to win the shootout, and one tinged in red means that Team B is favored instead.

As an example, we’ll take the shootout in the 1994 World Cup final between Italy (the Azzurri shot first, so they are Team A, in blue) and Brazil (Team B, in red). The teams were about evenly matched, so we’ll assume that the probability was 50-50 going in. Here’s what happened next:

Italy’s first kick. An errant attempt by Franco Baresi, which sails over the crossbar. Move due south on the chart. Brazil — Team B, in red — is now a 70 percent favorite.

An errant attempt by Franco Baresi, which sails over the crossbar. Move due south on the chart. Brazil — Team B, in red — is now a 70 percent favorite. Brazil’s first kick. But Brazil’s Márcio Santos misses, too! Terrific anticipation by Italian goalkeeper Gianluca Pagliuca. Move straight down again: we’re back to 50-50.

But Brazil’s Márcio Santos misses, too! Terrific anticipation by Italian goalkeeper Gianluca Pagliuca. Move straight down again: we’re back to 50-50. Italy’s second kick. Italy’s Demetrio Albertini makes his penalty. Move down and to the left. Italy, up 1-0, is a 58 percent favorite.

Italy’s Demetrio Albertini makes his penalty. Move down and to the left. Italy, up 1-0, is a 58 percent favorite. Brazil’s second kick . Romário notches a kick off the left crossbar. Move down and right. We’re tied 1-1, and the probabilities are at 50-50 again.

. Romário notches a kick off the left crossbar. Move down and right. We’re tied 1-1, and the probabilities are at 50-50 again. Italy’s third kick. Brazil goalkeeper Claudio Taffarel guesses the right direction — but is much too late to stop Italy’s Alberigo Evani. Move down and to the left. Italy is ahead 2-1 and has a 59 percent chance of winning.

Brazil goalkeeper Claudio Taffarel guesses the right direction — but is much too late to stop Italy’s Alberigo Evani. Move down and to the left. Italy is ahead 2-1 and has a 59 percent chance of winning. Brazil’s third kick. Brazil’s Branco equalizes. Down and to the right. Back to 50-50.

Brazil’s Branco equalizes. Down and to the right. Back to 50-50. Italy’s fourth kick . This was the pivotal penalty — it affected the odds more than any other kick (including Roberto Baggio’s infamous miss later on). Taffarel anticipates Daniele Massaro’s kick and makes one of the easier-looking saves you’ll see in a shootout. Move straight down. Although the score is tied 2-2, Brazil has an attempt in hand and is a 79 percent favorite to win.

. This was the pivotal penalty — it affected the odds more than any other kick (including Roberto Baggio’s infamous miss later on). Taffarel anticipates Daniele Massaro’s kick and makes one of the easier-looking saves you’ll see in a shootout. Move straight down. Although the score is tied 2-2, Brazil has an attempt in hand and is a 79 percent favorite to win. Brazil’s fourth kick. Dunga’s penalty is low and to the middle — and by Baresi. Brazil up 3-2. Look down and right on the chart: The team’s now 90 percent to win the shootout.

Dunga’s penalty is low and to the middle — and by Baresi. Brazil up 3-2. Look down and right on the chart: The team’s now 90 percent to win the shootout. Italy’s fifth kick. Italian star Baggio gets far too much on his attempt and it goes well over the crossbar. The Brazilian reserves rush the pitch to celebrate their World Cup championship. Presumably, you’re either celebrating too or throwing things at the television screen — either way, hope you saved that bottle of grappa. But, if you insist, move straight down the chart. You’ll encounter a solid block B — in this case, representing Brazil. This is an end condition: The penalty shootout is over, and Brazil has won.

Here’s the chart with the Italy-Brazil results filled in:

Sometimes the shootout can persist for more than five kicks per team. For example, one shootout in the 2006 Africa Cup of Nations featured 23 consecutive made penalties before Cameroon’s Samuel Eto’o finally missed to hand Ivory Coast advancement. When this occurs, follow the loop in the chart. The situation when teams are tied after five kicks is mathematically identical to the one when they’re tied after six kicks, 12 kicks, 20 kicks or any other number.

On other occasions, there may be reason to think that one team starts the shootout with an advantage. Maybe it has a better goalkeeper, or its opponent is England, or you buy the theory that the team that shoots first has an edge. There’s also some evidence that the better team based on overall measures of team quality (such as Elo ratings or the Soccer Power Index) may have some minor advantage in the shootout. Shootouts are mostly random but not entirely so.

Take the case in which Team A shoots first and is the better penalty-shooting team, converting 75 percent of its penalty kicks — while Team B makes 70 percent. Team A will win the shootout about 58 percent of the time. This resembles the shootout between Brazil and Chile on Saturday: Live betting odds, before the first penalty was attempted, put Brazil’s chance of winning in the range of 55 to 60 percent. Here is the chart for that occasion:

We won’t give you a complete walkthrough, but Brazil’s odds rose to 83 percent after Luiz’s make and Pinilla’s miss — and then further, to 91 percent, after Marcelo put Brazil ahead 2-0. But consecutive makes by Chile and a miss by Hulk brought Brazil’s odds down to 56 percent. Neymar made Brazil’s fifth penalty, and the team’s odds recovered to 69 percent — and Brazil won when Chile’s Gonzalo Jara hit the post. Had Neymar missed instead, Chile would have been the 83 percent favorite.

Finally, here’s the case where the side that shoots second — Team B — has a slight edge and makes 75 percent of its penalties to Team A’s 70 percent.

Note that Team B’s advantage amounts to the equivalent of about half a kick. If Team A makes its first penalty, and Team B still has an attempt in hand, the odds go to about 50-50. But if Team A misses, Team B’s odds rise to 77 percent despite not having yet made an attempt.