Kuro5hin.org: technology and culture, from the trenches
create account | help/FAQ | contact | links | search | IRC | site news
[ Everything | Diaries | Technology | Science | Culture | Politics | Media | News | Internet | Op-Ed | Fiction | Meta | MLP ]
We need your support: buy an ad | premium membership

[P]
The Cookie Problem: A Mathematical Satire

By Blarney in Fiction
Sun Apr 29, 2012 at 01:35:08 PM EST
Tags: ogg frog, caltech, starfleet academy, academia, bullshit, satire, schizoaffective disorder (all tags)

There exists an urban legend of how psychiatrists used to differentiate schizoprenia from bipolar by asking the patient how they preferred their carrots - raw or cooked? - and it worked pretty well, actually. However, it sorted 'normal' people into the same categories of insanity, with exactly the same proportions. Any chef will tell you, based on this, that psychiatry is bullshit.

One wonders if someday, psychiatrists will diagnose people based on chocolate chips.


Young Johnny sat in his freshman Probability & Statistics course, fidgeting in his chair in anticipation. He'd worked very hard to get into the Academy, always gotten A's and the occasional - very occasional - A-, always been the smartest kid in his class. Even his hobbies and volunteer work were carefully chosen in order to appeal to the admissions board at the Academy. Nothing else had mattered to him, he'd never dated, never had a paying job, never played sports or music, never goofed around sneaking beer, cigarettes, and pot. Never went to a concert, never got laid, never just blew off school to go ride his bicycle out on county back roads. He'd just studied, day and night. And he had made it in, of course he had made it in. It had been his life's dream and now he was here, finally here. He hadn't really gotten over it, his first few weeks here spent in an excited delirium. For the first time in his life, he wasn't dreaming of being somewhere else - he was where he wanted to be - for the first time in his life, he felt that he belonged. And now he was sitting in a room with his true peers, and illuminating the room like a great radiant Jupiter was the eminent Professor R. F.! The venerable sage made an announcement - "Pop quiz today!" - he declared. "I'm waiting to see which of you have truly great minds, which of you are truly worthy of the Academy! Be creative! I will be looking to see which of you has the critical insight to solve them. I can tell you that out of 254 students last term, none of them saw the breakthrough. But maybe this year one of you will!"

Lovely Bonnie, shapely in her light floral-patterned sundress with a single bra strap peeking out over her pale freckled shoulder, sitting in front of Johnny as usual, passed him a copy of the quiz. Her hand briefly brushed his, causing a thrill to shiver up and down Johnny's body, but with difficulty he controlled his excitement. Only the problem mattered. Only his opportunity to prove his mathematical skill.

WITHOUT USING A CALCULATOR

How many chocolate chips must one mix into the dough used to bake one hundred thousand chocolate chip cookies so that ninety-eight percent of the cookies contain at least two chips?

You may use the Handbook of Mathematical Functions as reference material

Of course, Johnny thought, this was somewhat ambiguous. Of course there was no upper limit on chocolate chips here that would guarantee that 98% of the cookies had at least 2 chips. There would always be a probability - asymptotically approaching zero, but always positive - of all the chips ending up in one single cookie. "Would that really be a cookie, or just a melted blob of chocolate?" thought Johnny. Bonnie's long red hair shone in the glow of the sun from the dusty window behind them. Summoning up his concentration, Johnny returned to the problem.

As 100,000 was a fairly large number, it would be reasonable to interpret this as a probability p=0.98 that any individual cookie would possess at least two chips. They had recently covered the Binomial Distribution, and Johnny knew it well enough that he did not even need to reach for his Handbook but simply wrote down the initial equations.

Pr(0 chips) = (N0)x10-5*0x(1-10-5)N=(1-10-5)N
Pr(1 chip) = (N1)x10-5*1x(1-10-5)N-1=Nx10-5(1-10-5)N-1
Pr (< 2 chips) = Pr(0 chips)+Pr(1 chip) = (1-10-5)N + Nx10-5(1-10-5)N-1
Now it was obvious to Johnny that he wanted to find the smallest value of N which would render Pr(< 2 chips) less than or equal to 0.02, that is, 2%. Meaning that there would be a 98% probability of the converse, Pr(>=2 chips). Could he simplify this expression? Why yes, he could! Both terms carried a factor of (1-10-5)N-1 after all.
Pr (<2) = (1-10-5)N-1 [ (1-10-5) + Nx10-5 ] = (1-10-5)N-1 [ 1 + (N-1)x10-5]
Pretty enough, thought Johnny, but how did this help him find N? Perhaps there was some way to break this down using logarithms? However, he was not hopeful here. All of a sudden he had a glorious insight. As well as the Binomial Distribution, his class had also been studying the related topic of the Binomial Approximation. The Binomial Approximation states, of course, that (1+x)n ≈ (1+nx). A simple enough formula - for an x that was 'small', close to zero that is, and 10-5 was certainly a small number. Carefully noting the signs of the expression within the brackets, Johnny saw an absolutely beautiful symmetry to the problem. Once again the thrilling feeling he had experienced from the gentle touch of Bonnie's hand came back, only with greater intensity. And Johnny wrote.
(1-10-5)N-1 ≈ [1 - (N-1)x10-5]
Pr (<2) = [1 - (N-1)x10-5] x [1 + (N-1)x10-5]
= 1 - (N-1)2x10-10 = 0.02
Therefore, (N-1)2 = 0.98 x 1010 = 98 x 108
A quick check of the Handbook revealed that √98 = 9.8995. Multiplying by √108=104, shifting the decimal 4 places, gave him (N-1)=98995. Adding one, he wrote down the final answer.
N=98996

