mscroggs.co.uk
mscroggs.co.uk

subscribe

Blog

Archive

Show me a random blog post
 2018 
 2017 
 2016 
 2015 
 2014 
 2013 
 2012 

Tags

folding paper folding tube maps london underground platonic solids london rhombicuboctahedron raspberry pi weather station programming python php inline code news royal baby probability game show probability christmas flexagons frobel coins reuleaux polygons countdown football world cup sport stickers tennis braiding craft wool emf camp people maths trigonometry logic propositional calculus twitter mathslogicbot oeis matt parker pac-man graph theory video games games chalkdust magazine menace machine learning javascript martin gardner noughts and crosses reddit national lottery rugby puzzles game of life dragon curves fractals pythagoras geometry triangles european cup dates palindromes chalkdust christmas card ternary bubble bobble asteroids final fantasy curvature binary arithmetic bodmas statistics error bars estimation accuracy misleading statistics pizza cutting captain scarlet gerry anderson light sound speed manchester science festival manchester dataset a gamut of games hexapawn nine men's morris draughts chess go radio 4 data

Archive

Show me a random blog post
▼ show ▼
 2018-06-16 

World Cup stickers 2018, pt. 2

This year, like every World Cup year, I've been collecting stickers to fill the official Panini World Cup sticker album. Back in March, I calculated that I should expect it to cost £268.99 to fill this year's album (if I order the last 50 stickers). As of 6pm yesterday, I need 47 stickers to complete the album (and have placed an order on the Panini website for these).

So... How much did it cost?

In total, I have bought 1781 stickers (including the 47 I ordered) at a cost of £275.93. The plot below shows the money spent against the number of stickers stuck in, compared with the what I predicted in March.
To create this plot, I've been keeping track of exactly which stickers were in each pack I bought. Using this data, we can look for a few more things. If you want to play with the data yourself, there's a link at the bottom to download it.

Swaps

The bar chart below shows the number of copies of each sticker I got (excluding the 47 that I ordered). Unsurprisingly, it looks a lot like random noise.
The sticker I got most copies of was sticker 545, showing Panana player Armando Cooper.
Armando Cooper on sticker 545
I got swaps of 513 different stickers, meaning I'm only 169 stickers short of filling a second album.

First pack of all swaps

Everyone who has every done a sticker book will remember the awful feeling you get when you first get a pack of all swaps. For me, the first time this happened was the 50th pack. The plot below shows when the first pack of all swaps occurred in 500,000 simulations.
Looks like I was really quite unlucky to get a pack of all swaps so soon.

Duplicates in a pack

In all the 345 packs that I bought, there wasn't a single pack that contained two copies of the same sticker. In fact, I don't remember ever getting two of the same sticker in a pack. For a while I've been wondering if this is because Panini ensure that packs don't contain duplicates, or if it's simply very unlikely that they do.
If it was down to unlikeliness, the probability of having no duplicates in one pack would be:
\begin{align} \mathbb{P}(\text{no duplicates in a pack}) &= 1 \times\frac{681}{682}\times\frac{680}{682}\times\frac{679}{682}\times\frac{678}{682}\\ &= 0.985 \end{align}
and the probability of none of my 345 containing a duplicate would be:
\begin{align} \mathbb{P}(\text{no duplicates in 345 packs}) &= 0.985^{345}\\ &= 0.00628 \end{align}
This is very very small, so it's safe to conclude that Panini do indeed ensure that packs do not contain duplicates.

The data

If you'd like to have a play with the data yourself, you can download it here. Let me know if you do anything with it...

Similar posts

World Cup stickers 2018
World Cup stickers
Euro 2016 stickers
A bad Puzzle for Today

Comments

Comments in green were written by me. Comments in blue were not written by me.
 Add a Comment 


I will only use your email address to reply to your comment (if a reply is needed).

Allowed HTML tags: <br> <a> <small> <b> <i> <s> <sup> <sub> <u> <spoiler> <ul> <ol> <li>
To prove you are not a spam bot, please type "i" then "g" then "n" then "o" then "r" then "e" in the box below (case sensitive):
 2018-05-02 

A bad Puzzle for Today

