thanks, mao but unfortunately I don't think they are independent events... if 'p' and 'q' overlap (p+q > n), then the value X takes will affect the probability of what value Y takes.
Sorry if it's an impractical question... I got it from the special case n = 4, p = 3, q = 3 (in an actuarial text where they provided the P.D. without proof), and I figured that if there was a systematic way of generating a P.D. then it could be easily generalised with variables.
ooh THAT's what you mean...
Break it down into three independent events?
suppose there is overlap, i.e. overlap = p + q - n > 0, hence the three independant events occurs over n-q, p + q - n, and n-p (if there were no overlap, they can be treated as two individual events)
now suppose N heads were achieved overall, then N-Y heads were achieved in the first, X + Y - N in the middle, N - X in the last.
The restrictions are hard to deal with. To start, the minimum N occurs when as much of X and Y fit in the first and last section. the maximum N occurs when as much of X and Y fit in the middle section.
Then the probability becomes
And by brute force [considering all cases of how things can distribute across the three sets], a minimum and maximum of N can be determined.
This is not elegant, but it is one way to work it out, and especially easy with some logical statements and a processor.