Functions for formulas

Minitab includes several functions for formulas.

Absolute value (ABS)

The absolute value function changes all negative numbers to positive numbers. Positive numbers and 0 are not changed.

The common notation for absolute value in mathematical writing is | | . For example, | -14 | equals 14.

Syntax

ABS(number)

For number, specify a number or a column of numbers from which to calculate the absolute value.

Examples

Formula Result
ABS(-23.5) 23.5
ABS(0.34) 0.34

Uses

The absolute value function is useful for assessing the magnitude of values (such as the bias in a measurement system and the effects of factors on a response) apart from their direction.

Combinations

The combinations function calculates the number of combinations of n items chosen k at a time. A combination is a selection of objects from a group, when the order of the selection does not matter. For example, the combinations of the letters abcd taken three at a time are abc, abd, acd, bcd. The subgroups abc and bca are considered the same combination, because order does not matter.

The combinations function is used in the formula to calculate the probability of observing k events (successes) in n trials in an experiment with only two outcomes (a binomial experiment).

Syntax

COMBINATIONS(number of items, number to choose)

Specify an integer or column of integers for the number of items and the number to choose. The number of items must be greater than or equal to 1, and the number to choose must be greater than or equal to 0.

Example

A researcher conducts a study with three people, but there are ten people willing to participate. The researcher wants to know how many combinations of three people can be chosen for the study.

Formula Result
COMBINATIONS(10, 3) 120

Concatenate

The concatenate function combines two or more text columns side-by-side and stores them in a new column.

Syntax

CONCATENATE(text, text, ...)

For text, specify the columns or text values to combine. Text values must be enclosed in double-quotes. Minitab treats the values in numeric columns as text characters.

Example

A human resources assistant wants to combine a column of first names with a column of last names. The assistant enters the expression CONCATENATE(C1, " ", C2) to create a column that contains the first name, followed by a space, followed by the last name. Text values, such as the space in this example, must be enclosed in double-quotes.

C1 C2 C3
First name Last name Name
Sarah Jenkins Sarah Jenkins
Rick Salazar Rick Salazar
Jasmine Evra Jasmine Evra

Exponential (EXP)

The exponential function calculates the value ex, where e is the base of the natural log equal to approximately 2.71828 and x is the value that you enter. For example, the exponential of 5 is e5, which equals about 148.413. Usually, the function y = ex is called the natural exponential function.

Syntax

EXP(number)

For number, specify a number or a column of numbers.

Example

Formula Result
EXP(2) 7.38905609893

Uses

The exponential function is often used to model amounts (such as compound interest, radioactive decay, or population growth) that increase or decrease by a constant exponential factor.

y = EXP(x)

As x increases, y increases exponentially.

Factorial

The factorial function calculates the factorial of a nonnegative integer, n. The factorial of n is the product of all the consecutive integers from 1 to n, inclusive. The notation n! is used to represent the factorial. For example, 5! = 1* 2 * 3 * 4 * 5 = 120. By definition, 0! = 1.

Syntax

FACTORIAL(number of items)

The value of number of items must be greater than or equal to 0. You can enter a column or constant. Missing values are not allowed.

Example

Formula Result
FACTORIAL(6) 720

Uses

Use factorials to calculate:
  • Probabilities, such as the chance of observing a certain number of successes in a binomial experiment (where each trial results in one of two outcomes). For example, if a drug is effective for 90% of patients, the probability that all five patients in a sample who take the drug will respond to the drug is 5!/(5!0!) (0.9)5(0.1)0 = 0.590 or 59%.
  • Permutations, the number of possible ways to order the elements in a set. For example, there are 3! or 6 ways to order a set of 3 items. Permutations are important in computer security and data encryption.

If

The if function chooses which of two values to return based on whether a condition is true or false.

Syntax

IF(test, value if true, [value if false])

For test, specify the condition, and for value if true, specify the value to return if the condition is true. Conditions can be any numerical or logical expressions. The third argument, value if false, is optional and lets you specify a value to return if the condition is false. If you don't specify value if false, Minitab returns a missing value.

Example

To change a column of 0's and 1's to "male" and "female", enter the expression IF(C1=1, "male", "female").

C1 C2
  Expression
0 female
1 male
0 female
1 male
0 female

Log base 10 (LOGTEN)

The log base 10 function calculates the exponent to which 10 must be raised to equal a given number. For example, 102 = 100, so LOGTEN(100) = 2. LOGTEN is defined only for positive numbers. When you multiply a number by 10, you increase its log by 1. When you divide a number by 10, you decrease its log by 1.

