Section 1.3 - Vectors as Data
A vector does not have to represent a physical quantity such as displacement or velocity. It can also be used to represent data. Whenever we have a collection of numerical measurements associated with an object, observation, or individual, we can organize those measurements into a vector.
For example, suppose you want to describe the sales of different products by a store:
- grocery sales
- household goods sales
- office supply sales
We could represent one location by the vector
$$x=\begin{bmatrix}8152 \\ 2015 \\ 1520\end{bmatrix}$$A second store could be represented by
$$y=\begin{bmatrix}9252 \\ 3115 \\ 2511\end{bmatrix}$$These vectors can now be treated mathematically applying vector rules. For example, their sum
$$x+y=\begin{bmatrix}8152 \\ 2015 \\ 1520\end{bmatrix} + \begin{bmatrix}9252 \\ 3115 \\ 2511\end{bmatrix} = \begin{bmatrix}17404 \\ 5130 \\ 4031\end{bmatrix}$$ represents the total sales in each category across the two stores.
It's important not to take the physical interpretation too far. For example, a vector could contain information about individual employees like their birthdays and salaries. In that case, the sum of the vectors wouldn't have a natural physica meaning in the 'space' of company employees.
Scalar Multiplication
In statistical analysis, specifically when doing probability based calculations, analysts often want to take the available data and 'normalize' it. This means turning it into a probabiity distribution where the sum of all the values is 1. This can be done in vector terms by dividing every element of the vector by the sum of the vector's values. For example,
$$y=\begin{bmatrix}9252 \\ 3115 \\ 2511\end{bmatrix}$$would become
$$y' = \frac{1}{14878}\begin{bmatrix}9252 \\ 3115 \\ 2511\end{bmatrix}=\begin{bmatrix}0.621857777 \\ 0.209369539 \\ 0.168772685\end{bmatrix}$$Vectors as Points in a Data Space
The most interesting interpretation comes from returning to the geometric viewpoint. A three-dimensional data vector such as
$$y = \begin{bmatrix}8 \\ 5 \\ 87 \end{bmatrix}$$could represent the number of dramas, comedies and action movies a viewer of a streaming system has watched. The geometric representation of these vectors for the customer base of the company is called the feature space. Two customers with similar tastes are going to appear close together in the space where customers with significantly different tastes will be far apart. This gives us a powerful new way to interpret geometry: distance represents degree of similarity. Based on these results, recommendations can go beyond single category classifications of media to classifications that score content on multiple attributes.
That leads naturally to questions that we'll take up later in the course such as:
- How should we measure similarity?
- Should every feature have equal importance?
- What if one measurement is in dollars and another is in years?
- What if one feature has values between 0 and 1, while another ranges from 0 to 1,000,000?
- Can we find a smaller number of dimensions that captures most of the information?



