Ms1, Ms2 - Integer binomial expansion and combinations

Ms1, Ms2 - Integer binomial expansion and combinations

A long product can hide a very short coefficient calculation. You will use factorials and combinations to expand positive integer powers, find selected terms and explain the connection with binomial probabilities.

Factorials and binomial coefficients

Why is the coefficient of x2x^2 in (2+x)6(2+x)^6 much larger than 1515? In six brackets, you must select two positions for xx; the other four positions each contribute 22. Counting the positions is only the first job.

You already know

Each term in an expanded product comes from choosing one term from every bracket. In (a+b)2(a+b)^2, choosing aa then bb, or bb then aa, produces two contributions of abab.

A selection records which positions supply the variable term. Naming the selected positions in a different order does not change the selection.

Factorial and binomial coefficient

For a positive integer nn, n!=1×2×⋯×nn!=1\times2\times\cdots\times n, and 0!=10!=1. The coefficient nCr{}^nC_r counts ways of selecting rr distinct objects from nn, without regard to order. The notation (nr)\binom nr means the same count. Here we use selections of bracket positions and trial positions.

Selecting rr positions in order gives n(n−1)⋯(n−r+1)n(n-1)\cdots(n-r+1) possibilities. Each selection has r!r! different orderings, which must be removed.

Combinations for binomial coefficients

For integers n≥1n\ge1 and 0≤r≤n0\le r\le n,

nCr=n!r!(n−r)!,nC0=nCn=1.{}^nC_r=\frac{n!}{r!(n-r)!},\qquad{}^nC_0={}^nC_n=1.

The count also satisfies nCr=nCn−r{}^nC_r={}^nC_{n-r}, by selecting what is left out. The sheet prints the factorial ratio; the symmetry follows from it.

In the formula sheet.

Use a combinations key if you wish, but know what it counts: permutations would distinguish different orders.

Worked example 1: selecting two positions

Question. Find 6C2{}^6C_2, the number of ways to choose two variable-term positions from six brackets.

Plan. Use the factorial ratio and cancel 4!4!.

6C2=6!2!4!unordered selections=6×52×1=15cancel common factors\begin{aligned} {}^6C_2&=\frac{6!}{2!4!} &&\text{unordered selections}\\ &=\frac{6\times5}{2\times1}=15 &&\text{cancel common factors} \end{aligned}

Why divide by 22? Each pair has been counted in two orders.

Answer. 1515 selections.

Check. Counting by the smaller selected position gives 5+4+3+2+1=155+4+3+2+1=15.

Change only the selection size from two to four. The complementary positions offer a quicker way to think.

Worked example 2: selecting the positions left out

Question. Find 6C4{}^6C_4 and explain why it equals 6C2{}^6C_2.

Plan. Evaluate the count and identify the pair left out of each selection.

6C4=6!4!2!choose four positions=15=6C2the same factorial factors\begin{aligned} {}^6C_4&=\frac{6!}{4!2!} &&\text{choose four positions}\\ &=15={}^6C_2 &&\text{the same factorial factors} \end{aligned}

Why is the pairing exact? Each selection of four leaves precisely two positions, and each pair left out determines one selection of four.

Answer. Both counts are 1515.

Check. There is one way to choose no positions and one way to choose all six, so the same symmetry works at the endpoints.

The empty choice contributes the constant term of an expansion; it is a genuine single choice.

Watch out

Wrong: 0!=00!=0, which would make 6C0{}^6C_0 undefined. Right: 0!=10!=1, giving 6C0=1{}^6C_0=1. Do not substitute fractional exponents into this factorial count.

Use complementary position counts for eight brackets.

Pascal's triangle and a finite expansion

Pascal's triangle gives the coefficients before any powers of the bracket's terms are included. Each row begins and ends with 11; an interior entry is the sum of the two above it.

For example, 4C2=3C2+3C1=3+3=6{}^4C_2={}^3C_2+{}^3C_1=3+3=6. Either the fourth position is not selected, so choose two of the first three, or it is selected, so choose one of the first three. The diagram makes those two routes visible.

[DIAGRAM: asset_name: Pascal coefficients count bracket choices; caption: Pascal coefficients count bracket choices; asset_slug: h640-pascal-triangle; description: Pascal triangle from row 0 through row 6, with the two 3 entries in row 3 feeding the highlighted 6 in row 4 and the fourth-power row identified]
Pascal coefficients count bracket choices

For every chosen set of rr variable positions, multiply rr copies of bxbx and n−rn-r copies of aa.

Positive integer binomial expansion

