Overview
Notation
We will use n to represent the number of distinct data points, or observations.
Let
p denote the number of variables that are available for use in making predictions.We will let xij represent the value of the j th variable for the
i th observation, where i=1, 2, …, n , j=1, 2, …, p .We let X denote a n×p matrix whose (i,j) th element is xij .That is,
X=⎛⎝⎜⎜⎜⎜⎜x11x21⋮xn1x12x22⋮xn2……⋱…x1px2p⋮xnp⎞⎠⎟⎟⎟⎟⎟We denote xi as the i th row of
X . xi is a vector of length p ,, containing thep variable measurements for the i th observation. That is,
xi=⎛⎝⎜⎜⎜⎜xi1xi2⋮xip⎞⎠⎟⎟⎟⎟ If we are interested in the columns of X , which we will write as x1, x2, …, xp . That is,
- If we use these notations, we can write
X
as
X=(x1x2…xp)
The T notation denotes the transpose of a matrix or vector. For example,
XT=⎛⎝⎜⎜⎜⎜⎜x11x12⋮x1px21x22⋮x2p……⋱…xn1xn2vdotsxnp⎞⎠⎟⎟⎟⎟⎟
while
xTi=(xi1xi2…xip)We use yi to denote the i th observation of the variable on which we wish to predict. Hence, we write the set of all
n observations in vector form as
y=⎛⎝⎜⎜⎜⎜y1y2⋮yn⎞⎠⎟⎟⎟⎟We always denote a vector of length n in lower case bold e.g.
a=⎛⎝⎜⎜⎜⎜a1a2⋮an⎞⎠⎟⎟⎟⎟If a vector not of length n will be denoted in lower case normal font, e.g. a .
Matrix will be denoted using bold capitals, such as
A .Random variables will be denoted using capital normal font, e.g. A , regardless of their dimensions.
To indicate that an object is a scalar, we will use the notation
a∈R . To indicate that it is a vector of length k , we will usea∈Rk . We will indicate that an object is a r×s matrix using A∈Rr×s .Suppose that A∈Rr×d and B∈Rd×s . Then the product of A and B is denoted AB . That is, (AB)ij=∑dk=1aikbkj . As an example, consider
A=(1324) and B=(5768)
Then
AB=(1324)(5768)=(1×5+2×73×5+4×71×6+2×83×6+4×8)=(19432250)