# 37. Appendix G Vectors and Vector Statistics

In this appendix, we discuss some basic properties of vectors, concentrating on the two-dimensional case. To keep the discussion simple, we will assume we are using a Cartesian coordinate system.

Traditionally, vectors have been defined as quantities having both magnitude and direction, exemplified by a directed line segment. The magnitude of the vector is shown by the length of the segment, and the direction of the vector is usually shown by drawing an arrowhead on one end of the segment. Computers (and, in the author’s experience, people) are usually more comfortable working with numbers, and so instead of the usual graphical definition of a vector, we will take the definition used in analytic geometry: A (two-dimensional) vector is an ordered pair of numbers. We will use boldface type to denote vectors, and so we can write

to show that the vector \(\mathbf{v}\) consists of the ordered pair of numbers *a* and *b*. The number *a* is called the first (or *x*) component of \(\mathbf{v}\), and *b* is called the second (or *y*) component. Vector addition is performed component-wise: \((a, b) + (c, d) = (a + c, b + d)\), and similarly for subtraction. If \(\alpha\) is a scalar, then we define multiplication by the scalar \(\alpha \text{ as } \alpha (a, b) = (\alpha a, \alpha b)\), and similarly for division by a (nonzero) scalar.

The *norm* (or length, or magnitude) of a vector \(\mathbf{v} = (a, b)\), is

Note that \(|\mathbf{v} | = 0\) if and only if \(a = b = 0\), in which case we say that \(\mathbf{v}\) is the *zero vector*. If \(\alpha\) is a scalar, then

The most important relation between vectors and their norms is given by the *triangle inequality*:

In some cases, only the direction of a vector is of interest, and in such cases we can replace a nonzero vector \(\mathbf{v}\) by the unique vector \(N(\mathbf{v})\) that has the same direction as \(\mathbf{v}\), but has norm 1:

The vector \(N(\mathbf{v})\) will be called the *unit vector* corresponding to \(\mathbf{v}\), or more simply the *direction* of \(\mathbf{v}\). Note that the zero vector has no direction.

Since vectors are characterized by magnitude (norm) and direction, this gives two ways to compare vectors: we can compare either their magnitudes or their directions. If \(\mathbf{v} \text{ and } \mathbf{w}\) are vectors, then we can compare their norms by either taking the norm of the difference \(| \mathbf{v} - \mathbf{w}|\) or the difference of the norms \(| \mathbf{v}| - |\mathbf{w}|\). It’s not always made clear in verification studies which of these is meant, and in general these two quantities will be different. However, by making use of the triangle inequality it can be shown that there is a relation between them. To derive this, let \(\mathbf{z} = \mathbf{v} - \mathbf{w}\), from which we get \(\mathbf{v} = \mathbf{w} + \mathbf{z}\). Now taking norms and using the triangle inequality,

which gives

Reversing the roles of \(\mathbf{v} \text{ and } \mathbf{w}\) now gives the result:

In the same manner, we can compare the directions of two different nonzero vectors \(\mathbf{v} \text{ and } \mathbf{w}\) by either the direction of the difference \(N(\mathbf{v} - \mathbf{w})\), or by the difference in the directions \(N(\mathbf{v}) - N(\mathbf{w})\). Unlike the case for magnitudes, however, there is in general no relationship at all between these two measures of direction difference.

Now let us specialize this discussion of vectors to verification of wind vector data. We will denote the forecast wind vector by \(\mathbf{F}\), and the observed wind vector by **O**. These are two-dimensional horizontal vectors with *u* and *v* components as follows:

We will assume that we have *N* observations of forecast and observed wind:

for \(1 \leq i \leq N\). We also have the forecast and observed wind *speeds*:

and, at each data point,

It will be convenient to denote the average forecast and observed wind vectors by \(\mathbf{F}_a \text{ and } \mathbf{O}_a\):

Now let us look at the definitions of the vector statistics produced by MET:

FBAR and OBAR are the average values of the forecast and observed wind speed.

FS_RMS and OS_RMS are the root-mean-square values of the forecast and observed wind speeds.

MSVE and RMSVE are, respectively, the mean squared, and root mean squared, lengths of the vector difference between the forecast and observed wind vectors.

FSTDEV and OSTDEV are the standard deviations of the forecast and observed wind speeds.

FDIR and ODIR are the direction (angle) of \(\mathbf{F}_a \text{ and } \mathbf{O}_a\) with respect to the grid directions.

FBAR_SPEED and OBAR_SPEED are the lengths of the average forecast and observed wind vectors. Note that this is *not* the same as the average forecast and observed wind speeds (*ie.,* the length of an average vector \(\neq\) the average length of the vector).

VDIFF_SPEED is the length (*ie. speed*) of the vector difference between the average forecast and average observed wind vectors.

Note that this is *not* the same as the difference in lengths (speeds) of the average forecast and observed wind vectors. That quantity is called SPEED_ERR (see below). There is a relationship between these two statistics however: using some of the results obtained in the introduction to this appendix, we can say that \(| | \mathbf{F}_a | - | \mathbf{O}_a | | \leq | \mathbf{F}_a - \mathbf{O}_a |\) or, equivalently, that \(\vert \text{SPEED_ERR } \vert \leq \text{VDIFF_SPEED. }\)

VDIFF_DIR is the direction of the vector difference of the average forecast and average observed wind vectors. Note that this is {it not} the same as the difference in direction of the average forecast and average observed wind vectors. This latter quantity would be FDIR \(-\) ODIR.

SPEED_ERR is the difference in the lengths (speeds) of the average forecast and average observed wind vectors. (See the discussion of VDIFF_SPEED above.)

SPEED_ABSERR is the absolute value of SPEED_ERR. Note that we have SPEED_ABSERR \(\leq\) VDIFF_SPEED (see the discussion of VDIFF_SPEED above).

DIR_ERR is the signed angle between the directions of the average forecast and average observed wind vectors. Positive if the forecast vector is counterclockwise from the observed vector.

DIR_ABSERR is the absolute value of DIR_ERR. In other words, it’s an unsigned angle rather than a signed angle.