Syntax

LOGTEN(number)

For number, specify a number or a column of numbers. Minitab computes the value x such that 10x = the number. If you enter 0 or a negative number, Minitab stores a missing value *.

Example

Formula Result
LOGTEN(0.01) -2
LOGTEN(0.1) -1
LOGTEN(1) 0
LOGTEN(10) 1
LOGTEN(100) 2

Uses

In statistics, you can use the log base 10 function to transform data for any of the following purposes:
  • To make positively skewed data appear more normal
  • To account for curvature in a linear model
  • To stabilize variation within groups
Histogram of x
Histogram of LOGTEN(x)
Example of transforming data to make it appear more normal

In the original graph, the data are positively skewed, as shown by the values far out on the right (upper) tail. The LOGTEN transformation compresses the upper tail and stretches out the lower tail, making the transformed data appear more normal.

Individual value plot of x
Individual value plot of LOGTEN(x)
Example of transforming data to stabilize variation within groups

In the original individual value plot, Group 1 has larger values and thus appears to have greater within-group variability. After the data are transformed, the variation within groups is much more similar.

Maximum (MAX) and minimum (MIN)

The maximum function identifies the largest value in a column. The minimum function identifies the smallest value in a column.

Syntax

Function Syntax
Maximum MAX(number)
Minimum MIN(number)

For number, specify a column of numbers.

Examples

Columns Formula Result
C1 contains 6, 3, 15 MAX(C1) 15
C1 contains 22, 3, 7 MIN(C1) 3

Mean (MEAN)

The mean function calculates the arithmetic average, which is the sum of all the observations divided by the number of observations.

Syntax

MEAN(number)

For number, specify a column of numbers.

Examples

Column Formula Result
C1 contains 6, 3, 15 MEAN(C1) 8

Uses

Use the mean function to describe an entire set of observations with a single value that represents the center of the data. Many statistical analyses use the mean as a standard reference point.

Median (MEDIAN)

The median function calculates the middle value of the data. Half the observations are less than or equal to the median. Half the observations are greater than or equal to the median.

If the data set contains an odd number of values, then the median is the middle value in the ordered data set. If the data set contains an even number of values, the median is the average of the two middle values. For example, for the set of numbers 1, 2, 3, 21, 35, 42, the median is the average of the two middle values (3 and 21), which is 12.

Syntax

MEDIAN(number)

For number, specify a column of numbers.

Examples

Column Formula Result
C1 contains 6, 3, 15 MEDIAN(C1) 6

Uses

Use the median function to describe an entire set of observations with a single value that represents the center of the data.

Compared to the mean, the median is less sensitive to extreme data values. Thus, the median is often a more informative measure of the center of skewed data. For example, the mean may not be a good statistic for describing salaries within a company. The relatively high salaries of a few top earners inflate the overall average, giving a false idea of salaries at the company. In this case, the median is more informative. The median is equivalent to the 2nd quartile or the 50th percentile.

N missing (NMISS), N nonmissing (N), and N total (COUNT)

The N functions are as follows:
  • N missing: The number of cells in a column that contain missing values.
  • N nonmissing: The number of cells in a column that contain actual data.
  • N total: The total number of observations in a column. N total is equal to the sum of N missing and N nonmissing.

Syntax

Function Syntax
N missing for a column NMISS(number)
N nonmissing for a column N(number)
N total for a column COUNT(number)

For number, specify a column.

Examples

Column Formula Result
C1 contains *, 3, *, 7 NMISS(C1) 2
C1 contains *, 3, 4, *, 5 N(C1) 3
C1 contains 6, 3, *, 12 COUNT(C1) 4

Natural log (LN)

The natural log (also called log base e) function calculates logarithms to the base e, where e is a constant that is equal to approximately 2.71828. The natural log of any positive number, n, is the exponent, x, to which e must be raised so that ex = n. For example, e2 = 7.389, so the natural log of 7.389 is 2.

y = LN(x)

Syntax

LN(number)

For number, specify a number or a column of numbers. Minitab calculates the value x such that ex =number. If you enter 0 or a negative number, Minitab stores a missing value symbol *.

Example

Formula Result
LN(7.38905) 2

Uses

You can use the natural log function in many ways, such as modeling exponential growth in biological populations and in financial theory, and calculating radioactive decay.

In statistics, the natural log can be used to transform data for the following reasons:
  • To make moderately skewed data more normally distributed or to achieve constant variance
  • To allow data that follow a curved pattern to be modeled using a straight line (as in simple linear regression)
  • To stabilize variation when you estimate standard deviations

