Ask your own question, for FREE!
Mathematics 19 Online
OpenStudy (ranga):

A spider must eat 3 flies a day to survive. After he has taken his three he quits for the day. For any fly that crosses his path, he has a 50% chance of nabbing that fly. Given that five flies have sailed past the spider today (some surviving and some not), find the chance of survival of next fly.

OpenStudy (ranga):

This was my calculation but I was told that is not the correct answer: The probability that an event occurs exactly r times in n trials is: nCr * p^r * q^(n-r) where p is the probability that the event will occur and q is the probability the event will not occur. q = 1 – p. When the 6th fly crosses the spider’s path, these are the possible events that may have transpired until then on that day: The spider may have eaten exactly 0, 1, 2 or 3 flies out of the 5 flies that has already crossed its path. It can’t eat more than 3 flies a day. Probability that exactly 0 out of 5 flies were eaten: 5C0 * (1/2)^0 * (1/2)^5 = 1 * 1/32 Probability that exactly 1 out of 5 flies were eaten: 5C1 * (1/2)^1 * (1/2)^4 = 5 * 1/32 Probability that exactly 2 out of 5 flies were eaten: 5C2 * (1/2)^2 * (1/2)^3 = 10 * 1/32 Probability that exactly 3 out of 5 flies were eaten: 5C3 * (1/2)^3 * (1/2)^2 = 10 * 1/32 To calculate the probability that the 6th fly will be eaten we need to concern only with the first three cases above because if the spider has already eaten exactly 3 out of the first 5 flies, the probability that the sixth fly will be eaten is zero. The combined probability that exactly 0, 1 or 2 flies were eaten is: (1 + 5 + 10) * 1/32 = 16 / 32 = 1/2 The probability that the 6th fly will be eaten is: 1/2 * 1/2 = 1/4 The probability that the 6th fly will survive is: 1 – 1/4 = 3/4 or 75%

OpenStudy (poopsiedoodle):

50%.

OpenStudy (poopsiedoodle):

"For any fly that crosses his path, he has a 50% chance of nabbing that fly."

OpenStudy (anonymous):

It seems that the change of catching a fly is independent of past events.

OpenStudy (ranga):

But isn't it a conditional probability? If the spider has already eaten 3 flies then the subsequent flies have a 100% survival rate.

OpenStudy (poopsiedoodle):

It doesn't say how many have survived. It just says some.

OpenStudy (anonymous):

Okay, if I understand you correct @ranga, you think we should consider the probability that the spider has NOT yet eaten 3 flies, and that he catches the next one?

OpenStudy (ranga):

Yes @wio.

OpenStudy (anonymous):

Hmmm, do you know what the actual answer is?

OpenStudy (anonymous):

I think that the error here is that it isn't quite a binomial distribution.

OpenStudy (anonymous):

For example, the probability that 4 of 5 flies are caught is 0, not 5/32

OpenStudy (anonymous):

So your distribution doesn't add up to 10

OpenStudy (anonymous):

up to 1^

OpenStudy (anonymous):

In short, it isn't a binomial distribution because technically the events are not independent.

OpenStudy (ranga):

No, I don't. My nephew in India asked me this question yesterday. I sent him my answer and he said the back of the book says I was wrong! I didn't ask him for the correct answer because I wanted to find what was wrong in my calculation.

OpenStudy (anonymous):

Does what I'm saying make sense, ranga?

OpenStudy (superdavesuper):

I THINK P(6th fly survives) = P(spider has ate 3 out of 5 flies)*1 + P(spider has ate less then 3 out of 5 flies)*0.5....

OpenStudy (ranga):

@wio Yes, it does. Perhaps I shouldn't have used binomial. But how does one solve this the right way?

OpenStudy (ranga):

Yes @superdavesuper. To find P(spider has ate less then 3 out of 5 flies)*0.5 I used binomial.

OpenStudy (anonymous):