Every morning just before 7am, one of the Today Programme's presenters reads out a puzzle. Yesterday, it was this puzzle:
In a given month, the probability of a certain daily paper either running a story about inappropriate behaviour at a party conference or running one about somebody's pet being retrieved from a domestic appliance is exactly half the probability of the same paper containing a photo of a Tory MP jogging. The probability of no such photo appearing is the same as that of there being a story about inappropriate behaviour at a party conference. The probability of the paper running a story about somebody's pet being retrieved from a domestic appliance is a quarter that of its containing a photo of a Tory MP jogging. What are the probabilities the paper will (a) run the conference story, (b) run the pet story, (c) contain the jogging photo?
I'm not the only one to notice that some of Radio 4's daily puzzles are not great. I think this puzzle is a great example of a terrible puzzle. You can already see the first problem with it: it's long and words and very hard to follow on the radio. But maybe this isn't so important, as you can read it here after it's been read out.
Once you've done this, you can re-write the puzzle as follows: there are three news stories (\(A\), \(B\) and \(C\)) that the newspaper might publish in a month. We are given the following information:
$$\mathbb{P}(A\text{ or }B)=\tfrac12\mathbb{P}(C)$$ $$1-\mathbb{P}(C)=\mathbb{P}(A)$$ $$\mathbb{P}(B)=\tfrac14\mathbb{P}(C)$$
To solve this puzzle, we need use the formula \(\mathbb{P}(A\text{ or }B)=\mathbb{P}(A)+\mathbb{P}(B)-\mathbb{P}(A\text{ and }B)\). These Venn diagrams justify this formula:
Venn diagrams showing that \(\mathbb{P}(A\text{ or }B)=\mathbb{P}(A)+\mathbb{P}(B)-\mathbb{P}(A\text{ and }B)\).
Using the information we were given in the question, we get:
\begin{align} \tfrac12\mathbb{P}(C)&=\mathbb{P}(A\text{ or }B)\\ &=1-\mathbb{P}(C)+\tfrac14\mathbb{P}(C)-\mathbb{P}(A\text{ and }B)\\ \mathbb{P}(C)&=\tfrac45(1-\mathbb{P}(A\text{ and }B)). \end{align}
At this point we have reached the second problem with this puzzle: there's no answer unless we make some extra assumptions, and the question doesn't make it clear what we can assume. But let's give the puzzle the benefit of the doubt and try some assumptions.

Assumption 1: The events are mutually exclusive

If we assume that the events \(A\) and \(B\) are mutually exclusive—or, in other words, only one of these two articles can be published, perhaps due to a lack of space—then we can use the fact that
$$\mathbb{P}(A\text{ and }B)=0.$$
This means that \(\mathbb{P}(C)=\tfrac45\), \(\mathbb{P}(A)=\tfrac15\), and \(\mathbb{P}(B)=\tfrac15\). There's a problem with this answer, though: the three probabilities add up to more than 1.
This wouldn't be a problem, except we assumed that only one of the articles \(A\) and \(B\) could be published. The probabilities adding up to more than 1 means that either \(A\) and \(C\) are not mutually exclusive or \(A\) and \(B\) are not mutually exclusive, so \(C\) could be published alongside \(A\) or \(B\). There seems to be nothing special about the three news stories to mean that only some combinations could be published together, so at this point I figured that this assumption was wrong and moved on.
Today, however, the answer was posted, and this answer was given (without an working out). So we have a third problem with this puzzle: the answer that was given is wrong, or at the very best is based on questionable assumptions.

Assumption 2: The events are independent

If we assume that the events are independent—so one article being published doesn't affect whether or not another is published—then we may use the fact that
$$\mathbb{P}(A\text{ and }B)=\mathbb{P}(A)\mathbb{P}(B).$$
If we let \(c=\mathbb{P}(C)\), then we get:
\begin{align} \tfrac12c&=\mathbb{P}(A)+\mathbb{P}(B)-\mathbb{P}(A\text{ and }B)\\ &=\mathbb{P}(A)+\mathbb{P}(B)-\mathbb{P}(A)\mathbb{P}(B)\\ &=1-c+\tfrac14c-\tfrac14(1-c)c\\ \tfrac14c^2-\tfrac32c+1&=0. \end{align}
You can use your favourite formula to solve this to find that \(c=3-\sqrt5\), and therefore \(\mathbb{P}(A)=\sqrt5-2\) and \(\mathbb{P}(B)=\tfrac34-\tfrac{\sqrt5}4\).
In this case, our assumption appears to be more reasonable—as over the course of a month the stories published by a paper probably don't have much of an effect on each other—but we have the fourth, and probably biggest problem with the puzzle: the question and answer are not interesting or surprising, and the method is a bit tedious.

Similar posts

World Cup stickers 2018, pt. 2
A 20,000-to-1 baby?
World Cup stickers 2018
How much will I win on the new National Lottery?

Comments

Comments in green were written by me. Comments in blue were not written by me.
 2018-05-03 
It's possible that that was intended but it's not completely clear. If that was the intention, I stick to my point that it's odd that the other story can be published alongside these two.
Matthew
 2018-05-03 
Doesn’t the word ‘either’ in the opening phrase make A and B explicity exclusive?
Stefan
 Add a Comment 


I will only use your email address to reply to your comment (if a reply is needed).

