My last post might have sounded a bit down computers. I didn’t mean it that way. Computers are wonderful in maths, particularly in the area of iteration. It would be easy to get the real solution of the orange sweet problem (how many sweets were there in the bag?) by writing some code, but it can be more easily demonstrated using a spreadsheet. See sweets.

There must be at least six sweets in the bag, because we know that there are six orange sweets. So we start with n set to a value of six. In the next column we calculate the chance of the first sweet being orange. In the next column we calculate the total number of sweets after the first sweet has been eaten. In the next column we calculate the number of streets left after the first sweet has been eaten so that, in the next column, we can calculate the chance of the second sweet being orange. We multiply those two chances together, to get the chance of both sweets being orange. Finally, we have the reciprocal of that chance in order to find the odds against both the sweets being orange. In the rows beneath that, we perform the same calculation for n set to a value of seven, eight, and so on. I have gone up to 30. There is no need to put the formula in 30 times; you can just put it in once and then copy and paste. You then just look down the right-hand column see when it is that the odds are 3 to 1 against – unsurprisingly, this occurs when the number of sweets is 10. You can graph this quite easily:

It is easier to see if you put it in bar chart form with the chance (now we are looking for a chance of .33, or 33%):

But what about the mathematical calculation which showed the alternative solution of minus 9 sweets. Obviously, there is no such thing in the real world as minus 9 sweets. But let’s put it spreadsheet, and see what comes out. The answer is that with minus 9 sweets in the bag, the odds calculated by the computer of the first sweet being orange is -.6666, and the odds of the second sweet being orange is -.5. Multiply a minus by a minus, and you get a plus: in this case +.3333, or a one in three chance:

I rather like the idea of negative sweets. Part of my regime for losing a bit of weight is no sweets at all.

I rather like the idea of negative sweets. Part of my regime for losing a bit of weight is no sweets at all.

### Like this:

Like Loading...

*Related*

Is the telly broken?

Probably just putting off for a few moments all the work that I have to do!