Hmm, we could start with basic conditional probability I suppose.

OpenStudy (anonymous):

There are 2^5 total outcomes, if we consider the order in which flies are killed.

OpenStudy (superdavesuper):

Just went thro ur calc @ranga n came up w the same results: P(6th fly survive)=(1/2)*1 + (1/2)*(1/2)=3/4 So im sorry: seems like u got the right answer already...

OpenStudy (anonymous):

@superdavesuper It is NOT a binomial distribution, because P(4 of 5) = 0

OpenStudy (anonymous):

Wait hold on, there aren't 2^5 total outcomes for the first 5 flies...

OpenStudy (anonymous):

since for example die die die die survive doesn't work.

OpenStudy (superdavesuper):

@wio oooooooo i see it now...i didnt re-do the P(0), P(1)...calculations. I just re-used the results ranga listed above...so...in order to calculate P(spider has ate less than 3 out of 5 flies).....hmmm....

OpenStudy (anonymous):

Wait, I got it! There are 3 deaths and 5 survivals. So we choose from a total of 8 things...

OpenStudy (ybarrap):

I don't think you can ignore that the spider caught all 3 flies within the 1st 5 and just calculate that there will be an opportunity to catch one on the 6th. You should also include the possibility that the 6th fly will not have the opportunity to get eaten.

OpenStudy (ranga):

@wio If you know how to solve this please let me know.

OpenStudy (ranga):

At least I now know that I should not have used binomial. Thanks wio. But I haven't used stats & probability for so long.

OpenStudy (anonymous):

Hmmm, one idea I have is to pretend that instead of quiting, it attempts to catch flies, but doesn't eat them.

OpenStudy (anonymous):

The first 3 flies play out exactly like a binomial distribution.

OpenStudy (ranga):

I think spiders catch flies through their web. But I suppose flies can escape the web before the spider gets to them. It looks like 50% chance of nabbing a fly means 1 in 2 escape the web b4 the spider gets to it.

OpenStudy (anonymous):

Okay so let's just look at the case for the 4th fly.

OpenStudy (anonymous):

The probability is survives is going to be 1 * (1/8) + (1/2) * (7/8) = 1/8 + 7/16 = 9/16. The probability it dies will thus be 7 / 16 The probability that 2 flies have died so far is: (3C2)(1/8) The probability it is last fly to die is...

OpenStudy (anonymous):

by last, I mean 3rd.

OpenStudy (anonymous):

The probability that by the 4th fly, 3 flies have died will be: P(2 flies have died AND 4th dies) + P(first 3 flies died)

OpenStudy (anonymous):

Okay so here is my idea now of how to go through with this. Start with first 3 rounds and number of deaths: # deaths Round 3 Round 4 0 1/8 1 3/8 2 3/8 3 1/8

OpenStudy (anonymous):

# deaths Round 3 Round 4 0 1/8 1/16 1 3/8 2 3/8 3 1/8

OpenStudy (anonymous):

The change that 1 files dies in 4 rounds... 0 flies died and 4th dies. 1 died and 4th survives... 1/8 * 1/2 + 1/2 * 3/8 = 1/16 + 3/16 = 4/16

OpenStudy (anonymous):

That 2 flies die by round 4 is... 1/2 * 3/8 + 1/2 * 3/8 = 6/16 That 3 die by round 4 is.... 1/2 * 3/8 + 1 * 1/8 = 5/16

OpenStudy (anonymous):

# deaths Round 3 Round 4 0 1/8 1/16 1 3/8 4/16 2 3/8 6/16 3 1/8 5/16 Well, they add up to probability 1, so it looks good so far.

OpenStudy (superdavesuper):

Good work, @wio!! :)

OpenStudy (anonymous):

# deaths Round 3 Round 4 Round 5 0 1/8 1/16 1/32 1 3/8 4/16 5/32 2 3/8 6/16 10/32 3 1/8 5/16 16/32

