Minggu, 17 Juli 2011

Using Pascal's Triangle

Using Pascal's Triangle

Heads and Tails

Pascal's Triangle can show you how many ways heads and tails can combine. This can then show you "the odds" (or probability) of any combination.
For example, if you toss a coin three times, there is only one combination that will give you three heads (HHH), but there are three that will give two heads and one tail (HHT, HTH, THH), also three that give one head and two tails (HTT, THT, TTH) and one for all Tails (TTT). This is the pattern "1,3,3,1" in Pascal's Triangle.
Tosses Possible Results (Grouped) Pascal's Triangle
1 H
T
1, 1
2 HH
HT TH
TT
1, 2, 1
3 HHH
HHT, HTH, THH
HTT, THT, TTH
TTT
1, 3, 3, 1
4 HHHH
HHHT, HHTH, HTHH, THHH
HHTT, HTHT, HTTH, THHT, THTH, TTHH
HTTT, THTT, TTHT, TTTH
TTTT
1, 4, 6, 4, 1
  ... etc ...  

Example: What is the probability of getting exactly two heads with 4 coin tosses?

There are 1+4+6+4+1 = 16 (or 24=16) possible results, and 6 of them give exactly two heads. So the probability is 6/16, or 37.5%

Combinations

The triangle also shows you how many Combinations of objects are possible.

Example: You have 16 pool balls. How many different ways could you choose just 3 of them (ignoring the order that you select them)?

Answer: go down to row 16 (the top row is 0), and then along 3 places and the value there is your answer, 560.
Here is an extract at row 16:
1    14    91    364  ...
1    15    105   455   1365  ...
1    16   120   560   1820  4368  ...

 

A Formula for Any Entry in The Triangle

In fact there is a formula from Combinations for working out the value at any place in Pascal's triangle:
It is commonly called "n choose k" and written like this:

 
Notation: "n choose k" can also be written C(n,k), nCk or even nCk.
Factorial Symbol The "!" is "factorial" and means to multiply a series of descending natural numbers. Examples:
  • 4! = 4 × 3 × 2 × 1 = 24
  • 7! = 7 × 6 × 5 × 4 × 3 × 2 × 1 = 5040
  • 1! = 1

So Pascal's Triangle could also be
an "n choose k" triangle like this:
(Note that the top row is row zero)
Pascals Triangle Combinations

Example: Row 4, term 2 in Pascal's Triangle is "6" ...

... let's see if the formula works:
Yes, it works! Try another value for yourself.
This can be very useful ... you can now work out any value in Pascal's Triangle directly (without calculating the whole triangle above it).

Polynomials

Pascal's Triangle can also show you the coefficients in binomial expansion:
Power Binomial Expansion Pascal's Triangle
2 (x + 1)2 = 1x2 + 2x + 1 1, 2, 1
3 (x + 1)3 = 1x3 + 3x2 + 3x + 1 1, 3, 3, 1
4 (x + 1)4 = 1x4 + 4x3 + 6x2 + 4x + 1 1, 4, 6, 4, 1
  ... etc ...  

The First 15 Lines

For reference, I have included row 0 to 14 of Pascal's Triangle
1
                                        1     1
                                     1     2     1
                                  1     3     3     1
                               1     4     6     4     1
                            1     5     10    10    5     1
                         1     6     15    20    15    6     1
                      1     7     21    35    35    21    7     1
                   1     8     28    56    70    56    28    8     1
                1     9     36    84    126   126   84    36    9     1
             1     10    45    120   210   252   210   120   45    10    1
          1     11    55    165   330   462   462   330   165   55    11    1
       1     12    66    220   495   792   924   792   495   220   66    12    1
    1     13    78    286   715   1287  1716  1716  1287  715   286   78    13    1
 1    14     91   364   1001  2002  3003  3432  3003  2002  1001   364   91    14    1

The Chinese Knew About It

This drawing is entitled "The Old Method Chart of the Seven Multiplying Squares". View Full Image
It is from the front of Chu Shi-Chieh's book "Ssu Yuan YĆ¼ Chien" (Precious Mirror of the Four Elements), written in AD 1303 (over 700 years ago, and more than 300 years before Pascal!), and in the book it says the triangle was known about more than two centuries before that.

The Quincunx

An amazing little machine created by Sir Francis Galton is a Pascal's Triangle made out of pegs. It is called The Quincunx.

Balls are dropped onto the first peg and then bounce down to the bottom of the triangle where they collect in little bins.
At first it looks completely random (and it is), but then you find the balls pile up in a nice pattern: the Normal Distribution.

Tidak ada komentar:

Posting Komentar