%% This document created by Scientific Notebook (R) Version 3.0


\documentclass[12pt,thmsa]{article}
\usepackage{amssymb}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{makeidx}
\usepackage{sw20jart}

%TCIDATA{TCIstyle=article/art4.lat,jart,sw20jart}

%TCIDATA{<META NAME="ViewSettings" CONTENT="31">}
%TCIDATA{<META NAME="GraphicsSave" CONTENT="32">}
%TCIDATA{<META NAME="Title" CONTENT="Measures of Dispersion">}
%TCIDATA{Created=Mon Aug 19 14:52:24 1996}
%TCIDATA{LastRevised=Thu Feb 13 16:49:17 1997}
%TCIDATA{Language=American English}
%TCIDATA{CSTFile=MathHelp.cst}
%TCIDATA{<LINK REL="author" HREF="DM0-1.tex">}
%TCIDATA{<LINK REL="first" HREF="DM11-1.tex">}
%TCIDATA{<LINK REL="contents" HREF="DM0-0.tex">}
%TCIDATA{<LINK REL="copyright" HREF="DM0-2.tex">}
%TCIDATA{<LINK REL="end" HREF="DM11-9.tex">}
%TCIDATA{<LINK REL="index" HREF="DMIndex.tex">}
%TCIDATA{<LINK REL="next" HREF="DM11-4.tex">}
%TCIDATA{<LINK REL="parent" HREF="DM11.tex">}
%TCIDATA{<LINK REL="previous" HREF="DM11-2.tex">}
%TCIDATA{<LINK REL="top" HREF="DM0-0.tex">}

\input{tcilatex}
\begin{document}


\section{\label{Mean deviation}Measures of Dispersion}

The various measures of dispersion describe different aspects of the spread,
or dispersion, of a set of variates about their mean.

\subsection{\ Mean Deviation 
\index{Statistics@Statistics!mean deviation@mean deviation}\label%
{Statistics, mean deviation}}

The \textsl{mean deviation} is the mean 
\index{Mean deviation}of the distances of the data from the data mean. The
mean deviation of $x_{1},x_{2},\ldots ,x_{n}$ is 
\[
\frac{\dsum\limits_{i=1}^{n}\left| x_{i}-\frac{\sum_{j=1}^{n}x_{j}}{%
\stackrel{\vspace{2pt}}{n}}\right| }{n} 
\]
where the vertical bars denote absolute value. (Without the absolute values,
this sum would be zero.) For example, the mean deviation of $\left\{
1,2,3,4,5\right\} $ is 
\[
\frac{\ \left| 1-3\right| +\left| 2-3\right| +\left| 3-3\right| +\left|
4-3\right| +\left| 5-3\right| \ }{5}=\,\frac{6}{5} 
\]

\begin{quote}
$\blacktriangleright $ \textsf{Statistics + Mean Deviation}
\end{quote}

\begin{quotation}
$1,2,3,4,5$, Mean deviation(s): $\frac{6}{5}$
\end{quotation}

\strut

\subsection{\ 
\index{Variance@Variance}\label{Variance}Variance and Standard Deviation%
\label{Statistics, variance}}

The \textsl{sample variance } 
\index{Statistics@Statistics!variance@variance}for $x_{1},x_{2},\ldots
,x_{n} $ is the sum of the squares of differences with the mean, divided by $%
n-1$. 
\[
\frac{\dsum\limits_{i=1}^{n}\left( x_{i}-\frac{\sum_{j=1}^{n}x_{j}}{%
\stackrel{\vspace{2pt}}{n}}\right) ^{2}}{n-1} 
\]

\ 

\begin{quote}
$\blacktriangleright $ To compute variance
\end{quote}

\begin{enumerate}
\item[1.]  Place the insertion point in a list of data, in a vector, or in a
matrix.

\item[2.]  From the \textsf{Statistics} submenu, choose \textsf{Variance}.
\end{enumerate}