Allowed HTML tags: <br> <a> <small> <b> <i> <s> <sup> <sub> <u> <spoiler> <ul> <ol> <li>
To prove you are not a spam bot, please type "jump" in the box below (case sensitive):
 2018-03-22 

World Cup stickers 2018

Back in 2014, I worked out the cost of filling an official Panini World Cup 2014 sticker book. Today, the 2018 sticker book was relased: compared to four years ago, there are more stickers to collect and the prices have all changed. So how much should we expect it to cost us to fill the album this time round?

How many stickers will I need?

There are 682 stickers to collect. Imagine you have already stuck \(n\) stickers into your album. The probability that the next sticker you buy is new is
$$\frac{682-n}{682}.$$
The probability that the second sticker you buy is the next new sticker is
$$\mathbb{P}(\text{next sticker is not new})\times\mathbb{P}(\text{sticker after next is new})$$ $$=\frac{n}{682}\times\frac{682-n}{682}.$$
Following the same method, we can see that the probability that the \(i\)th sticker you buy is the next new sticker is
$$\left(\frac{n}{682}\right)^{i-1}\times\frac{682-n}{682}.$$
Using this, we can calculate the expected number of stickers you will need to buy until you find a new one:
$$\sum_{i=1}^{\infty}i \left(\frac{682-n}{682}\right) \left(\frac{n}{682}\right)^{i-1} = \frac{682}{682-n}$$
Therefore, to get all 682 stickers, you should expect to buy
$$\sum_{n=0}^{681}\frac{682}{682-n} = 4844 \text{ stickers}.$$

How much will this cost?