For a positive integer nn,

(a+bx)n=an+nC1an−1(bx)+nC2an−2(bx)2+⋯+(bx)n.(a+bx)^n=a^n+{}^nC_1a^{n-1}(bx)+{}^nC_2a^{n-2}(bx)^2+\cdots+(bx)^n.

This is exact for every real xx. It is the printed (a+b)n(a+b)^n identity with bxbx replacing bb.

In the formula sheet.

The triangle also counts every possible success/failure pattern: row nn totals 2n2^n. For row 55, 1+5+10+10+5+1=321+5+10+10+5+1=32, the number of different strings of five binary outcomes. That doubling will explain a probability check later.

Worked example 3: a non-unit constant

Question. Expand (2+x)4(2+x)^4 in ascending powers of xx.

Plan. Use row 44, decreasing the power of 22 as the power of xx increases.

(2+x)4=24+4(23)x+6(22)x2+4(2)x3+x4use all five coefficients=16+32x+24x2+8x3+x4simplify\begin{aligned} (2+x)^4&=2^4+4(2^3)x+6(2^2)x^2+4(2)x^3+x^4 &&\text{use all five coefficients}\\ &=16+32x+24x^2+8x^3+x^4 &&\text{simplify} \end{aligned}

Why is the constant 1616? At x=0x=0, all four brackets supply 22.

Answer. 16+32x+24x2+8x3+x416+32x+24x^2+8x^3+x^4.

Check. At x=1x=1, the sum is 81=3481=3^4.

Keep the exponent and constant, changing only the sign of xx.

Worked example 4: the signed variable term

Question. Expand (2−x)4(2-x)^4 in ascending powers of xx.

Plan. Replace xx by −x-x in the same finite expansion.

(2−x)4=24+4(23)(−x)+6(22)(−x)2+4(2)(−x)3+(−x)4keep signs inside powers=16−32x+24x2−8x3+x4odd powers change sign\begin{aligned} (2-x)^4&=2^4+4(2^3)(-x)+6(2^2)(-x)^2+4(2)(-x)^3+(-x)^4 &&\text{keep signs inside powers}\\ &=16-32x+24x^2-8x^3+x^4 &&\text{odd powers change sign} \end{aligned}

Why keep the even terms positive? An even number of negative factors has positive product.

Answer. 16−32x+24x2−8x3+x416-32x+24x^2-8x^3+x^4.

Check. At x=2x=2, 16−64+96−64+16=016-64+96-64+16=0, matching (2−2)4(2-2)^4.

The coefficients are the counts multiplied by the powers of the chosen terms.

Watch out

Wrong: (2−x)4=1−4x+6x2−4x3+x4(2-x)^4=1-4x+6x^2-4x^3+x^4. This forgets the constant factors. Right: include 24−r2^{4-r} in the term containing xrx^r.

Change the magnitude of the variable term while retaining this structure.

Finding a particular term or coefficient

You can go straight to the required power. A contribution of xrx^r comes from selecting rr variable terms and n−rn-r constants, so its coefficient is nCran−rbr{}^nC_r a^{n-r}b^r. This is extracted from the supplied expansion, rather than a separate formula to learn.

The term contains xrx^r; the coefficient is the number multiplying it. In ascending powers, the constant comes first and the xrx^r term is in position r+1r+1.

Worked example 5: the opening puzzle

Question. Find the coefficient of x2x^2 in (2+x)6(2+x)^6.

Plan. Select two variable factors and retain the four constant factors.

coefficient of x2=6C2 24 12two selected positions=15×16=240include the constants\begin{aligned} \text{coefficient of }x^2&={}^6C_2\,2^4\,1^2 &&\text{two selected positions}\\ &=15\times16=240 &&\text{include the constants} \end{aligned}

Why is 1515 insufficient? Each of the 1515 selections contributes 16x216x^2, not just x2x^2.

Answer. The coefficient is 240240, so the term is 240x2240x^2.

Check. The six-bracket row starts 1,6,151,6,15, consistent with selecting two positions.

Now change only the requested power. Selecting an additional xx removes one factor of 22.

Worked example 6: the next power

Question. Find the coefficient of x3x^3 in (2+x)6(2+x)^6.

Plan. Select three variable factors and three constant factors.

coefficient of x3=6C3 23three of each type=20×8=160evaluate\begin{aligned} \text{coefficient of }x^3&={}^6C_3\,2^3 &&\text{three of each type}\\ &=20\times8=160 &&\text{evaluate} \end{aligned}

Why does the coefficient fall even though the count rises? Each individual contribution has halved, from 1616 to 88.

