Image copyright Thinkstock

It's puzzling but true that in any group of 23 people there is a 50% chance that two share a birthday. At the World Cup in Brazil there are 32 squads, each of 23 people... so do they demonstrate the truth of this mathematical axiom?

Imagine the scene at the Brazilian football team's hotel. Hulk and Paulinho are relaxing after another stylish win. Talk turns from tactics to post World Cup plans.

"It'll be one party after another," says Hulk, confidently assuming Brazilian victory on home soil. "First the World Cup, then my birthday a couple of weeks later."

"Your birthday's in July?" replies Paulinho. "Me too - 25 July, when's yours?

"No way, exactly the same day!" exclaims Hulk incredulously. "What are the chances of that?"

With 365 days in a regular year, most people's intuitive answer would probably be: "Pretty small."

But in this case our intuition is wrong - and the proof of that is known as the birthday paradox.

Image copyright Getty Images Image caption Hulk (left) and Paulinho (right)

"The birthday paradox is one of maths' greatest hits," says Alex Bellos, author of Alex Through the Looking Glass: How Life Reflects Numbers and Numbers Reflect Life.

"It's something you can say in one line which gives you this 'wow'!"

In its most famous formulation, the birthday paradox says that you only need a group of 23 people for there to be a greater than 50% chance that two of them share the same birthday.

(For lovers of detail, we should be clear that by birthday we mean day and month, not year.)

Bellos points out that the birthday paradox isn't a logical paradox - there's nothing self-contradictory about it, it's just unexpected.

Imagine a typical classroom.

More or Less: Behind the stats Listen to More or Less on BBC Radio 4 and the World Service, or download the free podcast Download the More or Less podcast More stories from More or Less

"People think it's an amazing coincidence that two people in a class of 30 share the same birthday," he says. "Actually, with 30 people it's a 70% chance."

Or consider your favourite social media site. If you've got 70 friends, you've got a 99.9% chance that at least two of them will share a birthday.

But perhaps the best data-set of all to test this on is the football World Cup. There are 32 teams, and each team has a squad of 23 players. If the birthday paradox is true, 50% of the squads should have shared birthdays.

Using the birthdays from Fifa's official squad lists as of Tuesday 10 June, it turns out there are indeed 16 teams with at least one shared birthday - 50% of the total. Five of those teams, in fact, have two pairs of birthdays.

The list is: Spain, Colombia, Switzerland (x2), USA, Iran (x2), France (x2), Argentina (x2), South Korea (x2), Cameroon, Australia, Bosnia Herzegovina, Russia, Netherlands, Brazil, Honduras and Nigeria.

One of Argentina's pairs, Fernando Gago and Augusto Fernandez, share the same actual birth date - 10 April 1986.

Image copyright Getty Images Image caption Gago (left) and Fernandez of Argentina were born on the same day in 1986

Some of the pairs will actually be celebrating their birthdays during the competition.

Next Friday (20 June) Asmir Begovic and Sead Kolasinac of Bosnia Herzegovina will share a birthday - though they may well have a quiet night, ahead of their match against Nigeria the next day. (June 20 is a busy day for World Cup birthdays - four other players including England's Frank Lampard will also be celebrating .)

Then on 8 July, the day of the first semi-final, South Koreans Kwak Tae-hwi and Son Heung-min will both be notching up another year.

Image copyright Getty Images Image caption Kwak Tae-hwi and Son Heung-min of South Korea will also celebrate their birthday during the World Cup

At the 2010 World Cup, Algeria's squad actually had three players whose birthday fell on the same day, 5 December. No squad achieves that this time round, but 2014 might have the rarest shared birthday of all.

Imagine this scenario: Germany come top pool of G, and Algeria come second in pool H. On 30 June the two teams would then face each other in the round of 16.

If it happens, watch out for a knowing glance from the bench or an extra warm handshake between Benedikt Howedes of Germany and Saphir Taider of Algeria - they share the pain of celebrating their real birthday just once every four years, because both were born on 29 February.

Image copyright Getty Images Image caption Benedikt Howedes of Germany (left) and Saphir Taider of Algeria were both born on 29 February

At this point the statistically inclined might be asking a few questions. Maybe the sample size is too small to demonstrate the point convincingly?

We can respond to that by adding in the squads from the 2010 World Cup, too. That yields another 15 shared birthdays, making 31 out of 64 squads over the two world cups - still pretty close to 50%.

These results give us pretty much what you'd expect if birthdays were randomly distributed, but there's a healthy argument in sporting circles about whether that's true in a group like this.

The explanation

Here's a simple explanation of maths behind the birthday paradox. More elegant and sophisticated versions can be found on the internet.

Imagine you walk into a room of 22 people, none of whom have a birthday in common. The chances you'll have a unique birthday feel pretty high - there are only 22 days taken by the others, and 343 days free, so you'd fancy your chances that no-one shares your birthday.

This may be one reason the birthday paradox feels counter-intuitive. We tend to view problems like this from our own individual perspective, and for any individual the chances of sharing a birthday are low.

But let's work out the probability that everyone in that group of 23 has a unique birthday.

For person 1, the chances are 100% because every date is clear. For person two, there's one day they would share with person 1, but the other 364 are clear, so their chance of a unique birthday is 364/365. For person 3 it's 363/365, and so on through to person 23, whose probability of having a unique birthday is 343/365.

To find the probability of everyone in the group having unique birthdays, we multiply all those 23 probabilities together, and if we do we end up with a probability of 0.491.

The probability that a birthday is shared is therefore 1 - 0.491, which comes to 0.509, or 50.9%.

But if that is the probability that any two people in a group will share a birthday, what about the probability that you will share a birthday with at least one other person in a group? For that to be greater than 50%, you'd need to have a group of 253 people. Perhaps your friends in social media might be the best place to look.

The theory is that in sports, there are advantages to having a birthday that's just after the cut-off date for school or team selection. When you're young, if your birthday is just after that date, you're going to be oldest and likely most physically developed of your year group.

This natural advantage makes is more likely you'll make it onto a sporting team, that you'll perform well and get more attention from the coach. This then feeds back into better performance, setting up an enduring advantage over peers with less fortunate birthdays.

It's a complicated and controversial idea. In 2006, Steven Levitt and Stephen Dubner of Freakonomics fame proposed that people born in the early months of the year would be overrepresented at the World Cup that year. They based this on the decision by Fifa in 1997 to make 1 January the age cut-off for international soccer competitions.

Levitt ended up backtracking after someone analysed World Cups prior to 2006 and found this wasn't the case. Levitt suggested that age cut-offs for domestic competitions might vary between countries, conflicting with the Fifa date and complicating the effect.

Image copyright Getty Images Image caption Bosnia Herzegovina's Asmir Begovic and Sead Kolasinac's birthday falls the day before their team faces Nigeria

For the 2014 World Cup players, the four months with the most birthdays are January (71), February (77), March (68) and May (72). These are all above the 61 birthdays a month you'd expect if they were evenly distributed.

And the months with the fewest birthdays all come in the second half of the year: August (57), October (46), November (49) and December (51).

The 2010 data show the same thing - above average early in the year, below average towards the end.

This is just a quick look at the figures and not a definitive analysis, but it at least suggests that the theory that World Cup players tend to be born in the first half of the year isn't dead and buried.

And next time you're in a classroom, at a party, or playing football or cricket (you'll need to include a referee or umpire to get to 23) conduct your own experiment - at least half the time you should find a shared birthday.

Subscribe to the BBC News Magazine's email newsletter to get articles sent to your inbox.