You can buy the following [source]:
First of all you'll need to buy the starter pack, as you need an album to stick everything in. This comes with 31 stickers; we should expect to buy 4813 more stickers after this.
The cheapest way to buy these stickers is to buy them in multipacks for 15p per sticker. This gives a total expected cost of filling the sticker album of £725.94. (Although if your local newsagent doesn't stock the multipacks, buying 80p packs to get these stickers will cost you £774.07.)

What if I order the last 50 stickers?

If you'd like to spend a bit less on the sticker book, Panini lets you order the last 50 stickers to complete your album. This is very helpful as these last 50 stickers are the most expensive.
You can order missing stickers from the Panini website for 22p per sticker's sticker ordering service for the 2018 World Cup doesn't appear to be online yet; but based on other recent collections, it looks like ordered stickers will cost 16p each, with £1 postage per order.
Ordering the last 50 stickers reduces the expected number of other stickers you need to buy to
$$\sum_{n=0}^{631}\frac{682}{682-n} = 1775 \text{ stickers}.$$
This reduces the expected overall cost to £291.03. So I've just saved you £434.91.

What if I order more stickers?

Of course, if you're willing to completely give up on your morals, you could order more than one batch of 50 stickers from Panini. This raises the question: how many should you order to minimise the expected cost.
If you order the last \(a\) stickers, then you should expect to pay:
The total expected cost of filling your album for different values of \(a\) is shown in the graph below.
The red cross shows the point at which the album is cheapest: this is when the last 550 stickers are ordered, giving a total expected cost of £120.18. That's another £170.85 I've saved you. You're welcome.
Still, ordering nearly all stickers to minimise the cost doesn't sound like the most fun way to complete the sticker book, so you probably need to order a few less than this to maximise your fun.

What about swaps?

Of course, you can also get the cost of filling the book down by swapping your spare stickers with friends. In 2016, I had a go at simulating filling a sticker book with swapping and came to the possibly obvious conclusion that the more friends you have to swap with, the cheaper filling the book will become.
My best advice for you, therefore, is to get out there right now and start convinding your friends to join you in collecting stickers.

Similar posts

World Cup stickers 2018, pt. 2
World Cup stickers
Euro 2016 stickers
A bad Puzzle for Today

Comments

Comments in green were written by me. Comments in blue were not written by me.
 2018-03-24 
It would slightly reduce the expected cost I think, but I need to do some calculations to make sure.

I'm not certain whether they guarantee that there are no duplicates in a pack or just it's very unlikely... Follow up post looking into this coming soon
Matthew
 2018-03-23 
Helpful article!! My head always go into a spine with probability, but does the fact that you would not get a double within a pack affect the overall strategy or cost? My head says this is an another advantage of buying 30 packs over the 5.
RM
 Add a Comment 


I will only use your email address to reply to your comment (if a reply is needed).

Allowed HTML tags: <br> <a> <small> <b> <i> <s> <sup> <sub> <u> <spoiler> <ul> <ol> <li>
To prove you are not a spam bot, please type "upside" in the box below (case sensitive):
 2014-04-11 

Countdown probability, pt. 2

As well as letters games, the contestants on Countdown also take part in numbers games. Six numbers are chosen from the large numbers (25,50,75,100) and small numbers (1-10, two cards for each number) and a total between 101 and 999 (inclusive) is chosen by CECIL. The contestants then use the six numbers, with multiplication, addition, subtraction and division, to get as close to the target number as possible.
The best way to win the numbers game is to get the target exactly. This got me wondering: is there a combination of numbers which allows you to get every total between 101 and 999? And which combination of large and small numbers should be picked to give the highest chance of being able to get the target?
To work this out, I got my computer to go through every possible combination of numbers, trying every combination of operations. (I had to leave this running overnight as there are a lot of combinations!)

Getting every total

There are 61 combinations of numbers which allow every total to be obtained. These include the following (click to see how each total can be made):
By contrast, the following combination allows no totals between 101 and 999 to be reached:
The number of attainable targets for each set of numbers can be found here.

Probability of being able to reach the target

Some combinations of numbers are more likely than others. For example, 1 2 25 50 75 100 is four times as likely as 1 1 25 50 75 100, as (ignoring re-orderings) in the first combination, there are two choices for the 1 tile and 2 tile, but in the second combination there is only one choice for each 1 tile. Different ordering of tiles can be ignored as each combination with the same number of large tiles will have the same number of orderings.
By taking into account the relative probability of each combination, the following probabilities can be found:
Number of large numbersProbability of being able to reach target
00.964463439
10.983830962
20.993277819
30.985770510
40.859709475
So, in order to maximise the probability of being able to reach the target, two large numbers should be chosen.
However, as this will mean that your opponent will also be able to reach the target, a better strategy might be to pick no large numbers or four large numbers and get closer to the target than your opponent, especially if you have practised pulling off answers like this.
Edit: Numbers corrected.
Edit: The code used to calculate the numbers in this post can now be found here.

Similar posts

Countdown probability
Pointless probability
World Cup stickers 2018, pt. 2
A bad Puzzle for Today

Comments

Comments in green were written by me. Comments in blue were not written by me.
 2016-07-20 
I've pushed a version of the code to https://github.com/mscroggs/countdown-numbers-game
Matthew
 2016-07-20 
Sadly, I lost the code I used when I had laptop problems. However, I can remember what it did, so I shall recreate it and put it on GitHub.
Matthew
 2016-07-20 
If you could, I'd love to have the code you used to do this exhaustive search?

I'm a fan of the game myself (but then I'm French, so to me it's the original, "Des chiffres et des lettres"), but for the numbers game, this is pretty much irrelevant to the language and country :)
Francis Galiegue
 Add a Comment 


I will only use your email address to reply to your comment (if a reply is needed).

Allowed HTML tags: <br> <a> <small> <b> <i> <s> <sup> <sub> <u> <spoiler> <ul> <ol> <li>
To prove you are not a spam bot, please type "teiuq" backwards in the box below (case sensitive):
 2014-04-06 

Countdown probability

On Countdown, contestants have to make words from nine letters. The contestants take turns to choose how many vowels and consonants they would like. This got me wondering which was the best combination to pick in order to get a nine letter word.
Assuming the letters in countdown are still distributed like this, the probability of getting combinations of letters can be calculated. As the probability throughout the game is dependent on which letters have been picked, I have worked out the probability of getting a nine letter word on the first letters game.

The probability of YODELLING

YODELLING has three vowels and six consonants. There are 6 (3!) ways in which the vowels could be ordered and 720 (6!) ways in which the consonants can be ordered, although each is repeated at there are two Ls, so there are 360 distinct ways to order the consonants. The probability of each of these is:
$$\frac{21\times 13\times 13\times 6\times 3\times 5\times 4\times 8\times 1}{67\times 66\times 65\times 74\times 73\times 72\times 71\times 70\times 69}$$
So the probability of getting YODELLING is:
$$\frac{6\times 360\times 21\times 13\times 13\times 6\times 3\times 5\times 4\times 8\times 1}{67\times 66\times 65\times 74\times 73\times 72\times 71\times 70\times 69} = 0.000000575874154$$

The probability of any nine letter word

I got my computer to find the probability of every nine letter word and found the following probabilities:
ConsonantsVowelsProbability of nine letter word
090
180
270
360.000546
450.019724
540.076895
630.051417
720.005662
810.000033
900
So the best way to get a nine letter word in the first letters game is to pick five consonants and four vowels.

Similar posts

Countdown probability, pt. 2
Pointless probability
World Cup stickers 2018, pt. 2
A bad Puzzle for Today

Comments

Comments in green were written by me. Comments in blue were not written by me.
 Add a Comment 


I will only use your email address to reply to your comment (if a reply is needed).

Allowed HTML tags: <br> <a> <small> <b> <i> <s> <sup> <sub> <u> <spoiler> <ul> <ol> <li>
To prove you are not a spam bot, please type "turn" in the box below (case sensitive):
© Matthew Scroggs 2018