Smarties

Cerebral distractions of every kind, mostly but not exclusively Countdown-related.

Moderator: Michael Wallace

Post Reply
User avatar
Charlie Reams
Site Admin
Posts: 9494
Joined: Fri Jan 11, 2008 2:33 pm
Location: Cambridge
Contact:

Smarties

Post by Charlie Reams »

[Puzzle #1 in the new series "Puzzles inspired by a friends' Facebook status"]
I buy a tube of 32 Smarties. Given that Smarties come in 8 colours, what is the probability that I get an equal number of each colour?
User avatar
Jon O'Neill
Ginger Ninja
Posts: 4554
Joined: Tue Jan 22, 2008 12:45 am
Location: London, UK

Re: Smarties

Post by Jon O'Neill »

Easy. 1 in 4.
User avatar
Alec Rivers
Devotee
Posts: 918
Joined: Fri Nov 14, 2008 11:36 pm
Location: Studio 57, Cheriton (Kent)
Contact:

Re: Smarties

Post by Alec Rivers »

If all colours must be present, then I think it's 1:1,081,575.

If any number of colours can be present then, erm, there's a much higher probability. ;)
User avatar
Jon O'Neill
Ginger Ninja
Posts: 4554
Joined: Tue Jan 22, 2008 12:45 am
Location: London, UK

Re: Smarties

Post by Jon O'Neill »

Alec Rivers wrote:If all colours must be present, then I think it's 1:1,081,575.

If any number of colours can be present then, erm, there's a much higher probability. ;)
8/32=1/4
User avatar
Charlie Reams
Site Admin
Posts: 9494
Joined: Fri Jan 11, 2008 2:33 pm
Location: Cambridge
Contact:

Re: Smarties

Post by Charlie Reams »

Alec Rivers wrote:If all colours must be present, then I think it's 1:1,081,575.

If any number of colours can be present then, erm, there's a much higher probability. ;)
There have to be 8 colours present, or there isn't an equal number of each one...
Allan Harmer
Enthusiast
Posts: 391
Joined: Wed Sep 10, 2008 3:32 pm
Location: Petersfield (Hants)

Re: Smarties

Post by Allan Harmer »

My son Mike reckons that it is
1:10,518,300
User avatar
Alec Rivers
Devotee
Posts: 918
Joined: Fri Nov 14, 2008 11:36 pm
Location: Studio 57, Cheriton (Kent)
Contact:

Re: Smarties

Post by Alec Rivers »

Charlie Reams wrote:
Alec Rivers wrote:If all colours must be present, then I think it's 1:1,081,575.

If any number of colours can be present then, erm, there's a much higher probability. ;)
There have to be 8 colours present, or there isn't an equal number of each one...
I thought you were including:
  • 32 of one colour only
    16 of one, 16 of another
    etc.
Gavin Chipper
Post-apocalypse
Posts: 13381
Joined: Mon Jan 21, 2008 10:37 pm

Re: Smarties

Post by Gavin Chipper »

If this is rightish, it won't be exactly due to rounding errors, but 1 in 38174?

Edit - or 1 in 33143 (yeah, scrap the first one)
User avatar
Ian Volante
Postmaster General
Posts: 3974
Joined: Wed Sep 03, 2008 8:15 pm
Location: Edinburgh
Contact:

Re: Smarties

Post by Ian Volante »

You need to specify what population we're drawing from. If it's a large number of each colour, then we can neglect the probability change each time one is drawn. This entails that it is a probability of 1/8 to get any colour on any draw, so there are effectively (1/8)^32 combinations of 32 Smarties.

BUT, since colours are repeated, there are obviously many repeated combinations of Smarties, which is the point at which my probability skills become too rusty to be of help. Will someone please take on this baton?

EDIT: It seemed to me for a moment that the stipulation of having at least one of each colour in the selection made this calculation tougher, but I think it's actually irrelevant, because we'd be discarding those combinations anyway.
meles meles meles meles meles meles meles meles meles meles meles meles meles meles meles meles
User avatar
Charlie Reams
Site Admin
Posts: 9494
Joined: Fri Jan 11, 2008 2:33 pm
Location: Cambridge
Contact:

Re: Smarties

Post by Charlie Reams »

Ian Volante wrote:You need to specify what population we're drawing from.
Use a bit of context dude. I think it's safe to assume that the number of Smarties manufactured is fairly large compared to the number in one tube.

BTW I think I agree with Gevin.
Gavin Chipper
Post-apocalypse
Posts: 13381
Joined: Mon Jan 21, 2008 10:37 pm

Re: Smarties

Post by Gavin Chipper »

Charlie Reams wrote:BTW I think I agree with Gevin.
It's always a good starting point. :mrgreen:

What method did you use? I used the binomial thing. So I started with the probability of there being exactly four of one specific colour (say red). So I found an online calculator which worked out the probability of there being 4 out of 32 when the probability is 1/8 and made a note of it. Given that, there are 28 left with 1/7 chance of each colour. So I basically did the same again (4 out of 28 with probability of 1/7). Then I carried on until I got to 4 out of 8 with prob of 0.5. Then I multiplied all these numbers up to get the overall probability. The first number was wrong because I think I noted down one of the numbers wrong (got two digits the wrong way round).
User avatar
Charlie Reams
Site Admin
Posts: 9494
Joined: Fri Jan 11, 2008 2:33 pm
Location: Cambridge
Contact:

Re: Smarties

Post by Charlie Reams »

Gavin Chipper wrote:
Charlie Reams wrote:BTW I think I agree with Gevin.
It's always a good starting point. :mrgreen:

What method did you use? I used the binomial thing. So I started with the probability of there being exactly four of one specific colour (say red). So I found an online calculator which worked out the probability of there being 4 out of 32 when the probability is 1/8 and made a note of it. Given that, there are 28 left with 1/7 chance of each colour. So I basically did the same again (4 out of 28 with probability of 1/7). Then I carried on until I got to 4 out of 8 with prob of 0.5. Then I multiplied all these numbers up to get the overall probability. The first number was wrong because I think I noted down one of the numbers wrong (got two digits the wrong way round).
Same, but I did it symbolically :geek:
David O'Donnell
Series 58 Champion
Posts: 2010
Joined: Mon Jan 21, 2008 2:27 pm
Location: Cardiff

Re: Smarties

Post by David O'Donnell »

Is there a way of using combinations for this problem?

I get stuck at 15,380,937 total combinations of arranging 8 colours in a tube containing 32 smarties, I have absolutely no idea how to proceed or if I am even right with this total figure. I am using the formula:

(n+r-1)!/r!(n-1)! where n = the number of colours and r = the number of smarties in a tube.
User avatar
Ian Volante
Postmaster General
Posts: 3974
Joined: Wed Sep 03, 2008 8:15 pm
Location: Edinburgh
Contact:

Re: Smarties

Post by Ian Volante »

Gavin Chipper wrote:
Charlie Reams wrote:BTW I think I agree with Gevin.
It's always a good starting point. :mrgreen:

What method did you use? I used the binomial thing. So I started with the probability of there being exactly four of one specific colour (say red). So I found an online calculator which worked out the probability of there being 4 out of 32 when the probability is 1/8 and made a note of it. Given that, there are 28 left with 1/7 chance of each colour. So I basically did the same again (4 out of 28 with probability of 1/7). Then I carried on until I got to 4 out of 8 with prob of 0.5. Then I multiplied all these numbers up to get the overall probability. The first number was wrong because I think I noted down one of the numbers wrong (got two digits the wrong way round).
I don't think this method is valid because there's still an 1/8 chance of picking any colour even if you've got the four of any colour you're looking for already. Or am I misunderstanding the reasoning for the change in probability?
meles meles meles meles meles meles meles meles meles meles meles meles meles meles meles meles
Gavin Chipper
Post-apocalypse
Posts: 13381
Joined: Mon Jan 21, 2008 10:37 pm

Re: Smarties

Post by Gavin Chipper »

Ian Volante wrote:I don't think this method is valid because there's still an 1/8 chance of picking any colour even if you've got the four of any colour you're looking for already. Or am I misunderstanding the reasoning for the change in probability?
I was working on the basis that you've got exactly four of the first colour (say red). No more, no less. That is factored in with the first probability. Given that there are exactly four reds, the other 28 have a 1 in 7 chance of being each of the other colours. It's like going in to the tube, finding just four reds and taking them all out.
User avatar
Ian Volante
Postmaster General
Posts: 3974
Joined: Wed Sep 03, 2008 8:15 pm
Location: Edinburgh
Contact:

Re: Smarties

Post by Ian Volante »

Gavin Chipper wrote:
Ian Volante wrote:I don't think this method is valid because there's still an 1/8 chance of picking any colour even if you've got the four of any colour you're looking for already. Or am I misunderstanding the reasoning for the change in probability?
I was working on the basis that you've got exactly four of the first colour (say red). No more, no less. That is factored in with the first probability. Given that there are exactly four reds, the other 28 have a 1 in 7 chance of being each of the other colours. It's like going in to the tube, finding just four reds and taking them all out.
That sounds like you're drawing the population you want from a population that is already in the configuration you want it in!

This is why I specified initially that the Smarties are being drawn from a large population. What happens in your method to the probability of drawing a fifth red? It's only zero if there were only four reds in the source population initially, which is what you appear to be doing.
meles meles meles meles meles meles meles meles meles meles meles meles meles meles meles meles
User avatar
Jon O'Neill
Ginger Ninja
Posts: 4554
Joined: Tue Jan 22, 2008 12:45 am
Location: London, UK

Re: Smarties

Post by Jon O'Neill »

I still think it's 1 in 4.
User avatar
Jon Corby
Moral Hero
Posts: 8021
Joined: Mon Jan 21, 2008 8:36 am

Re: Smarties

Post by Jon Corby »

I make it 6,561 / 4,722,366,482,869,645,213,696.

EDIT: I NOW REALISE THIS IS POO, I GOT MY BIG NUMBERS CONFUSED AND USED 4!^8 INSTEAD OF 32!/(4!^8)!

(I don't know if that can be simplified further!)

I posit that there are 8 ^ 32 possible tubes, and calculated the number that contain exactly 4 of each (ie. the number of ways of having 4 of each) thus:

32! / (4! ^ 8) = (32! ways of arranging 32 objects, dividing through by the duplications caused by each group of 4 objects of the same colour)

My answer is somewhat different to Charlie's, which concerns me. If I cut it down to say a tube of 6 smarties, with 3 different colours, I get 3 ^ 6 possible tubes (729) and [6! / (2! ^ 3)] = 90 ways of having exactly 2 of each, which I know is correct by splurging them all out in Excel. So I'm wondering where I've gone catastrophically wrong in moving up to bigger numbers...

Edit: I've also just double-checked my formula with packets of 8 from 2 colours, and packets of 8 from 4 colours, with Excel (which is about the most I can do with my version as it only has 65536 rows!)
I'm relying on a big number calculator for the larger calculations which may be lying about 32! for all I know.
Last edited by Jon Corby on Mon Oct 19, 2009 2:31 pm, edited 1 time in total.
Bob De Caux
Enthusiast
Posts: 265
Joined: Wed Sep 09, 2009 3:18 pm

Re: Smarties

Post by Bob De Caux »

Ian Volante wrote:That sounds like you're drawing the population you want from a population that is already in the configuration you want it in!

This is why I specified initially that the Smarties are being drawn from a large population. What happens in your method to the probability of drawing a fifth red? It's only zero if there were only four reds in the source population initially, which is what you appear to be doing.
Ian, the reason it is zero is because Gavin is using conditional probability at each stage. Stage 1 is what is the prob of exactly 4 reds. Stage 2 is then what is the prob of four yellows given that there are exactly four reds, i.e. there cannot be any more reds in the remaining 28 smarties. Stage 3 is then what is the prob of 4 greens, given that there are exactly four reds and four yellows, etc. Multiplying them together gives you the answer.
User avatar
Ian Volante
Postmaster General
Posts: 3974
Joined: Wed Sep 03, 2008 8:15 pm
Location: Edinburgh
Contact:

Re: Smarties

Post by Ian Volante »

Bob De Caux wrote:
Ian Volante wrote:That sounds like you're drawing the population you want from a population that is already in the configuration you want it in!

This is why I specified initially that the Smarties are being drawn from a large population. What happens in your method to the probability of drawing a fifth red? It's only zero if there were only four reds in the source population initially, which is what you appear to be doing.
Ian, the reason it is zero is because Gavin is using conditional probability at each stage. Stage 1 is what is the prob of exactly 4 reds. Stage 2 is then what is the prob of four yellows given that there are exactly four reds, i.e. there cannot be any more reds in the remaining 28 smarties. Stage 3 is then what is the prob of 4 greens, given that there are exactly four reds and four yellows, etc. Multiplying them together gives you the answer.
Thanks Bob, that helps. I can't help but think that this method is flawed however, although I'm struggling to put my finger on a reason, although I think the assumption of the reduction in probability at each step is probably incorrect.

What Mr Corby has come up with is the logical conclusion of my thought process, and that's where I'm hanging my hat.
meles meles meles meles meles meles meles meles meles meles meles meles meles meles meles meles
Bob De Caux
Enthusiast
Posts: 265
Joined: Wed Sep 09, 2009 3:18 pm

Re: Smarties

Post by Bob De Caux »

Ian Volante wrote: Thanks Bob, that helps. I can't help but think that this method is flawed however, although I'm struggling to put my finger on a reason, although I think the assumption of the reduction in probability at each step is probably incorrect.

What Mr Corby has come up with is the logical conclusion of my thought process, and that's where I'm hanging my hat.
I agree, but only because I'm hanging my hat in the same place! Mr Corby has the correct methodology but surely the wrong calculation, as (32!/(4!^8))/(8^32) gives the same answer as Gavin!
User avatar
Jon Corby
Moral Hero
Posts: 8021
Joined: Mon Jan 21, 2008 8:36 am

Re: Smarties

Post by Jon Corby »

Bob De Caux wrote:
Ian Volante wrote: Thanks Bob, that helps. I can't help but think that this method is flawed however, although I'm struggling to put my finger on a reason, although I think the assumption of the reduction in probability at each step is probably incorrect.

What Mr Corby has come up with is the logical conclusion of my thought process, and that's where I'm hanging my hat.
I agree, but only because I'm hanging my hat in the same place! Mr Corby has the correct methodology but surely the wrong calculation, as (32!/(4!^8))/(8^32) gives the same answer as Gavin!
Haha, does it? I'm blaming the big number calculator I worked with then for getting it wrong. Nobody double check this.

Edit: Oh yeah, you're right! I missed out the 32!/ bit. It comes out as:

2,390,461,829,733,887,910,000,000
-------------------------------------------
79,228,162,514,264,337,593,543,950,336
Bob De Caux
Enthusiast
Posts: 265
Joined: Wed Sep 09, 2009 3:18 pm

Re: Smarties

Post by Bob De Caux »

Jon Corby wrote: Edit: Oh yeah, you're right! I missed out the 32!/ bit. It comes out as:

2,390,461,829,733,887,910,000,000
-------------------------------------------
79,228,162,514,264,337,593,543,950,336
That's more like it! FWIW, it's quite easy to show how the two methods are the same for the 3 colour, 6 smartie version:

Gavin method

C(6,2)*(1/3)^2*(2/3)^4 * C(4,2)*(1/2)^2*(1/2)^2
= 6! / (2!*4!)*(2^4)/(3^6) * 4! / (2!*2!)*1/(2^4)
= 6! / ((2!)^3) / (3^6)
= Corby Method

Same principle for 4 colours and 32 smarties, just messier
User avatar
Jon Corby
Moral Hero
Posts: 8021
Joined: Mon Jan 21, 2008 8:36 am

Re: Asterism

Post by Jon Corby »

Cheers Bob. I'm not even gonna try and work that through myself though, I've confused myself enough and have loads of bits of paper on my desk with large numbers written on them, and I really should do some work.
Post Reply