Hacker News new | past | comments | ask | show | jobs | submit login

I wonder how much effort the Skittles factory puts in to ensuring each bag has a selection of all the colors. They certainly have some large high-volume plant to do so.

It's funny to think of this carefully-crafted machine undoing the work done by another carefully-crafted machine.




Couldn't they just mix all the colors together in roughly equal proportions (by weight, for instance) before packaging them into packets, and just rely on the statistical improbability of a noticeable imbalance in colors? I doubt there is actually a machine that counts out the Skittles by color and makes sure each bag gets the right number of each.


as someone who has kept track of their skittles color distribution over the course of a year, I can attest that there can be wide fluctuations in distribution percentages.

I wish I had kept all the numbers, but IIRC, the "typical" bag would have roughly 55-60 skittles, so the "average" color would have 11 skittles. It was common to see a single color with only 9 skittles. I can't recall ever having a bag have one color with less than 7 of any one color, but I would have on occasional see one color get as many as 18 of one color.

Sincerely yours, a gigantic nerd.


5 colors, so:

   P(color) = 0.2 = p
Expected number of, say, blue, in N = 55 skittles is:

  E(N_blue) = Np = 11
Standard deviation:

  Sdev(N_blue) = sqrt(N p (1-p)) = 2.95
So you would expect to see 11 +/- 3 skittles.

(If you take the largest discrepancy of the 5 colors, it's harder to compute.)

If you want to look at a large deviation from the expected:

  P(Nblue < 7) ~= P(Nblue = 6) = choose(55,6) p^6 (1-p)^49 = 3.3%
which is pretty significant, especially considering you were looking at large deviations over any of five colors. In the other direction:

  P(Nblue > 17) ~= P(Nblue = 18) = choose(55,18) p^18 (1-p)^37 = 0.98%
which is still pretty significant. With probabilities this small, and events like these that are lightly-correlated, the second-order terms in the relevant Bonferroni inequality will be pretty small, so

  P(any color = 18) ~= 5 * P(Nblue = 18) ~= 5%
(You could do all these calculations more exactly, but they are within a factor of 2.)


> as someone who has kept track of their skittles color distribution over the course of a year

I mean did you not expect someone ask why? Also, why?


1. I like the taste having an even distribution (i'd eat one of each color at the same time). There was a stupid little pattern on how on how I'd eat the extras to get each color to have an equal number. 2. I started a very statistics heavy programming job, so I thought it'd be fun to run some numbers on something novel.


The colours are all coloured separately, so ensuring a good chance of an even mixture just involves combining equal amounts of each colour and mixing them up. Whatever amount you take, you're likely to have an even mixture of each colour.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: