# Finite Improbability Calculator

by Wesley R. Elsberry

Page created: 2002/04/02  Last Updated: 2002/04/03

Does reading William A. Dembski's "No Free Lunch" have you reaching for the CRC Standard Math Tables or a weighty statistics tome or two just to recall the operations for changing bases or the formula for calculating combinations?  This page is aimed to help you out by making the most common operations easily accessible through your web browser.  In addition, I plan on implementing the various formulae given by Dembski in "No Free Lunch" so that anyone can, as he put it, "do the calculation".

Usage: Put in the requested values and push the button.  The results will appear in a separate browser window.

 FACTORIAL Enter a positive integer in the box: CHANGE OF BASE Old Base Exponent New Base PERMUTATION & COMBINATION Total elements Selected elements PORIG APPROXIMATION (p.301) & M/N RATIO APPROXIMATION (p.297) Perturbation tolerance: Perturbation identity: Number of symbols: Length of string: PLOCAL CALCULATION (p.293) Number of items in system (e.g., 50): Number of copies of each item (e.g., 5): Number of possible substitutions per item (e.g., 10): Total number of items available (e.g., 4289): DCO PPERTURB APPROXIMATION (pp.299 & 300) Number of subunits (N): Different types of subunits (k): Perturbation tolerance factor (q): Perturbation identity factor (r):

Notes on calculations

Factorial:  The point here is to permit calculation of factorial(n) where n can be a large number, say the number of proteins which an organism codes for.  However, even a "double" floating-point number overflows at 1.7e308.  So factorials are calculated here using a logarithmic representation.  The Stirling approximation is used for very large n, and a logarithmic version of the classical iterative method is used for smaller n.  Stirling's approximation is taken as

n! ~ n^n e^(-n) sqrt(2 * pi * n) (1 + 1/(12n))

Change of base: Calculated as

new exponent = (old_exponent * ln(oldbase)) / ln(newbase)

Permutation and combination: Uses the factorial function discussed above.

permutations =  n! / (n - k)!

combinations = n! / k!(n - k)!

porig approximation (as per NFL p.301):

porig ~ symbols^(-length (perturbation_tolerance - perturbation_identity))

The discussion on page 301 implies that functional proteins may themselves be considered "discrete combinatorial objects" to which this formula would apply.  With a little exploration, then, one can verify that any functional protein of length 1153 or greater has an origination probability smaller than Dembski's "universal small probability".

plocal calculation (as per NFL p.293):

plocal = (units in system * substitutions / total different units) (units in system * copies)

M/N ratio approximation (as per NFL p.297):

M/N ratio ~ ((combinations(length, tolerance * length) * (symbols-1)(tolerance * length)) / (combinations(length, identity * length) * (symbols-1)(identity * length)))

There is a discrepancy between the result which Dembski reports for his example calculation of an M/N ratio on p.297 and what the Finite Improbability Calculator reports.  Plug in symbols=30, length=1000, tolerance=0.1, and identity=0.2 and the result comes out as 5.555117e-223, whereas Dembski reports 10^-288, or a factor of 10^-65 off.  Jeff Shallit noted this error in Dembski's text some time back.

DCO pperturb approximations (as per NFL pp.299 and 300):

pperturb (p.299) ~ ((combinations(length, tolerance * length) / (combinations(length, identity * length)) * (symbols-1)(length * (tolerance - identity))

pperturb (p.300) ~ (symbols)(length * (tolerance - identity))

The name of this page was inspired by "The Hitchhiker's Guide to the Galaxy" by the late great Douglas Adams.