Tuesday, July 3, 2012

Do I need to order more orange beads?

This past week at my church we are doing Vacation Bible School, using Group's Sky Curriculum. My role is to lead the imagination station, which is a small 15 minute block of time where students essentially create a little mini-science demonstration, relate it to how God works in their lives, and create a small take-away activity they can bring home to show their friends and parents.

One small part of this station is an opening question to get the students thinking about the idea of the day. This question is a "would you rather" type of question that has only two possible answers -- and the students depending on their answer select a little orange bead or a little blue bead, which they keep. At the end of the week, some students might have responded with the first option each time and have 5 orange beads, or perhaps have five blue beads, or most likely something in between.

We anticipated 100 students, and bought 3 beads of each color for each student, so we have 300 orange beads, and 300 blue ones, as was recommended by the company. My concern was that today's question was highly skewed in direction of the orange, so even though we have only 94 students, 75 of them received an orange bead, and only 19 took a blue one. I'm wondering if I should order more beads, or trust that in the grand scheme of things, it will balance out?

To answer this question, I need to invoke a little work with probability. To do so, I am going to make a few assumptions, which as always I'll list before getting started:

  • Each of the remaining four days I will also have 94 students
  • Each of the remaining four questions will be "fair" meaning a student would pick either option with 50% likelihood.  
To begin, suppose worst case scenario, every student from here on out chooses the orange response.  That would mean 94+94+94+94 more orange beads are given out, plus the 75 I've already given away which would be 451 total orange beads, or 151 more than I have. So one solution could be to order another 151 beads (they come in packs of 100 though, so I'd have to order 200 more) and then I'll know I'll be safe -- at least with orange.

How many beads do I have left anyway?  300-75 = 225. Divided by four days, means I have an average of 56.25 beads I could give away each day, which would mean students would average their responses to less than 56.25/94 = 59% favoring orange. Hmm... a little nervewracking, but if any of the days is a blue-heavy day, than that probability would go up, and surely one of the days will be blue-heavy, right? 

Ultimately, this can be simplified to a 'coin-flipping' problem.  I have 94*4 or 376 more beads to give away, some of which will be orange and some will be blue. If I split 50/50 I'll give away 376/2 or 188 more orange beads, which is well under the 225 I've got left.  What I'd ultimately like to know is what is the probability that I'll have to give away 226 or more beads?  That is, if I flip a coin 376 times, what's the probability that I'll get 226 heads?  

This question is simple enough in concept to answer, but because of the large number of flips needed, it will be a little more difficult to practice. The concept is simply to find out how many different combinations of orange/blue giveaways are possible - lets call that X - and then count how many of those options contain 226 or more orange beads -- lets call that O. A probability is always the number of combinations that win (or in this case, "lose") divided by the total number possible, so using our notation, that's O/X.  Lets look at a simpler question, and then we'll return to the question at hand.

Suppose it was the last day and we had only five students. What responses are possible. Suppose I had 3 of each bead -- what's the probability that I'll be able to give the students what they need? 

First, lets figure out how many combinations are possible, which I'll do by listing, because there aren't that many (2^5 is 32 -- so I can do that relatively painlessly)
ooooo oooob ooobo ooobb ooboo oobob oobbo oobbb
obooo oboob obobo obobb obboo obbob obbbo obbbb
boooo booob boobo boobb boboo bobob bobbo bobbb
bbooo bboob bbobo bbobb bbboo bbbob bbbbo bbbbb
That's 32 possibilities, which means in this example, X = 32. 

Now lets highlight the ones that I can handle -- that is, the cases that give away at most 3 beads of any color -- because I don't have four.  
ooooo oooob ooobo ooobb ooboo oobob oobbo oobbb
obooo oboob obobo obobb obboo obbob obbbo obbbb
boooo booob boobo boobb boboo bobob bobbo bobbb
bbooo bboob bbobo bbobb bbboo bbbob bbbbo bbbbb
There are 20 possible outcomes that will ok, which I've highlighted. That means our O = 20. The probability that I'll be able to give things away with no difficulty then is O/X = 20/32 or 62.5%.  

Now the same process could theoretically be used to answer the real question at hand, but each possible chain is 376 letters long, and I would have to list 2^376 possibilities, which is a number that has 113 digits in it. No thank you. Not to mention I would then have to look through each of those combinations to see which ones have 226 or more orange beads....

Thankfully, there is a shortcut, and even though these calculations involve enormously big numbers of possibilities, a calculator can handle them for us. One such calculator that I used can be found online, and the relevant numbers you would need to type in are n = 376 (number of flips) k = 226 (highest number of flips of one type desired) and p = .5 for 50% probability per flip.  You may also use a TI-83 or TI-84 in which case you're looking for the binomialcdf function in the Distribution menu. (More info) When I calculated the answer, I got a 0.0052234269% possibility of running out of orange beads. I'm fairly confident I'll be ok, as long as the rest of the questions are basically 50-50. 

Tomorrow we'll continue this discussion, and see how a little triangle of numbers can help us answer this question.

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...