Answer. The coefficient is 160160; the term 160x3160x^3 is fourth.

Check. Counting ordered triples gives (6×5×4)/3!=20(6\times5\times4)/3!=20, agreeing with row 66.

For a signed variable coefficient, include its sign inside the power. For example, the x3x^3 coefficient in (3−2x)6(3-2x)^6 is 6C333(−2)3=−4320{}^6C_3 3^3(-2)^3=-4320. Its negativity comes from the odd power.

Exam tip

State the coefficient as a number. A displayed selection expression also shows which term you used, so a later arithmetic slip does not hide the method.

Change only the requested power again.

Why the same coefficients appear in probabilities

A string of successes and failures is another selection of positions. In four trials, exactly one success has four positions: SFFF, FSFF, FFSF and FFFS.

You already know

Independent trial probabilities multiply along one specified pattern. Mutually exclusive patterns have probabilities that add. With success probability pp, failure has probability 1−p1-p.

If all trials have the same success probability, patterns with the same success count have equal probability. The binomial coefficient counts how many such patterns there are.

Binomial success count

For a fixed positive integer nn, independent two-outcome trials and constant 0<p<10<p<1,

P(exactly r successes)=nCrpr(1−p)n−r,0≤r≤n.\mathrm P(\text{exactly }r\text{ successes})={}^nC_r p^r(1-p)^{n-r},\qquad0\le r\le n.

Here rr is an integer. At p=0p=0, all failures have probability 11; at p=1p=1, all successes have probability 11. Handle these endpoint cases directly, without substituting 000^0.

In the formula sheet.

The probability formula is the finite expansion with probability factors attached to each position selection.

Worked example 7: one success position

Question. Four independent trials each have success probability 0.20.2. Find the probability of exactly one success.

Plan. Calculate one pattern's probability, then count all possible success positions.

P(SFFF)=(0.2)(0.8)3=0.1024multiply independent factorsP(one success)=4C1(0.2)(0.8)3four disjoint patterns=0.4096add their probabilities\begin{aligned} \mathrm P(\mathrm{SFFF})&=(0.2)(0.8)^3=0.1024 &&\text{multiply independent factors}\\ \mathrm P(\text{one success})&={}^4C_1(0.2)(0.8)^3 &&\text{four disjoint patterns}\\ &=0.4096 &&\text{add their probabilities} \end{aligned}

Why multiply by 44? The success can occupy any of the four positions.

Answer. 0.40960.4096.

Check. The four pattern probabilities are all 0.10240.1024.

Change only the required count to two successes. The number of patterns now comes from pairs of positions.

Worked example 8: two success positions

Question. For the same four trials, find the probability of exactly two successes.

Plan. Multiply one two-success pattern's probability by 4C2{}^4C_2.

P(SSFF)=(0.2)2(0.8)2=0.0256one specified patternP(two successes)=6(0.0256)=0.1536six position pairs\begin{aligned} \mathrm P(\mathrm{SSFF})&=(0.2)^2(0.8)^2=0.0256 &&\text{one specified pattern}\\ \mathrm P(\text{two successes})&=6(0.0256)=0.1536 &&\text{six position pairs} \end{aligned}

Why not 44 patterns again? Two successes occupy a pair of positions, and 4C2=6{}^4C_2=6.

Answer. 0.15360.1536.

Check. For 0,1,2,3,40,1,2,3,4 successes, the probabilities are 0.4096,0.4096,0.1536,0.0256,0.00160.4096,0.4096,0.1536,0.0256,0.0016; their sum is 11, matching (0.8+0.2)4(0.8+0.2)^4.

If p=1/2p=1/2, every complete pattern has the same probability 1/2n1/2^n. Dividing a row total of 2n2^n by 2n2^n explains the total probability of 11 directly.

Watch out

Wrong: use pr(1−p)n−rp^r(1-p)^{n-r} for the complete success-count event. That is one pattern. Right: multiply by nCr{}^nC_r, provided the trials are independent and the success probability is constant.

Keep four trials and two successes, changing only the success probability.

Quick Recap

  • nCr{}^nC_r counts unordered position selections; 0!=10!=1 keeps the endpoint counts equal to 11.
  • Pascal's triangle records the finite expansion coefficients, but the bracket's constant and variable factors still need their powers.
  • One selected coefficient can be found without a complete expansion.
  • In binomial probabilities, count success positions and then multiply by each pattern's probability.

The opening coefficient is 240240: 1515 position selections, each contributing 24x2=16x22^4x^2=16x^2.