Section 7: Formulas and Functions

A formula is a mathematical rule for doing a specific calculation. It's generally stated in symbolic and equation form.

Example 24 d = rt is used to express "distance equals rate times time".
Example 25 P = 21 + 2w is used to express "Perimeter of a rectangle equals two times length plus two times width".
Example 26
i= Prt tells how much simple interest a principle investment will earn in a given time.

You use a formula by replacing the variable(s) with the value(s) you know and calculating the value(s) for the variable(s) you don't know. Consider the perimeter formula. If I know the length is 5 feet and the width is 3 feet, I can substitute these into the formula and get P = 2(5) + 2(3). Then, following the order of operations, I can calculate the perimeter to be 16 feet.

Sometimes, however, a formula isn't in the form we want. Consider the perimeter formula again. Perhaps I know the perimeter is 20 feet and the width is 3 feet. Then I would want to know the length. When I substitute the known values into the formula I get 20 = 21+2(3). Using algebra, I can "solve" this for I. Another option would have been to "solve" the original formula for 1 and get a new formula. The next section covers the algebraic skills needed to do this.

A function is a particular type of formula. The main idea to keep in mind is "input" and "output". A function is a formula with a particular input variable (or variables) and particular output variable (or variables). Generically speaking, y is the output, x is the input, and f is the function. When you see y = f(x) that means that x is input into a function formula f and y is the output. In words we say "y equals f of x". For example if f(x) = 2x +5 then y = f(x) means that we take any input x, multiply it by 2, add 5 to the answer, and get a y output. In this case f(3) is 2(3) +5 or 11. Then y = 11.

Although most of the functions in basic probability and statistics will only have a single input in their formulas, other functions can have multiple inputs. For example, the perimeter formula used before is a function with two inputs, l and w. We could write it Perimeter = P(l, w) = 21 +2w.

An important rule about functions is that a function cannot get different outputs for a single input or set of inputs. Let's stick with the perimeter example. If I use 5 and 4 as inputs, P(5,3) = 2(5) +2(4) = 10 +8 = 18. If I try it again tomorrow with 5 and 4 again, I'll get 18 again. The numbers 5 and 4 make a single set of inputs, so if this is a function, they cannot give me a different output. Notice that this is a one way rule. There is not a similar restriction on outputs. A single output can be obtained by different inputs. For example P(6,3) = 2(6) + 2(3) is also equal to 18.

This is a subtle point and sometimes confusing. Look at bold words in the previous paragraph. Different outputs with single input is a no-no. A single output with different inputs is OK.

Return to Contents

Move on to Section 8