\begin{quote}
$\blacktriangleright $ \textsf{Statistics + Variance}
\end{quote}

\begin{quotation}
$5,1,89,4,29,47,18$, Variance(s): $1002.6\smallskip $

$\left[ 
\begin{array}{r}
18.1 \\ 
5.3 \\ 
7.6
\end{array}
\right] $, Variance(s): $46.563\smallskip $

$\left[ 
\begin{array}{rrr}
23 & 5 & -6 \\ 
18 & 23 & -22 \\ 
5 & 0 & 0
\end{array}
\right] $, Variance(s): $\left[ 86.333,146.33,129.33\right] \smallskip $

$\left( 
\begin{array}{cc}
x & y \\ 
a & b \\ 
c & d
\end{array}
\right) $, Variance(s): $\left[ \left( .5a-.5c\right) ^{2}+\left(
.5c-.5a\right) ^{2},\left( .5b-.5d\right) ^{2}+\left( .5d-.5b\right)
^{2}\right] \smallskip $
\end{quotation}

\ 

\index{Statistics@Statistics!standard deviation@standard deviation}\label%
{Statistics, standard deviation}The square root of the variance is called
the \textsl{standard deviation}. 
\index{Standard deviation@Standard deviation}\label{Standard deviation}It is
the most commonly used measure of dispersion. 
\[
\sqrt{\frac{\sum_{i=1}^{n}\left( x_{i}-\frac{\sum_{j=1}^{n}x_{j}}{\stackrel{%
\vspace{4pt}}{n}}\right) ^{2}}{n-1}} 
\]

\begin{quote}
$\blacktriangleright $ \textsf{Statistics + Standard Deviation}
\end{quote}

\begin{quotation}
$\left[ 5,1,89,4,29,47,18\right] $, Standard deviation(s): $31.664$ $%
\,\smallskip $

$\left( 
\begin{array}{r}
18.1 \\ 
5.3 \\ 
7.6
\end{array}
\right) $, Standard deviation(s): $6.8237\smallskip $

$\left( 
\begin{array}{cc}
x & y \\ 
a & b \\ 
c & d
\end{array}
\right) $, Standard deviation(s): $\left[ .70711\sqrt{\left( \left(
-1.0a+c\right) ^{2}\right) },.70711\sqrt{\left( \left( -1.0b+d\right)
^{2}\right) }\right] $
\end{quotation}

Note that the preceding matrix was treated as a labeled matrix, and the
first row was ignored.

\begin{quote}
$\blacktriangleright $ \textsf{Statistics + Standard Deviation}
\end{quote}

\begin{quotation}
$\left[ 
\begin{array}{rrr}
23 & 5 & -6 \\ 
18 & 23 & -22 \\ 
5 & 0 & 0
\end{array}
\right] $, Standard deviation(s): $\left[ 9.2916,12.097,11.372\right]
\smallskip $

$\left[ 
\begin{array}{rrr}
-8.5 & 5.0 & 5.7 \\ 
-5.5 & 7.9 & -5.9 \\ 
-3.7 & 5.6 & 4.5 \\ 
-3.5 & 4.9 & -8.0 \\ 
9.7 & 6.3 & -9.3
\end{array}
\right] $, Standard deviation(s): $\left[ 7.0014,1.23,7.1456\right] \medskip 
$
\end{quotation}

\ 

\subsection{\ Covariance 
\index{Covariance matrix@Covariance matrix}\label{Covariance matrix}}

