Files
public-notes/Binomial Coefficients and N Choose K.md
2025-12-25 21:13:43 -08:00

21 lines
628 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#Math #Probability
# Problem
Why does n choose k, or $\frac{n!}{k!(n-k)!}$ generate the coefficient for $x^ky^{n-k}$ in $(x+y)^n$?
# Explanation
Lets see what happens when expanding $(x+y)^4$:
$$
(x+y)^4\\
=(x+y)(x+y)(x+y)(x+y)\\
=xxxx+\\
yxxx+xyxx+xxyx+xxxy+\\
yyxx+yxyx+yxxy+xyyx+xyxy+xxyy+\\
xyyy+yxyy+yyxy+yyyx+\\
yyyy
$$
When expanding, notice the number of terms with k of x (and likewise 4-k of y) is the number of combinations of 4 choose k, as you choose k slots to put k xs in out of 4 slots. Therefore, $(x+y)^n={n \choose 0}x^0y^n+{n \choose 1}x^1y^{n-1}...+{n \choose n-1}x^{n-1}y^1+{n \choose n}x^ny^0$