You are Here: Home >< Maths

# Binomial help watch

1. okay, so I've created a problem in stats to keep me entertained but i'm not sure how to approach it.

find a general equation for

what I was thinking of doing was saying that . Then I would work out the probability for 2 of the possible values, multiply them together and assume that the last distributional probability will be one and then divide by the A probability.

Only issue is that I feel as if that isn't correct or if it is that it is a lot of work and that there should be a simpler way.
2. (Original post by Aph)
what I was thinking of doing was saying that .
I take it that you're assuming all three are independent?
3. (Original post by Aph)
okay, so I've created a problem in stats to keep me entertained but i'm not sure how to approach it.

find a general equation for

what I was thinking of doing was saying that . Then I would work out the probability for 2 of the possible values, multiply them together and assume that the last distributional probability will be one and then divide by the A probability.

Only issue is that I feel as if that isn't correct or if it is that it is a lot of work and that there should be a simpler way.
I haven't worked through this in detail, but I think you may be able to attack this by observing that the distribution of a binomial RV conditional on the sum of two binomial RVs with the same probability is hypergeometric. That is, P(X=a | X+Y=p) is hypergeometric. The details for this are worked out in this Stackexchange thread.

I think this will work by observing that

P(X+Y = a | X+Y+Z=p) is simply

P((X+Y) = a | (X+Y) + Z = p)

That is, condition the binomial RV (X+Y) on the sum (X+Y) + Z.
4. (Original post by Zacken)
I take it that you're assuming all three are independent?
Yes, although in reality they likely won't be.
5. (Original post by Aph)
Yes, although in reality they likely won't be.
Time to crank up the computer!
6. (Original post by Gregorius)
I haven't worked through this in detail, but I think you may be able to attack this by observing that the distribution of a binomial RV conditional on the sum of two binomial RVs with the same probability is hypergeometric. That is, P(X=a | X+Y=p) is hypergeometric. The details for this are worked out in this Stackexchange thread.

I think this will work by observing that

P(X+Y = a | X+Y+Z=p) is simply

P((X+Y) = a | (X+Y) + Z = p)

That is, condition the binomial RV (X+Y) on the sum (X+Y) + Z.
That sort of makes sense, although I would have though that wouldn't apply here as you want all the variables to be above a certain number and say for instance does not necessitate that x be greater or equal to 22 or Y be greater or equal to 18.
7. (Original post by Aph)
That sort of makes sense, although I would have though that wouldn't apply here as you want all the variables to be above a certain number and say for instance does not necessitate that x be greater or equal to 22 or Y be greater or equal to 18.
Yes, I see the problem. It works fine if you step down a dimension as you can get P(X > b, Y> c | X+Y=p) by simply summing the P(X=a | X+Y=p) for those a that allow both constraints to be satisfied. I will think some more...

If this is actually an applied problem, you haven't considered some sort of monte-carlo simulation have you?
8. (Original post by Gregorius)
Yes, I see the problem. It works fine if you step down a dimension as you can get P(X > b, Y> c | X+Y=p) by simply summing the P(X=a | X+Y=p) for those a that allow both constraints to be satisfied. I will think some more...

If this is actually an applied problem, you haven't considered some sort of monte-carlo simulation have you?
It is sort of applied and I'm not sure what you mean by monte-carlo

Posted from TSR Mobile
9. (Original post by Aph)
That sort of makes sense, although I would have though that wouldn't apply here as you want all the variables to be above a certain number and say for instance does not necessitate that x be greater or equal to 22 or Y be greater or equal to 18.
OK, if you go back to that answer on the Stackexchange forum and work through the algebra, I think that you will find that you can do the conditioning "all at once". So you can work out P(X= k & Y = l | X+Y+Z = p). I think it comes out as

You can then sum the probabilities over the indices that meet all three constraints.
10. (Original post by Aph)
It is sort of applied and I'm not sure what you mean by monte-carlo

Posted from TSR Mobile
A monte-carlo technique is where you crank up a random number generator to repeatedly simulate from the distributions that you're interested in and you simply count the proportion of occurences that meet the constraints.
11. (Original post by Gregorius)
OK, if you go back to that answer on the Stackexchange forum and work through the algebra, I think that you will find that you can do the conditioning "all at once". So you can work out P(X= k & Y = l | X+Y+Z = p). I think it comes out as

You can then sum the probabilities over the indices that meet all three constraints.
ohhhhh, I knew there must have been a way to do it with coms. I just didn't think about it like that. initially I tried what you suggested of adding two together before realizing that that wasn't working. Thank you!!
(Original post by Gregorius)
A monte-carlo technique is where you crank up a random number generator to repeatedly simulate from the distributions that you're interested in and you simply count the proportion of occurences that meet the constraints.
I feel like that would take forever. not that I think any methord wouldn't take a long time.
12. (Original post by Aph)
I feel like that would take forever. not that I think any methord wouldn't take a long time.
Just out of interest, I coded this up in the simplest way possible (simulate from the binomial distributions given, select only those that meet the sum constraint, and then count the X,Y,Z values that satisfy the >= constraints). With p = 54 and simulating 10,000,000 triples, I get an answer in about 5 seconds (in R, on an Intel 4770).
13. (Original post by Gregorius)
Just out of interest, I coded this up in the simplest way possible (simulate from the binomial distributions given, select only those that meet the sum constraint, and then count the X,Y,Z values that satisfy the >= constraints). With p = 54 and simulating 10,000,000 triples, I get an answer in about 5 seconds (in R, on an Intel 4770).
I'm afraid as i'm only doing A-levels and am on a school computer I'm limited to excel. Plus I haven't done programming before so I wouldn't know where to begin on that.
14. (Original post by Aph)
I'm afraid as i'm only doing A-levels and am on a school computer I'm limited to excel. Plus I haven't done programming before so I wouldn't know where to begin on that.
Ah well, Excel will really limit what you can do like this. "R" has become the lingua franca of statisticians - it's wonderfully flexible and allows you to knock up this sort of code very rapidly. If you're interested in probability and/or statistics it would be a good idea to learn it sometime!
15. (Original post by Gregorius)
Ah well, Excel will really limit what you can do like this. "R" has become the lingua franca of statisticians - it's wonderfully flexible and allows you to knock up this sort of code very rapidly. If you're interested in probability and/or statistics it would be a good idea to learn it sometime!
I will, Thanks I've worked out what I needed anyway, its just a lot of doing things manually on excel

TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

This forum is supported by:
Updated: March 1, 2016
Today on TSR

### Uni league tables

Do they actually matter?

### University open days

• Staffordshire University
Everything except: Midwifery, Operating Department Practice, Paramedic Undergraduate
Sun, 21 Oct '18
• University of Exeter
Wed, 24 Oct '18
Wed, 24 Oct '18
Poll
Useful resources

### Maths Forum posting guidelines

Not sure where to post? Read the updated guidelines here

### How to use LaTex

Writing equations the easy way

### Study habits of A* students

Top tips from students who have already aced their exams