Sweet impossibility

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:

sweet1

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%):

sweet2

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:

sweet3

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.

Advertisements

2 Comments

Filed under Uncategorized

2 responses to “Sweet impossibility

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s