He raised his hand. "What is it?" barked Professor R. F., but Johnny had no fear. "I'm done, Professor," he proudly exlaimed. There was a great windy sound as the entire class sighed in exasperation, as they were all still busy puzzling over this difficult problem. The great Professor came over to Johnny's desk - the closest that he had ever been to Johnny - and seized his paper and glared at it with great interest. HIS paper, thought Johnny. And the thrilling feeling came over him a third time as the Professor held the paper in the air and announced "Johnny here has one of the true great minds here at the Academy. He saw the true insight behind the problem, unlike the rest of you. Congratulations, Johnny!" It was all Johnny could do, at that moment, not to faint.

While most of his classmates were stunned with jealousy, one of them approached him after class to congratulate him. It was Bonnie, of course, and that night something happened between the two of them which we should be kind enough not to inquire too deeply into. Neither was very expert, in fact neither had done such a thing before, but both of them had a very enjoyable evening. It was the best day - and night - of Johnny's life, and for the first time he truly experienced what he had always dreamed of - a life full of joy, made possible by his studies at the Academy he had always wanted to attend.

Time passed

Johnny never, as it turned out, finished his degree at the Academy. He had meant to, had wanted nothing else from his life, but it was not to be. After a certain incident he ended up spending a substantial period of time in a hospital - and when he returned, 'better' but not unmarked by the experience, neither his classmates nor his professors were able to recognize him as the same person anymore. He had made them uncomfortable - reminded them of their own mortality, of the fragility of life itself. Even Bonnie couldn't manage to look him in the eye anymore, nor could she regard him with anything but pity. Eventually it was made clear to him that he was no longer welcome on the Academy campus and so Johnny left.

He built a life for himself eventually, as we all do, at least those of us who continue to draw breath and cheat Death day after day. A life of sorts. But he never forgot the glorious day when he solved the Cookie problem, and knew the love of a woman for the first time. However, as his life went on he eventually realized that he could not remember, no matter how hard he had tried, how he had solved the Cookie problem. It tormented him day and night, and he gave his friends no peace about it. No answer they could give could ever satisfy him.

Ironically enough, his answer was wrong. It had pleased Professor R. F., but in fact the Professor was wrong as well. The Professor had composed the problem with the specific purpose of referencing the material on the Binomial Theorem and its consequences. It had been the exact answer that Professor R. F. had wanted. But it was wrong. In fact, many of Johnny's classmates had come up with the correct answer (or at least a reasonable approximation of such), after spending the entire period sweating over the difficult calculations, only to be marked incorrect. Johnny's answer was simple, elegant, and wrong.

Although we may not all have the mind of the great Professor R. F., we can all see that there's really no way to distribute 98,996 chocolate chips among 100,000 cookies such that most of them - let alone 98% - have at least 2 chips. You'd expect an answer somewhere closer to the 200,000 chips that a naive, unschooled cookie baker might include in his mathematically unsophisticated recipe.

The mistake was in the Binomial Approximation. (1+x)n ≈ (1+nx) for a small x. But it's not enough for x to be small relative to 1. nx also has to be small - and in this case, it was not. This small error made a huge difference in the result of the Cookie problem. Calculating the probabilities without the binomial approximation reveals that, for 98,996 chocolate chips, P(<2) is not 0.02 (2%) - it is very nearly 0.74, or 74%. In other words, only 26% of the cookies are likely to have 2 or more chocolate chips. About 37% of the cookies will have only 1 chip, and a final 37% will have no chips at all.

And still Johnny dreams of this day, endlessly seeking to remember his long-forgotten answer. Time and tragedy have ravaged his memories, this is true, but also his own unconscious mind has repressed the answer of 98,996 chips. For, outside the group setting of the classroom, Johnny would immediately see that this number is not a reasonable answer. Sadly, Johnny is not ready to face the fact that, although his departure from the Academy was entirely unfair and has caused him pain all the many years of his life since - that the Academy, like all academia, despite fostering very real genius and providing a home for all manner of wisdom and insight, is still an institution. And like all institutions, great and small, necessary and insignificant, it is firmly founded in bullshit. A thick sedimentary layer of bullshit, a mile deep, on which it bravely floats like a small skiff in the great Pacific Ocean.

