Chapter 20 Notation
Throughout the course standard notation is used in order to express the ideas and concepts in a precise and concise mathematical representation. This section describes the notation which is used and provides a reference as you work through the module. The R functions associated with some of the mathematical operators are listed.
20.1 Summation
\[\sum_{i=1} ^{n} x_i = x_1 + x_2 + ... + x_n\]
Example Suppose we have collected the ages of five primary school children and the ages are 5, 6, 7, 9 and 10. Let \(x\) represent age, then the total age will be
\[ \sum_{i=1}^{n=5}x_i = 5 + 6 + 7 + 9 + 10 = 37\] Usage Occurs frequently in statistical expressions, such as the sample mean.
R function sum
20.2 Factorial
\[n! = 1 \times 2 \times 3 \times ... \times n\]
Example Suppose, we have a sample of five so that \(n = 5\), thus
\[5! = 1 \times 2 \times 3 \times 4 \times 5 = 120 \]
Usage This notation is used in the formula for calculating combinations of samples (see below).
R function factorial
20.3 Combinations
\[{n \choose r} = \frac{n!}{r!(n-r)!} \]
Example How many ways are there to choose 2 objects from a set of 4 objects. \[{4 \choose 2} = \frac{4!}{(4-2)!2!} = 6\]
Usage This notation is used when calculating the possible numbers of combinations of samples (when order does not matter).
R function choose
20.4 Multiplication
\[\prod_{i=1} ^{n} x_i = x_1 \times x_2 \times ...\times x_n\] Example We want to multiply together the following numbers 2, 3 and 4. Let \(x_i\) represent the three numbers.
\[\prod_{i=1} ^{3} x_i = 2 \times 3 \times 4 = 24\]
Usage Probability calculations.
R function prod
20.5 Integration
\[\int_a^b f(x) dx \]
This notation means integrate the function specified by \(f(x)\) between the limits \(a\) to \(b\).
Usage Used to calculate the area under curves, for example in hypothesis testing to calculate \(p\)-values.
20.6 Matrix multiplication
For matrix multiplication the number of columns in the first matrix must equal the number of rows in the second matrix. It is best illustrated with an example.
\[
\left[\begin{array}
{ccc}
1 & 2 & 3 \\
4 & 5 & 6 \\
\end{array}\right]
\left[\begin{array}
{cc}
7 & 8\\
9 & 10 \\
11 & 12 \\
\end{array}\right]
=
\left[\begin{array}
{cc}
58 & 64 \\
139 & 154 \\
\end{array}\right]
\]
where \[ 58 = 1 \times 7 + 2 \times 9 + 3 \times 11\] \[ 64 = 1 \times 8 + 2 \times 10 + 3 \times 12\] \[ 139 = 4 \times 7 + 5 \times 9 + 6 \times 11\] \[ 154 = 4 \times 8 + 5 \times 10 + 6 \times 12\]
Usage Efficient description of linear models.
20.7 Absolute values
An absolute value, or modulus, is the non-negative value of a number \(x\) without regard to its sign. It is denoted by \(|x|\). For example \(|5| = 5\) and \(|-5| = 5\).
R function abs
20.8 \(\pi\)
\(\pi\) is a mathematical constant - the ratio of a circle’s circumference to its diameter. It’s value is 3.14159.
R function pi
20.9 Exponential function, \(e\)
\(e = 2.718\) is the natural exponential function, often used \(e^x\).
Example \[e^2 = 7.389\]
Usage Used to describe a quantity that increases, or decreases, at a rate that is proportional to its value, for example, the probability mass function to describe a Poisson random variable.
R function exp
20.10 Scientific notation
Scientific notation is a way of expressing numbers that are too large or too small to conveniently write in decimal form. In R, a number is expressed as a decimal and an exponent, separated by e
(not to be confused with the exponential function). Some examples are given below.
20.11 Intervals
Parentheses \((.)\) and square brackets \([.]\) are used to indicate an interval. The notation \([a, b]\) is used to indicate a set of numbers from \(a\) to \(b\) and including \(a\) and \(b\). The notation \((a, b)\) indicates the set of numbers from \(a\) to \(b\) but excluding \(a\) and \(b\). Thus, [3, 8) will be the set of numbers from, and including 3, to 8 but not including 8.
20.12 Axes on plots
\(x\)-axis - the horizontal axis generally used for the explanatory variable.
\(y\)-axis - the vertical axis generally used the response variable.
20.13 Probability
Notation is used when expressing probability and probability rules. A few symbols are provided here.
\(\mathcal{S}\) or \(\Omega\) - sample space
\(\emptyset\) - empty set
\(\cap\) - ‘and.’ For example, If \(A\) and \(B\) are two events, then \(A \cap B\) is interpreted as \(A\) and \(B\).
\(\cup\) - ‘or.’ For example, \(A \cup B\) is interpreted as \(A\) or \(B\).