The \textsl{covariance matrix} of 
\index{Statistics@Statistics!covariance@covariance}\label%
{Statistics, covariance}an $m\times n$ matrix $X=\left[ x_{ij}\right] $ is
an $n\times n$ matrix with $(i,j)$th entry 
\[
\frac{\dsum\limits_{k=1}^{m}\left( x_{ki}-\frac{\sum_{s=1}^{m}x_{si}}{%
\stackrel{\vspace{1pt}}{m}}\right) \left( x_{kj}-\frac{\sum_{t=1}^{m}x_{tj}}{%
\stackrel{\vspace{1pt}}{m}}\right) }{m-1} 
\]
Note that for each $i,$ the $(i,i)$th entry is the \emph{variance} of the
data in the $i$th column, making the variances of the column vectors occur
down the main diagonal of the covariance matrix. The definition of
covariance matrix is symmetric in $i$ and $j$, so the covariance matrix is
always a symmetric matrix.

\begin{quote}
$\blacktriangleright $ \textsf{Statistics + Mean, Statistics + Variance,
Statistics + Covariance}
\end{quote}

\begin{quotation}
$\left[ 
\begin{array}{cc}
1 & 2 \\ 
3 & 5 \\ 
4 & 3
\end{array}
\right] $, Mean(s): $2.7,\allowbreak 3.3$, Variance(s): $\left[
2.3333,2.3333\right] $,

\qquad \qquad Covariance matrix: $\left[ 
\begin{array}{cc}
2.3333 & 1.1667 \\ 
1.1667 & 2.3333
\end{array}
\right] $

\ 

$\left[ 
\begin{array}{rrr}
8.5 & -5.5 & -3.7 \\ 
-3.5 & 9.7 & 5.0 \\ 
7.9 & 5.6 & 4.9
\end{array}
\right] $, Mean(s): $4.3,\allowbreak 3.3,\allowbreak 2.1$, Variance(s): $%
\left[ 45.72,61.843,24.943\right] $,

\qquad \qquad Covariance matrix: $\left[ 
\begin{array}{ccc}
45.72 & -39.3 & -18.45 \\ 
-39.3 & 61.843 & 38.018 \\ 
-18.45 & 38.018 & 24.943
\end{array}
\right] $
\end{quotation}

You can also apply \textsf{Covariance} to a matrix with column headings.

\begin{quote}
$\blacktriangleright $ \textsf{Statistics + Mean, Statistics + Variance,
Statistics + Covariance}
\end{quote}

\begin{quotation}
$\left[ 
\begin{array}{ccc}
\text{x} & \text{y} & \text{z} \\ 
1 & 1 & 4 \\ 
3 & 2 & 5 \\ 
5 & 3 & 6 \\ 
7 & 4 & 7
\end{array}
\right] $, Mean(s): $4.0,\allowbreak 2.5,\allowbreak 5.5$, Variance(s): $%
\left[ 6.6667,1.6667,1.6667\right] $,

\qquad \quad Covariance matrix: $\left[ 
\begin{array}{ccc}
6.6667 & 3.3333 & 3.3333 \\ 
3.3333 & 1.6667 & 1.6667 \\ 
3.3333 & 1.6667 & 1.6667
\end{array}
\right] $

$\left[ 
\begin{array}{cc}
\text{x} & \text{y} \\ 
a & b \\ 
u & v
\end{array}
\right] $, Mean(s): $.5a+.5u,\allowbreak .5b+.5v$,

\qquad Variance(s): $\left[ \left( .5a-.5u\right) ^{2}+\left( .5u-.5a\right)
^{2},\left( .5b-.5v\right) ^{2}+\left( .5v-.5b\right) ^{2}\right] $,

\qquad Covariance matrix: $\left[ 
\begin{array}{cc}
.5a^{2}-1.0au+.5u^{2} & .5ab-.5av-.5ub+.5uv \\ 
.5ab-.5av-.5ub+.5uv & .5b^{2}-1.0bv+.5v^{2}
\end{array}
\right] $
\end{quotation}

\ 

\begin{quotation}
\emph{Note\quad }The final matrix was obtained by applying \textsf{Simplify}
to the first covariance matrix produced. Notice that the first row was
interpreted as labels and ignored in the computation.
\end{quotation}

\ 

\subsection{\ Moment 
\index{Moment@Moment}\label{Moment}}