The natural log is also used in the calculation of probability density functions for many distributions.

Percentile

The percentile function calculates percentiles for a sample. Percentiles divide the data set into parts. Usually, the nth percentile has n% of the observations below it, and (100-n)% of observations above it.

For example, in the following graph, 25% of the total data values lie below the 25th percentile (red region), while 75% lie above the 25th percentile (white region).

Syntax

PERCENTILE(number, probability)

Calculates the sample percentile, for a specified probability and number (the column containing the sample data). Missing values are ignored. The probability can be a number between 0 and 1, or a column of numbers between 0 and 1. For example, to determine the 1st quartile (25th percentile) for the data in column C1, enter C1 and 0.25.

Example

Column Formula Result
C1 contains 2, 3, 5, and 7 PERCENTILE (C1, 0.25) 2.25

Formula

Minitab uses the empirical percentile function:

Notation
TermDescription
p the percentage of data less than or equal to the desired percentile, divided by 100
Xy the yth row of the data when the data are sorted from least to greatest
ythe truncated value of w
wp(N+1)
Nthe number of rows with nonmissing data
zw-y

Permutations

The permutation function calculates the number of permutations of n items chosen k at a time. A permutation is an ordered arrangement of objects from a group without repetitions. For example, there are six ways to order the letters abc without repeating a letter. The six permutations are abc, acb, bac, bca, cab, cba.

Permutations are used to calculate the probability of an event in an experiment with only two possible outcomes (binomial experiment).

Syntax

PERMUTATIONS (number of items, number to choose)

Specify an integer or a column of integers for the number of items and the number to choose. The number of items must be greater than or equal to 1, and the number to choose must be greater than or equal to 0.

Example

Suppose 10 people enter a contest. How many different ways can 1st, 2nd, and 3rd place be awarded when order is important?

Calculation expression Result
PERMUTATIONS (10, 3) 720

Formula

Usually, the number of permutation of n items chosen k at a time is:

Other uses

Permutations can also be used to determine the number of possible ways to order a group of letters or digits, which has applications in coding. Combinations and permutations, known as combinatorics, play an important role in network engineering, computer science (cryptography), molecular biology (pattern analysis), and other fields.

Range (RANGE)

The range function calculates the difference between the maximum value and the minimum value.

Syntax

RANGE(number)

For number, specify a column of numbers.

Examples

Column Formula Result
C1 contains 6, 3, 15 RANGE(C1) 12

Round (ROUND)

The round function rounds a number based on the number of decimal places you specify.

Syntax

ROUND(number, decimals)

For number, specify a number or a column of numbers that you want to round. For decimals, specify an integer.

Examples

Calculator expression Result
ROUND(2.136, 0) 2
ROUND(2.136, 1) 2.1
ROUND(2.136, 2) 2.14
ROUND(-2.136, 1) -2.1
ROUND(253.6, -1) 250
ROUND(253.6, -2) 300

Square root (SQRT)

The square root function calculates, for any nonnegative number , the number n such that . The common notation for the square root of is or . The following is an example of the notation:

Syntax

SQRT(number)

For number, specify a number or a column of numbers. If you enter a negative number, Minitab returns a missing value.

Examples

Formula Result
SQRT(64) 8
SQRT(0.25) 0.5

Standard deviation (STDEV)

The standard deviation function measures the dispersion of the data about the mean. Whereas the range estimates the spread of the data by subtracting the minimum value from the maximum value, the standard deviation approximately estimates the "average" distance of the individual observations from the mean. Larger standard deviation values indicate a greater spread in the data.

Syntax

STDEV(number)

For number, specify a column of numbers.

Example

Column Formula Result
C1 contains 6, 3, 15 STDEV(C1) 6.245

Sum (SUM)

The sum function adds two or more numbers.

Syntax

SUM(number)

For number, specify a column of numbers.

Examples

Column Calculator expression Result
C1 contains 6, 3, 15 SUM(C1) 24

Sum of squares (SUMSQ)

The sum of squares function squares each value and calculates the sum of those squared values. That is, if the column contains x1, x2, ... , xn, then sum of squares calculates (x12 + x22 + ... + xn2).

Syntax

SUMSQ(number)

For number, specify a column of numbers.

Example

Column Formula Result
C1 contains 6, 3, 15 SUMSQ(C1) 270
By using this site you agree to the use of cookies for analytics and personalized content.  Read our policy