Notes on Vectors

Definition

Context

Simple Linear Combinations

Aggregations

Sums, Means, Magnitudes

        

       

If a vector represents the coordinates of a point in euclidean space, the norm gives the distance from the center of the space

       

  • Advantage over the mean is that it works nicely with a mix of positive and negative numbers

Dispersion

  • standard deviation is calculated as

  • the SD is typical deviation of each value in a vector from the mean of the vector.
  • This is actually the true or population SD. Sometimes we divide by n-1 when calculating from a sample and trying to estimate the population SD
  • Another way to calculate it that makes this clear is by mean-centering the vector (obtaining x*) and then computing RMS of the meancentered variable:

  • the mean is the value that is least different from all values in the vector, when you define least difference as the sum of squared differences. The implication is that there is no value that you could replace x-bar with that would yield a smaller standard deviation.
  • The standard deviation of a vector x+b, where b is constant, is the same as the std dev of the the original vector x
  • the standard deviation of a vector mx where m is a constant, is just m times the std dev of the original vector

Dot products and Outer Products

The dot product of X and Y, or X×Y (or even simply XY), refers to multiplying xi by yi for each i and summing up the products. The result is a single value.

X = [1 1 2 2]

Y = [1 2 3 4]

X×Y = 1*1 + 1*2 +2*3 +2*4

One way to think of it is as the the weighted sum of the elements of Y, where the weights are given by X.

The outer product of two vectors is more complex and the result is a matrix. Consequently, we discuss this in more detail in a later lecture. For now, however, we just show that the outer product of X and Y is the following matrix:

1

1

2

2

2

2

4

4

3

3

6

6

4

4

8

8