Smarties
Moderator: Michael Wallace
- Charlie Reams
- Site Admin
- Posts: 9494
- Joined: Fri Jan 11, 2008 2:33 pm
- Location: Cambridge
- Contact:
Smarties
[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?
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?
- Jon O'Neill
- Ginger Ninja
- Posts: 4554
- Joined: Tue Jan 22, 2008 12:45 am
- Location: London, UK
Re: Smarties
Easy. 1 in 4.
- Alec Rivers
- Devotee
- Posts: 918
- Joined: Fri Nov 14, 2008 11:36 pm
- Location: Studio 57, Cheriton (Kent)
- Contact:
Re: Smarties
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.
If any number of colours can be present then, erm, there's a much higher probability.
- Jon O'Neill
- Ginger Ninja
- Posts: 4554
- Joined: Tue Jan 22, 2008 12:45 am
- Location: London, UK
Re: Smarties
8/32=1/4Alec 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.
- Charlie Reams
- Site Admin
- Posts: 9494
- Joined: Fri Jan 11, 2008 2:33 pm
- Location: Cambridge
- Contact:
Re: Smarties
There have to be 8 colours present, or there isn't an equal number of each one...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.
-
- Enthusiast
- Posts: 391
- Joined: Wed Sep 10, 2008 3:32 pm
- Location: Petersfield (Hants)
Re: Smarties
My son Mike reckons that it is
1:10,518,300
1:10,518,300
- Alec Rivers
- Devotee
- Posts: 918
- Joined: Fri Nov 14, 2008 11:36 pm
- Location: Studio 57, Cheriton (Kent)
- Contact:
Re: Smarties
I thought you were including:Charlie Reams wrote:There have to be 8 colours present, or there isn't an equal number of each one...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.
- 32 of one colour only
16 of one, 16 of another
etc.
-
- Post-apocalypse
- Posts: 13381
- Joined: Mon Jan 21, 2008 10:37 pm
Re: Smarties
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)
Edit - or 1 in 33143 (yeah, scrap the first one)
- Ian Volante
- Postmaster General
- Posts: 3974
- Joined: Wed Sep 03, 2008 8:15 pm
- Location: Edinburgh
- Contact:
Re: Smarties
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.
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
- Charlie Reams
- Site Admin
- Posts: 9494
- Joined: Fri Jan 11, 2008 2:33 pm
- Location: Cambridge
- Contact:
Re: Smarties
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.Ian Volante wrote:You need to specify what population we're drawing from.
BTW I think I agree with Gevin.
-
- Post-apocalypse
- Posts: 13381
- Joined: Mon Jan 21, 2008 10:37 pm
Re: Smarties
It's always a good starting point.Charlie Reams wrote:BTW I think I agree with Gevin.
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).
- Charlie Reams
- Site Admin
- Posts: 9494
- Joined: Fri Jan 11, 2008 2:33 pm
- Location: Cambridge
- Contact:
Re: Smarties
Same, but I did it symbolicallyGavin Chipper wrote:It's always a good starting point.Charlie Reams wrote:BTW I think I agree with Gevin.
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).
-
- Series 58 Champion
- Posts: 2010
- Joined: Mon Jan 21, 2008 2:27 pm
- Location: Cardiff
Re: Smarties
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.
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.
- Ian Volante
- Postmaster General
- Posts: 3974
- Joined: Wed Sep 03, 2008 8:15 pm
- Location: Edinburgh
- Contact:
Re: Smarties
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?Gavin Chipper wrote:It's always a good starting point.Charlie Reams wrote:BTW I think I agree with Gevin.
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).
meles meles meles meles meles meles meles meles meles meles meles meles meles meles meles meles
-
- Post-apocalypse
- Posts: 13381
- Joined: Mon Jan 21, 2008 10:37 pm
Re: Smarties
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.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?
- Ian Volante
- Postmaster General
- Posts: 3974
- Joined: Wed Sep 03, 2008 8:15 pm
- Location: Edinburgh
- Contact:
Re: Smarties
That sounds like you're drawing the population you want from a population that is already in the configuration you want it in!Gavin Chipper wrote: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.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?
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
- Jon O'Neill
- Ginger Ninja
- Posts: 4554
- Joined: Tue Jan 22, 2008 12:45 am
- Location: London, UK
Re: Smarties
I still think it's 1 in 4.
Re: Smarties
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.
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.
-
- Enthusiast
- Posts: 265
- Joined: Wed Sep 09, 2009 3:18 pm
Re: Smarties
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.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 Volante
- Postmaster General
- Posts: 3974
- Joined: Wed Sep 03, 2008 8:15 pm
- Location: Edinburgh
- Contact:
Re: Smarties
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.Bob De Caux wrote: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.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.
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
-
- Enthusiast
- Posts: 265
- Joined: Wed Sep 09, 2009 3:18 pm
Re: Smarties
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!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.
Re: Smarties
Haha, does it? I'm blaming the big number calculator I worked with then for getting it wrong. Nobody double check this.Bob De Caux wrote: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!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.
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
-
- Enthusiast
- Posts: 265
- Joined: Wed Sep 09, 2009 3:18 pm
Re: Smarties
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: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
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
Re: Asterism
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.