The $r$th \textsl{moment} of a set $\{x_{1},x_{2},\ldots ,x_{n}\}$ about 
\index{Statistics@Statistics!moment@moment}\label{Statistics, moment} the
point $a$ is the following sum: 
\[
\frac{1}{n}\sum_{i=1}^{n}\left( x_{i}-a\right) ^{r} 
\]

Thus, the mean is also known as the \textsl{first moment about zero}. The
second moment about zero is the quantity $\mu ^{2}+\sigma ^{2}$, where $\mu $
is the mean and $\sigma ^{2}$ is the variance of the data. The $r$th \textsl{%
moment about the mean} is the sum 
\[
\frac{1}{n}\sum_{i=1}^{n}\left( x_{i}-\frac{1}{n}\sum_{j=1}^{n}x_{j}\right)
^{r} 
\]
\medskip

\begin{example}
The $3$rd and $4$th moments of the set $\left\{
2,4,6,8,10,12,14,16,18\right\} $ about the mean are 
\begin{eqnarray*}
\vspace{6pt}\frac{1}{9}\sum_{i=1}^{9}\left( 2i-\frac{1}{9}%
\sum_{j=1}^{9}2j\right) ^{3} &=&0\quad \quad \quad \\
\frac{1}{9}\sum_{i=1}^{9}\left( 2i-\frac{1}{9}\sum_{j=1}^{9}2j\right) ^{4}%
\vspace{6pt} &=&\frac{3776}{3}\approx 1258.7
\end{eqnarray*}
\end{example}

\begin{quote}
$\blacktriangleright $ \textsf{Statistics + Moment}
\end{quote}

\begin{quotation}
$\left[ 
\begin{array}{r}
8.5 \\ 
-5.5 \\ 
-3.7 \\ 
3.5
\end{array}
\right] $, $
\begin{array}{l}
\text{First moment about }0:\,.7 \\ 
\text{Second moment about }0:\,32.11
\end{array}
$\smallskip

$\left( .123,.703,.445,.284\right) $, $
\begin{array}{l}
\text{First moment about }0:\,.389 \\ 
\text{Second moment about }0:\,.197
\end{array}
$\smallskip

$\left( .123,.703,.445,.284\right) $, $
\begin{array}{l}
\text{First moment about the mean}:\,0 \\ 
\text{Second moment about the mean}:4.59\times 10^{-2}\,
\end{array}
$
\end{quotation}

\ 

\subsection{\ Correlation\label{Correlation coefficient}}

In dealing with two random variables, we refer to the measure of their
linear correlation as the \textsl{correlation} \textsl{coefficient}. 
\index{Correlation coefficient@Correlation coefficient} When two random
variables are independent, this measure is $0$. If two random variables $X$
and $Y$ are linearly related in the sense $Y=a+bX$ for some constants $a$
and $b$, then the coefficient of correlation reaches one of the extreme
values $+1$ or $-1$. In either of these cases, $X$ and $Y$ are referred to
as \textsl{perfectly} correlated. The formula for the coefficient of
correlation for two random variables is 
\[
\rho =\rho \left( X,Y\right) =%
\frac{\limfunc{Cov}\left( X,Y\right) }{\sigma _{x}\sigma _{y}}=\frac{\sigma
_{xy}}{\sigma _{x}\sigma _{y}} 
\]
where $\sigma _{x}$ and $\sigma _{y}$ are the standard deviations of the two
random variables.

To compute the coefficient of correlation between two samples, enter the
data as two columns of a matrix and, from the \textsf{Statistics} submenu 
\index{Coefficient of correlation@Coefficient of correlation}\label%
{Coefficient of correlation}choose \textsf{Correlation}. You can apply this
operation to any size matrix to get the coefficient of correlation for each
pair of columns: The number in the $i,j$ position is the coefficient of
correlation between column $i$ and column $j$. A correlation matrix is
always symmetric, with ones on the main diagonal.

