August 12, 2024

Who Did Best At The Olympics?

Every four years (give or take a pandemic postponement) debate breaks out about the best way to measure who did best at the olympics. I’m going to look at a couple here. Medals What’s a better measure of success? Gold medals? Total medals? If we look at medal totals, the top ten looks like this: Gold Silver Bronze Medal Totals United States 40 44 42 126 China 40 27 24 91 Great Britain 14 22 29 65 France 16 26 22 64 Australia 18 19 16 53 Japan 20 12 13 45 Italy 12 13 15 40 Netherlands 15 7 12 34 Germany 12 13 8 33 South Korea 13 9 10 32 Whereas if we focus on gold medals only1 a very slightly different picture emerges: Read more

September 18, 2022

Riffle Shuffle Efficiency

Let’s say you have a list, and you want to “interleave” or “riffle shuffle” the items in it. That is, you want to split the list in two, and then make a new list, alternating items from the first and second halves. In Python, there are a number of ways of doing this. Now we are left with the problem of which of these ways should we actually implement? One key factor in making this decision is performance: how well do the various methods actually perform. I decided to run a little experiment. Read more

April 18, 2022

How Predictable Is Football?

A question that has been rattling around my brain for a while now is this: how useful is “form” in predicting the outcome of football matches? That is, how useful is it to know that a team’s record in their last 5 matches is WWLDD, for example? So I thought I’d explore this as a way to learn a bit more about Python’s statistics and data science libraries. The code used to do this analysis and generate these graphs is available on github. Read more

© Seamus Bradley 2021–6

Powered by Hugo & Kiss.