OpenStudy (anonymous):

Yeah, it is weird... that we still got 50% chance of 3 died....

OpenStudy (anonymous):

This is so obnoxious! Where did this calculation go wrong....

OpenStudy (ranga):

Not sure. But the chance of the 6th fly surviving has definitely got be greater than 50% and less than 100% because there is no 100% guarantee that the spider had eaten 3 flies within the first 5.

OpenStudy (anonymous):

When it says (some surviving and some not), does that mean we assume that at least 1 died?

OpenStudy (ranga):

That may be a reasonable assumption. I took it to mean that not every fly that came across the spider died.

OpenStudy (anonymous):

I'm still getting a probability of 3/4, but just with a different method.

OpenStudy (ranga):

Yes, there was another mrthos that once again gave 3/4. superdavesuper and you are also getting the same answer. Maybe the book answer is wrong?! But I did realize the flaw in my solution above with respect to treating it as a binomial distribution.

OpenStudy (ranga):

*method*

OpenStudy (ranga):

I think if we could answer the question: What is the probability that less than 3 flies have died by the time the 6th fly came along then we could solve this problem. Pr(survival) = Pr(X = 3) * 0 + Pr(X < 3) * 1/2

OpenStudy (anonymous):

That's probability of death. Which I got 1/4

OpenStudy (ranga):

Thank you @wio and @superdavesuper. I have to log offf now.

OpenStudy (ybarrap):