Now if any of you were ever young, let's have a sentimental song to remind us all of our youth!

Sponsors

Voxel dot net
o Managed Hosting
o VoxCAST Content Delivery
o Raw Infrastructure

Login

Poll
These days when you look back
o Were you young, man? 50%
o Were you sad? 33%
o Did you get high? 83%

Votes: 6
Results | Other Polls

Related Links
o Binomial Distribution
o Binomial Approximation
o sentimenta l song
o Also by Blarney


Display: Sort:
The Cookie Problem: A Mathematical Satire | 28 comments (17 topical, 11 editorial, 2 hidden)
Nicely done! +1FP (2.25 / 4) (#1)
by mumble on Fri Apr 27, 2012 at 03:02:10 AM EST

I also think you should follow through on this: http://www.kuro5hin.org/comments/2012/4/25/12010/5350/35#35

It would be nice to compare reality with Craw-ality, and finally learn the original definition of the problem.


-----
stats for a better tomorrow
mumble lang on github
mumble lang blog
collected blog posts

Here's a question you could actually answer (2.75 / 4) (#8)
by procrasti on Fri Apr 27, 2012 at 12:55:01 PM EST

With a certainty of 98%, how many chocolate chips would you require so that at least 98% of 100000 cookies would have at least 2 chips in them.

I think he just forgot the certainty part, otherwise this is a physics question and depends on the size of the cookies and chips.

<-- kr5ddit
-------
if i ever see the nickname procrasti again on this site or anywhere in my life, i want it to be in an OBITUARY -- CTS
doing my best at licking arseholes - may 2015 -- mirko
-------
Winner of Kuro5hin: April 2015
-------
kr5ddit.com - You're front page to the internettm.

Looks fairly well formatted (2.25 / 4) (#16)
by Vampire Zombie Abu Musab al Zarqawi on Sat Apr 28, 2012 at 04:29:17 AM EST

And the random parts in bold makes me think this might be a Crawfordian Classic. +1FP it is.

Nicely done ~ (2.00 / 2) (#18)
by tweet on Sun Apr 29, 2012 at 06:10:51 PM EST


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Not everything in black and white makes sense.

I've always assumed the serious cookie (2.50 / 2) (#19)
by Pentashagon on Mon Apr 30, 2012 at 06:32:15 PM EST

companies inject additional chips into each doughball to ensure sufficient inchippenation.  I think I developed this theory as a child while eating from a bag of Chips Ahoy, upon which was written a claim of 1,000 chips per bag.  It seems far more rigorous to add the chips post-cookie rather than pre-cookie, and they'll all be visibly sticking up from the top of the cookie.  Clumping issues and improper mixing would seem to be too great a risk of a lawsuit from an angry caltech physicist.

I can't resist the Crawford in me by linking this answer.

Awesome, (2.00 / 2) (#21)
by k31 on Mon Apr 30, 2012 at 10:39:35 PM EST

bu-ll-shit must indeed not be allowed to prevent focusing on the Dance of Life.

Great story, esp. considering the source material!


Your dollar is you only Word, the wrath of it your only fear. He who has an EAR to hear....

bravo, sir (2.33 / 3) (#24)
by LilDebbie on Thu May 10, 2012 at 10:23:53 PM EST

ashamed i didn't vote for it

My name is LilDebbie and I have a garden.
- hugin -

WTH? (2.33 / 3) (#26)
by Klom Dark on Tue Jun 26, 2012 at 05:47:28 PM EST

What's with all the weird math and theory.

100,000 cookies. 98% have to have two chips.

(100000 x 2) * 0.98 = 196000 chips

If you have the equipment and money, and stir them all equally, then perform this experiment and check it. There's no reason for all that extra stuff.

98,996 chips? Completely wrong...

I am sated (2.00 / 2) (#28)
by thiswillbegreat on Sun Oct 14, 2012 at 07:47:33 PM EST

Reading this post is like gorging on delicious math cookies for my mind brain.
Semper ubi sub ubi.
sendgrid review best ipad 3 case best kindle fire hd case
The Cookie Problem: A Mathematical Satire | 28 comments (17 topical, 11 editorial, 2 hidden)
Display: Sort:

kuro5hin.org

[XML]
All trademarks and copyrights on this page are owned by their respective companies. The Rest © 2000 - Present Kuro5hin.org Inc.
See our legalese page for copyright policies. Please also read our Privacy Policy.
Kuro5hin.org is powered by Free Software, including Apache, Perl, and Linux, The Scoop Engine that runs this site is freely available, under the terms of the GPL.
Need some help? Email help@kuro5hin.org.
My heart's the long stairs.

Powered by Scoop create account | help/FAQ | mission | links | search | IRC | YOU choose the stories!