1
$\begingroup$

I have just downloaded a free ebook The Elements of Statistical Learning. It's been recommended by many so I decided to give it a go. But I found explanation on denoting variables confusing. In section 2.2, it says:

We will typically denote an input variable by the symbol $X$. If $X$ is a vector, its components can be accessed by subscripts $X_j$. Quantitative outputs will be denoted by $Y$, and qualitative outputs by $G$ (for group). We use uppercase letters such as $X$, $Y$ or $G$ when referring to the generic aspects of a variable. Observed values are written in lowercase; hence the $i$-th observed value of $X$ is written as $x_i$ (where $x_i$ is again a scalar or vector). Matrices are represented by bold uppercase letters; for example, a set of $N$ input $p$-vectors $x_i$, $i = 1,\dotsb,N$ would be represented by the $N×p$ matrix $\textbf{X}$. In general, vectors will not be bold, except when they have $N$ components; this convention distinguishes a $p$-vector of inputs $x_i$ for the $i$th observation from the $N$-vector $\textbf{x}_j$ consisting of all the observations on variable $X_j$. Since all vectors are assumed to be column vectors, the ith row of $X$ is $x^T_i$, the vector transpose of $x_i$.

What do $N$, $p$, $i$ and $j$ represent here? The most confusing is $i$ and $j$. I try to show how I understood it, although not 100% sure if I am correct.

I feel like $\textbf{X}$ (the matrix not generic variable) is defined as

$\textbf{X}=[x_1, x_2, \dotsb,x_i]^T$

with observed values $x_i$ where $i=1,\dotsb,N$ and $x_i=[v_{i1},v_{i2},\dotsb,v_{ip}]$, and $v_{ip}$ is some $p$ith scalar value from the observed vector $x_i$ I still don't understand what $j$ correspond to?

$\endgroup$
4
$\begingroup$

Maybe an example would help? Say we have 10 peoples' heights and weights. Now, we want to predict shoe size for each person.

N = 10
i = a particular person
Y = shoe size
p = 2 (height and weight)
j = 1 is height, j = 2 is weight. (or vice versa)
$x_i$ is the $i^{th}$ person
$X_j$ is the $j^{th}$ attribute across everyone. e.g. everyones' heights.
$X_{8,2}$ is the eighth person's weight

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.