# Derivation of the probability distribution function of a binomial distribution

1. ### misogynisticfeminist

388
Is there a way to derive

$$P (X=r) =^nC_r p^r q^{n-r} , r= 0, 1, 2,...., n$$

where $$X: B(n,p)$$

where n is the total number of bernoulli experiments,

p the probability of success

q, the probability of failure.

2. ### matt grime

9,396
Yes, just think about it, it's just simple combinatorics (you omitted to mention independent trials, which is, I'm sure important), and no harder than working out how to choose r from n (in fact it is the same).

3. ### robert Ihnot

This is not a problem as matt goes into. Suppose we have XXX and YY,then how many ways can combinations occur? Well there are five elements in 5! ways, but 3 of them are similar and the other two are similar, so it's 5!/(3!2!)=10 distinct ways. YYXXX, YXYXX, YXXYX, YXXXY, XYXXY, XXYXY, XXXYY, XYYXX, XXYYX, XYXYX.