Let E be the event that less than 3 flies were eaten by the 5th fly Let M be the event the the 6th fly is eaten We need, P(M|E). P(M|E) = P(E|M)P(M)/P(E) ( http://en.wikipedia.org/wiki/Bayes%27_theorem) Let p = probability that fly is eaten on any single event Because it is with 100% certainty that less than 3 flies were eaten if the 6th one was eaten: P(E|M) = 1 The 6th fly will be eaten only if less than 3 flies were eaten before the 6th AND the 6th fly is actually eaten: P(M) = p*P(E) Therefore, P(M|E) =1*p*P(E)/P(E) = p = 1/2 So, the chance that the 6 fly is eaten given that less than three have been eaten by the the 5th fly is 50 %.

OpenStudy (anonymous):

What we want is P(M^C) based on your definition of events.

OpenStudy (anonymous):

We know that P(M|E) = 1/2 because it was given.

OpenStudy (anonymous):

Because it is with 100% certainty that less than 3 flies were eaten if the 6th one was eaten: P(E|M) = 1 This makes sense

OpenStudy (anonymous):

The 6th fly will be eaten only if less than 3 flies were eaten before the 6th AND the 6th fly is actually eaten: P(M) = p*P(E) True, I would write this as: P(M) = P(M|E) * P(E)

OpenStudy (anonymous):

Ultimately we still need to find P(E) given all the information you have presented.

OpenStudy (ybarrap):

@wio I agree on your comments For P(E) we can do this: Let P_k = Probability that k flies have been eaten by 5th try P(E) = P_0 + P_1 + P_2 = 5C0 q^5 +5C1 p q^4 +5C2 p^2 q^3 = (1/2)^5 + 5 (1/2)^5 + 10(1/2)^5 = (1/2)^5(16) = 2^4/2^5 =1/2 So P(M^C) = P(M^C|E) * P(E) = 1/2 * 1/2 = 1/4 25% chance of survival

OpenStudy (anonymous):

You can't use a binomial distribution because it isn't a binomial distribution. Think about it, we know P_5 = 0, yet if you use binomial distribution it is 5C5 p^5 != 0

OpenStudy (anonymous):

I tried to calculate it out manually and this is what I got for probabilities for the 5th fly # deaths Round 3 Round 4 Round 5 0 1/8 1/16 1/32 1 3/8 4/16 5/32 2 3/8 6/16 10/32 3 1/8 5/16 16/32

OpenStudy (anonymous):

The initial 3 rounds play out like a binomial distribution. Round 1 1/2 1/2 0 0 Round 2 1/4 2/4 1/4 0 Round 3 1/8 3/8 3/8 1/8

OpenStudy (ybarrap):

Since either 3 flies are either eaten in 5 OR they are not. This just reduces our sample space and gives us P_0 = 5C0 q^5 / (5C0 q^5 +5C1 p q^4 +5C2 p^2 q^3+5C3 p^3 q^2) P_1 = 5C1 p^1 q^4/(5C0 q^5 +5C1 p q^4 +5C2 p^2 q^3+5C3 p^3 q^2) P_2 = 5C2 p^2 q^4 /(5C0 q^5 +5C1 p q^4 +5C2 p^2 q^3+5C3 p^3 q^2) P_3 = 5C3 p^3 q^2/(5C0 q^5 +5C1 p q^4 +5C2 p^2 q^3+5C3 p^3 q^2) P_4 = 0 P_5 = 0 P(E) = 1 - P_3 = 1- 5/13 = 8/13 (about 62 %) used Wolfram Calculator - http://www.wolframalpha.com/input/?i=1-%28%285choose3%29*+p%5E3+*q%5E2%2F%28%285choose0%29*+q%5E5+%2B%285choose1%29+*p*+q%5E4+%2B%285choose2%29*+p%5E2+*q%5E3%2B%285choose3%29+*p%5E3+*q%5E2%29%29%2C+p%3D1%2F2%2Cq%3D1%2F2 P(M^C) = P(M^C|E^C)*P(E^C) + P(M^C|E)*P(E) =P(E^C)*1 + (1/2)(8/13) = 5/13 + 4/13 = 9/13 Which is about 70 % that the 6th fly survives.

OpenStudy (ranga):

@ybarrap: You have the correct answer!!! 9/13. But are you assuming normal distribution in calculating P(3)? Also, is C the complement?

OpenStudy (ybarrap):

Yes, C is the complement of my original M: The event the the 6th fly is eaten. M^C is the event that the 6th fly survives. Also for P_3 I assumed the binomial distribution, but set P_4 and P_5 to zero: P_3 = 5C3 p^3 q^2/(5C0 q^5 +5C1 p q^4 +5C2 p^2 q^3+5C3 p^3 q^2). By dividing by the probabilities of events that are allowed, I've effectively reduced the sample space to only allow 0,1,2 or 3 flies to be eaten by the time the 5th fly comes around, which is our reduced sample space for flies less than or equal to 5.

OpenStudy (ranga):

I tried a different method with a probability tree and got 13/21 as the probability that the 6th fly survives. I created a table with all possibilities. One random row in the table may look like this (where S: Survives and D: Dies) #1 #2 #3 #4 #5 #6 S D D S S S If “1” represents Survives and “0” represents Dies, then there will be 2^6 or 64 possible outcomes represented by the binary numbers 0 to 63. I went through the list and removed all entries that had more than three zeroes (because at most 3 flies die). There were 22 entries with more than 3 zeroes. That left me with 64-22 = 42 possible outcomes. Then I counted all entries with the last digit 1 which implies the 6th fly survives. There were 26 such entries. So the probability that the 6th fly survives is: 26/42 = 13/21. 13/21 is not the correct answer but I am trying to figure out the flaw in this logic.

OpenStudy (superdavesuper):

good work by ybarrap !! I know it gives the right answer so that must be how the teacher has intended to be solved. But the question as it was originally stated does not really work out with this "reduced" sample space. I tried something similar (but by using a binominal table; instead of calculating out the probabilities.) However consider this scenario: what happens when the 4th or 5th fly comes by and the spider has already ate 3 flies? It wont eat any more so that P(4) and P(5)=0. But wouldn't that mean P(3) will be increased? So the probability distribution will look like a binominal distribution but with P(4) and P(5) set to 0 and their original probabilities added to P(3)? If that is true, then the answer for the 6th fly survival will be as ranga has originally calculated to be 0.75. I deleted my post about the "reduced" sample space idea because of this. Of course it doesnt match the answer but thought I would put this up for consideration.

OpenStudy (anonymous):

P_0 = 5C0 q^5 / (5C0 q^5 +5C1 p q^4 +5C2 p^2 q^3+5C3 p^3 q^2) Can you explain this formula? Assuming it is conditional probability, what are the events here?

OpenStudy (anonymous):

"13/21 is not the correct answer but I am trying to figure out the flaw in this logic." The flaw here is the notion that each entry is equiprobable, I believe. For example D D D S S is more probable than S S D D D Since the survivals in the first case are guaranteed (spider if full), while the survivals in the second case where stochastic.

OpenStudy (ranga):

Aha! Thanks @wio. Yes, that was the flaw in the logic.

OpenStudy (ranga):

Is there some way to calculate this probability just by counting? That is ratio of number of cases of survival of the 6th fly / total number of possibilities?

OpenStudy (anonymous):

"But wouldn't that mean P(3) will be increased?" Yes, and by dividing out the probability of only 0, 1, 2, or 3 flies being eaten, you are able to increase P(3) as well as P(0) ... P(2)

OpenStudy (anonymous):

The only thing that is really bothering me though, is why my method of manually calculating each round didn't work.

OpenStudy (superdavesuper):

@wio but thats why I think the reduced sample space is not right: P(1) and P(2) should stay the same and only P(3) should go up.

OpenStudy (anonymous):

Okay, remember that P(1) is just the probability that 1 fly is eaten. If there are only 3 rounds, then that probability will be X If there are 5 rounds, that probability will be > X because there are more chances for some fly to be eaten.

OpenStudy (anonymous):

We know that P(1...4) is going to add up to 1, so each round just sort of redistributes probabilities to each one.

OpenStudy (anonymous):

I meant to say P(0...3)

OpenStudy (anonymous):

I just really want to know the flaw with my manual calculation now. Hmmmmm, I thought the assumptions were sound.

OpenStudy (superdavesuper):

OK consider this though - assume the spider does not get full, so for 1-5th fly, it will be a standard binominal distribution w n=5 and p=0.5. Now the spider decides to stop eating after 3 flies so that additional criterion will affect what happens AFTER the spider eats 3 flies - it should not affect the probability distribution when the spider has ate 0, 1 or 2 flies. So that is why I think P(0..2) should stay the same and the new P(3) be the sum of P(3..5) Hahahaa sorry @wio we all just have our ideas about the prob. and wonder why it did or didnt work out. I was also convinced that you would be able to work it out manually too! :)

