Free preview

27 lessons

Essential Probability & Statistics for ML

Free preview

Essential Probability & Statistics for ML · 27 lessons

Master the fundamentals

No surprise gaps

Actually remember it

Skip what you know

One subscription. All learning paths included.

Our content is best on a larger screen

Sums of binomial coefficients

Sums with one power

Explanation

The binomial theorem

(x+y)n=∑k=0n(nk)xkyn−k(x + y)^n = \sum_{k=0}^{n}\binom{n}{k}x^ky^{n-k}

holds for any numbers xx and yy. If we set x=1x = 1 and y=1y = 1, every term reduces to its coefficient, since 1k=11^k = 1 and 1n−k=11^{n-k} = 1, so

∑k=0n(nk)=2n\sum_{k=0}^{n}\binom{n}{k} = 2^n

That is, adding up the number of subsets of each size gives 2n2^n. This makes sense: (nk)\binom{n}{k} counts the subsets of size kk of a set with nn elements, and that set has 2n2^n subsets in all.

Keeping y=1y = 1 but choosing any number for xx works the same way:

Sums with one power

Theorem

For any number xx and any positive integer nn,

∑k=0n(nk)xk=(x+1)n\sum_{k=0}^{n}\binom{n}{k}x^k = (x + 1)^n

Note that xx can be negative. Setting x=−1x = -1 gives the alternating sum

∑k=0n(−1)k(nk)=(−1+1)n=0\sum_{k=0}^{n}(-1)^k\binom{n}{k} = (-1 + 1)^n = 0

Example

Evaluate ∑k=04(4k)3k\displaystyle\sum_{k=0}^{4}\binom{4}{k}3^k without adding the terms.

Solution

We match the general term of the sum to the general term of the theorem:

In the theoremIn this sumSo
(nk)\binom{n}{k}(4k)\binom{4}{k}n=4n = 4
xkx^k3k3^kx=3x = 3
yn−ky^{n-k}noney=1y = 1

A missing factor means that number is 11, since every power of 11 is 11.

So the sum equals

(3+1)4=44=256(3 + 1)^4 = 4^4 = 256

Practice questions

4 questions

What is the value of ∑k=05(5k)\displaystyle\sum_{k=0}^{5}\binom{5}{k}?

Select the correct answer:

+ 3 more questions

Sums with two powers

Explanation

We can use the binomial theorem to evaluate sums that have the same form as its expansion. To see how, consider

∑k=02(2k)3k22−k\sum_{k=0}^{2}\binom{2}{k}3^k2^{2-k}

We match its general term to the general term of the theorem,

(nk)xkyn−k\binom{n}{k}x^ky^{n-k}

and see that n=2n = 2, x=3x = 3 and y=2y = 2, so the sum is (3+2)2=25(3 + 2)^2 = 25.

The same works for any sum of this form.

Evaluating a sum of binomial coefficients

Procedure

  1. Match the general term to (nk)xkyn−k\binom{n}{k}x^ky^{n-k}: xx is the number whose power counts up with kk, and yy is the number whose power counts down. A missing factor means that number is 11.
  2. The sum equals (x+y)n(x + y)^n. Evaluate that single power.

Later we will meet probabilities of the form (nk)pk(1−p)n−k\binom{n}{k}p^k(1 - p)^{n-k}, where pp is a probability between 00 and 11. A sum of these terms has the same form, with x=px = p and y=1−py = 1 - p.

Example

Evaluate ∑k=03(3k)2k33−k\displaystyle\sum_{k=0}^{3}\binom{3}{k}2^k3^{3-k} without adding the terms.

Solution

We match the general term of the sum to the general term of the theorem:

In the theoremIn this sumSo
(nk)\binom{n}{k}(3k)\binom{3}{k}n=3n = 3
xkx^k2k2^kx=2x = 2
yn−ky^{n-k}33−k3^{3-k}y=3y = 3

So the sum equals

(2+3)3=53=125(2 + 3)^3 = 5^3 = 125

Practice questions

4 questions

What is the value of ∑k=05(5k)25−k\displaystyle\sum_{k=0}^{5}\binom{5}{k}2^{5-k}?

Select the correct answer:

+ 3 more questions