![]() |
||
|---|---|---|
Links
Home · |
FactorialsThe factorial function (x! button, keys shift, ‘!’) calculates the factorial of the preceding expression: x!= x × (x − 1) × … × 1. This function is only defined for positive integers and for zero, with 0! = 1. If it encounters a negative integer or non-integer, it produces an error. Some day, I might extend it so that it calculates Γ( x + 1 ), where Γ is the complex Gamma function. The number of ways of arranging n objects in order is n!. PermutationsThe permutation function (nPr button, keys shift, ‘P’) calculates the number of ways of selecting r objects from n where order of selection is important. For example, 3P2 = 6 is the number of two digit numbers you can make from the digits 1, 2 and 3 without using any digit more than once: 12, 13, 21, 23, 31, 32. The function selects as n the preceding expression and as r the following one. If either n or r are negative integers or non-integers, or if n < r an error occurs. CombinationsThe combination function (nCr button, key ‘C’) calculates the number of ways of selecting r objects from n where order of selection is unimportant. For example, in the United Kingdom National lottery, contestants choose 6 numbers from 0, …, 49. Only one combination can win and order is not important; so there are 49C6 = 13983816 different sets of numbers to choose from and a probability of 1 / 13983816 of sharing in a winning ticket. The combination function is also important for calculating binomial coefficients, for example, for computing probabilities from the binomial distribution. The function selects as n the preceding expression and as r the following one. If either n or r are negative integers or non-integers, or if n < r an error occurs. Last modified: Sat 31 May 2008 01:10 pm |
|