Simple expressions (also called formulas) have one or two numbers and only one mathematical operator (for example, 5 + 3). But most of the formulas you'll encounter in biostatistics are more complicated, with two or more operators.

You need to know the order in which to do calculations, because using different sequences of operations produces different results. Generally, the order in which you carry out the various operations appearing in a complicated formula is governed by the interplay of several rules, according to a set of priority rules referred to as a hierarchy.

Most computer programs try to follow the customary priority conventions that have been established over the years for typeset formulas, but some programs differ, so check the software's documentation.

Here's a typical set of operator hierarchy rules. Within each hierarchical level, operations are carried out from left to right in the expression:

1. Evaluate anything within parentheses (or brackets or curly braces or absolute-value bars) first.

This includes the parentheses that follow the name of a function.

2. In a typeset fraction, evaluate the numerator (everything above the horizontal bar) and the denominator (everything below the bar); then divide the value of the numerator by the value of the denominator.

3. Evaluate negation, factorials, powers, and roots.

4. Evaluate multiplication and division.