\begin{quote}
$\blacktriangleright $ \textsf{Statistics + Correlation}
\end{quote}

\begin{quotation}
$\left[ 
\begin{array}{rr}
43 & -62 \\ 
77 & 66 \\ 
54 & -5 \\ 
99 & -61
\end{array}
\right] $, Correlation matrix: $\left[ 
\begin{array}{cc}
1.0 & 7.4831\times 10^{-2} \\ 
7.4831\times 10^{-2} & 1.0
\end{array}
\right] \medskip $

$\left[ 
\begin{array}{rrr}
-50 & -12 & -18 \\ 
31 & -26 & -62 \\ 
1 & -47 & -91
\end{array}
\right] $, Correlation matrix: $\left[ 
\begin{array}{ccc}
1.0 & -.52883 & -.71054 \\ 
-.52883 & 1.0 & .97297 \\ 
-.71054 & .97297 & 1.0
\end{array}
\right] $
\end{quotation}

\strut

The relationship $%
\frac{\limfunc{Cov}\left( X,Y\right) }{\sigma _x\sigma _y}=\rho \left(
X,Y\right) $ among correlation, covariance, and the standard deviations is
illustrated in the following example.

\begin{quotation}
$\left[ 
\begin{array}{rr}
-50 & -12 \\ 
31 & -26 \\ 
1 & -47
\end{array}
\right] $, $\left\{ 
\begin{array}{l}
\text{Correlation matrix: }\,\left[ 
\begin{array}{ll}
1.0 & -.52883 \\ 
-.52883 & 1.0
\end{array}
\right] \\ 
\vspace{0pt} \\ 
\text{Covariance matrix: }\,\left[ 
\begin{array}{cc}
1677.0 & -381.5 \\ 
-381.5 & 310.33
\end{array}
\right] \\ 
\vspace{0pt} \\ 
\text{Standard deviation(s): }\left[ 40.951,17.616\right] \\ 
\vspace{0pt} \\ 
\qquad \dfrac{-381.5}{40.951\times 17.616}=-.52884
\end{array}
\right. \smallskip $
\end{quotation}

\strut

\subsection{\ Related topics}

\begin{itemize}
\item  \hyperref{Menu Items, Lists, and Matrices}{}{}{DM11-1.tex#Statistics}

\item  \hyperref{Measures of Central Tendency}{}{}{DM11-2.tex#Statistics,
mean}

\item  \hyperref{Distributions and Densities}{}{}{DM11-4.tex#Distribution}

\item  \hyperref{Families of Continuous Distributions}{}{}{%
DM11-5.tex#Continuous distributions}

\item  \hyperref{Families of Discrete Distributions}{}{}{DM11-6.tex#Discrete
distributions}

\item  \hyperref{Random Numbers}{}{}{DM11-7.tex#Statistics, random numbers}

\item  \hyperref{Curve Fitting}{}{}{DM11-8.tex#Curve fitting}

\item  \hyperref{Exercises and Solutions}{}{}{DM11-9.tex#Exercises}
\end{itemize}

\rule{0.67in}{0.01in}

\hyperref{\FRAME{itbpF}{0.5275in}{0.3399in}{0.0519in}{}{}{index.wmf}{\special%
{language "Scientific Word";type "GRAPHIC";display "PICT";valid-file
"F";width 0.5275in;height 0.3399in;depth 0.0519in;original-width
36.875pt;original-height 22.5625pt;cropleft "0";croptop "1";cropright
"1";cropbottom "0";filename 'index.wmf';file-properties "XNPEU";}}}{}{}{%
DMIndex.tex#Math Index}\quad {\small Index entries: \hyperref{Data}{}{}{%
DMIndex.tex#Data}, \hyperref{Mean}{}{}{DMIndex.tex#Mean}, \hyperref{Matrices%
}{}{}{DMIndex.tex#Matrices}, \hyperref{Statistics}{}{}{DMIndex.tex#Statistics%
}}

\end{document}