OpenStudy (ybarrap):

@ranga - I think in your simulation you actually need 2 filters because the 6th fly can survive in 1 of two cases: (Note, now that I'm using M is the case where the fly survives) A- 3 flies were eaten within the 1st 5 flies (survival for the 6th guaranteed) B - Less than three flies were eaten in within the 1st 5 flies AND 6th fly survives being eaten when the spider makes its attempt. The probability of the latter is GIVEN as 1/2. So the probability P(M) that the spider survives is P(M) = P(Case A) + P(Case B) [Note: Case A and Case B are disjoint sets ] We need to count the number of rows in your table for each of these cases: 1) Look at the 1st five columns with all 2^6 original possibilities and remove any rows that have less than 3 1's. Again, this is only looking at the 1st five columns (#1-#5 in your notation). This gives us the part of the question "given that five flies have sailed past the spider today" and make this number E. 2) Look at the 1st five columns (again) with all 2^64 original possibilities and remove any rows that have 3 1's. Again, this is only looking at the 1st five columns (#1-#5 in your notation). This gives us all the cases where the sixth fly will ALWAYS survive. Call this number Ec (because this is the compliment of part 1). 3) Of the rows listed in part 1) only some rows will have a 1 in spot #6, of these only 1/2 will survive (on average) because the chance of survival on a given event is 1/2, which was a GIVEN. This is P(M|E) = 1/2. We don't need to count anything and will just use the result. So, P(Case A) = P(M|E)P(E) = (1/2)* E/(E + Ec) P(Case B) P(M|E^C)P(E^C) = 1 * Ec/(E + Ec) [Note: E^C is compliment of event E ] P(M) = P(Case A) + P(Case B) =(1/2)* E/(E + Ec) + Ec/(E + Ec) = (E/2 + Ec)/(E + Ec)

OpenStudy (ybarrap):

@wio - first off - Thank You for you input in driving the fact that P_4 and P_5 was zero -- that was key to solving this problem. To compute P_0 = 5C0 q^5 / (5C0 q^5 +5C1 p q^4 +5C2 p^2 q^3+5C3 p^3 q^2) I looked at all only the 1st 5 flies and asked, what is the probability that zero flies get eaten given that there are only 4 possibilities: 0,1,2 or 3 flies eaten. P_1, P_2 and P_3 were similarly computed. Note that P_0 + P_1 +P_2 + P_3 = 1, as it should. Even though P_4=P_5=0, that does not mean that there aren't ways 2 flies can be eaten within 5 attempts. It does mean that there are no ways that 4 or 5 flies can be eaten within 5 attempts, and this process implicitly excludes them from the sample space while still using the binomial distribution. Note that the distribution of P_k itself is not binomial but was built from a binomial distribution. I would not know what to call the distribution of P_k itself. (I also assume you already know how I use the binomial distribution to get k flies eaten out of 5 for k=0 to 3: 5C0 q^5, 5C1 p q^4, 5C2 p^2 q^3 and 5C3 p^3 q^2. If not, let me know.)

OpenStudy (ybarrap):

Thanks @superdavesuper -- I hope my previous responses will help to understand my thinking about the relationship between how the binomial distribution was used and the P_k's. I basically created a new distribution from the binomial and called it P_k, which is simply a reduced-sample-space distribution based on the binomial. P_k has no name of which I am aware.

OpenStudy (anonymous):

Ummm, sorry but I created a program to simulate this, and I think that I was correct. http://jsfiddle.net/z8937/3/

OpenStudy (ranga):

@ybarrap: After creating the table, shouldn't the first step be to get rid of all entries that had more than 3 zeroes to account for the given that the spider will not eat more than 3 in a day and then apply your suggestion rather than apply it to the entire 2^6 total possibilities?

OpenStudy (anonymous):

It is consistently reaching 50%. It is running a simulation which perfectly emulates the situation descried.

OpenStudy (ranga):

What if you go the 6th round? wio

OpenStudy (anonymous):

It is only calculating the probability that the spider is full after 5 rounds. If you want me to run the 6th round simulation, I can create that for you as well. Do you want me to?

OpenStudy (ranga):

Just for your own satisfaction. I want to be able to explain to my nephew the answer in simpler terms if possible and hence I am pursuing the table entries.

OpenStudy (ranga):

So if the probability that the spider is full after 5 rounds is 1/2 that means the probability that the spider is hungry when the 6th fly comes around is 1/2. Which makes the probability that the 6th fly will be eaten as: 1/2 * 1/2 = 1/4 that makes the survival probability 3/4 or 75%?

OpenStudy (anonymous):

http://jsfiddle.net/z8937/7/ Here is is the simulation of the 6th fly being eaten.

OpenStudy (anonymous):

The survival of the 6th fly is going to be 1 - 0,25 = 0.75 Since my simulations says 1/4 of the time 6th fly is eaten.

OpenStudy (ranga):

But since that differs from the book answer something must have been overlooked.

OpenStudy (ranga):

Assuming the book answer is correct, the simulation should yield 1 - 0.69 or 0.31

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!