\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{graphicx}
\usepackage{enumitem}
\usepackage{wrapfig}
\usepackage{draftwatermark}
\SetWatermarkText{DRAFT}
\SetWatermarkScale{3}
\title{Wagstaff revisited: Interpreting the Concentration Index when
the variable of interest is binary, with an application to the digital
divide.}
\author{Michael P. Fourman\footnote{This is an early
    draft of a work in progress. It is incomplete and will surely contain uncorrected errors. 
Please direct any comments or suggestions to the
    author \texttt{michael.fourman@ed.ac.uk}}}
\date{\today}
\begin{document}
   \maketitle
\begin{abstract}
  Positive links between outcomes and and opportunities act to create
  cycles of deprivation, to increase inequality, and to reduce social
  mobility.  Measuring and monitoring such links should be a key issue
  for public policy.  Interventions intended to increase opportunities
  should be designed to reduce these effects.

  For example, broadband access affords social, educational, and
  financial advantages. Being online can make it easier to access
  jobs, bargains, information, and education. Increasing digital
  participation is widely adopted as a policy goal. However, the
  digital divide can magnify existing inequality if those who are less
  deprived are more likely to be online. 

  We use this example to introduce a framework for the design of
  interventions that will increase opportunity without increasing
  inequality.

  Our analysis is based on classical foundations. A generalisation of
  Yule's (1900) measure of association provides a natural measure of
  the association between an ordinal outcome and a binary opportunity
  --- a special case of a measure introduced by Agresti (1980). We
  show that this corresponds precisely to Wagstaff's (2005)
  modification of the concentration index for the case of a binary
  variable. This provides a direct interpretation of Wagstaff's
  measure. 

  The major novelty of our approach is to separate the global effect
  into local contributions. This provides a rational basis for
  targetted interventions. We illustrate this by analysing
  postcode-level Ofcom data for availability and uptake of broadband
  connections at various speeds across Scotland in relation to various
  factors of the Scottish Index of Multiple Deprivation (SIMD).
\end{abstract}



\section{Methodology}
We examine the effect of a binary advantage, or opportunity, on
existing deprivation. Our discussion in this section is general, but
we will use the language of the digital divide. Our individuals are
households; the \emph{online} households, $\mathrm{O}$, enjoy the
advantage; the offline households, $\mathrm{Ø}$, do not.
To simplify this initial discussion we assume that existing inequality
is represented by a total ordering, This means that for any
two households, $x,y$\,, either $x\prec y$ (\emph{$x$ is more deprived
  than $y$}) or $y\prec x$\,---\,one is more deprived than the
other.\footnote{Adjustments to address the common case in which
  inequality is quantified in terms of an index of deprivation, making
  $\prec$ a partial linear order, will be described below.}

\begin{wrapfigure}{r}{0.42\textwidth}
\vspace{-1.5em}
  \begin{center}
\includegraphics[width=0.4\textwidth]{fig0.pdf}
 \end{center}
\vspace{-2em}
\caption{offline--online pairs}
\label{pairs}
\end{wrapfigure}  
If we view the advantage as an opportunity, then the set of
offline--online pairs represents the inequalities of opportunity that
may serve to counter or reinforce existing inequality. We use a
graphical representation to visualise these effects.

Figure \ref{pairs} shows a grid representing the offline--online pairs from a population of one
hundred individuals.\footnote{The allocation of the advantage has
been drawn randomly, with the probability of being online ranging
linearly from 0.4 for the most deprived individual, to 0.9 for the
least deprived.  In this example, 41 households remain offline, while
59 are online.} 

The dots in the diagram represent the offline--online pairs,
$(d,a)\in\mathrm{Ø}\times\mathrm{O}$\,, ordered by $\prec$ in each
dimension. If $d \prec a$ then the dot is filled to indicate that
$d$'s digital disadvantage compounds the existing inequality.

Each column includes the pairs $(d, y)$, for a fixed
offline household $d$ and each online household $y\in
\mathrm{O}$. Similarly, each row includes the pairs $(x, a)$ for a
fixed $a\in \mathrm{O}$ as $x$ ranges over the offline households,
$\mathrm{Ø}$.

We colour each dot to indicate whether it reinforces or counters the existing inequality.
If $a\prec d$\,, the dot is green; the digital advantage counters the
existing inequality. 
If $(d\prec a)$\,, the dot is red; the digital disadvantage
compounds the existing inequality. We count the dots to determine how many times the
more-deprived household has the digital advantage, $A$ (green dots), or
disadvantage, $D$ (red dots).
\begin{align}
A&=\left\lvert\left\{(d,a)\in\mathrm{Ø}\times\mathrm{O}\mid a\prec d\right\}\right\rvert&D&=\left\lvert\left\{(d,a)(d,a)\in\mathrm{Ø}\times\mathrm{O}\mid d\prec a\right\}\right\rvert
\end{align}
The difference, $D-A$, normalised to a $[-1,+1]$ scale, gives a natural
measure, $\omega$, of the tendency of the digital divide to
exacerbate existing inequality. It is simply related to the odds, $o_{d\prec a}$\,, for a
randomly selected offline--online pair, that the digital disadvantage
reinforces the existing inequality ($d\prec a$).
\begin{gather}
\begin{aligned}
\omega &= \frac{D-A}{D+A} & o_{d\prec a} &=
                                    \frac{1+\omega}{1-\omega} = \frac{D}{A}
\end{aligned}
\end{gather}
The proportion of offline--online pairs $d, a$ for which $d\prec
a$ is $(1+\omega)/2$.

% The lower the odds, $\rho$, the greater our measure, $\omega$, of digital
% disadvantage. Note that $(-\omega)^* = {1}/{\omega^*}$,
% and $^*$ is an involution: $\rho^* =
% {\omega^*}^* = \omega$.
In \S\ref{wagstaff} will show that $\omega$ is precisely Wagstaff's
concentration index.

% It is a summary statistic closely related to relative risk and odds
% ratio measures of the effects of deprivation.
% Let $p$ be the proportion of households online, and $q$ the proportion
% online.
% \begin{align}
% % P(x\in \mathrm{O}\mid x\prec y) &= p^2 + pq(1-\omega) = p(1-q\omega)\\
% % P(y\in \mathrm{O}\mid x\prec y) &= p^2 + pq(1+\omega) = p(1+q\omega)\\ 
% P(x\in \mathrm{Ø}\mid x\prec y) &= q^2 + pq(1+\omega) = q(1+p\omega)\\
% P(y\in \mathrm{Ø}\mid x\prec y) &= q^2 + pq(1- \omega) = q(1-p\omega)
% \end{align}
% So the relative risk that the more deprived household is offline is
% given by 
% \[\frac{P(x\in \mathrm{Ø}\mid x\prec y)}{P(y\in \mathrm{Ø}\mid x\prec
%     y) }=\frac{1 + p\omega}{1-p\omega} = \frac{1}{(p\omega)^*} = (-p\omega)^*\]
% Similarly, the odds of each household being offline
% are given by
% \[o_{x\in \mathrm{Ø}} =\frac{q(1+p\omega)}{p(1-q\omega)}\quad o_{y\in \mathrm{Ø}} =\frac{q(1-p\omega)}{p(1+q\omega)}\]
% So the odds ratio measure of the disadvantaged household's greater
% likelihood of being offline is
% \[\frac{o_{x\in \mathrm{Ø}}}{o_{y\in \mathrm{Ø}}}=\frac{(1+p\omega)(1+q\omega)}{(1-q\omega)(1-p\omega)} =
%     \frac{1+\omega +pq\omega}{1-\omega + pq\omega}\]



% % To measure advantage and disadvantage we will often use a $[-1,1]$
% % scale. A simple involution relates this to generalised odds and
% % odds ratios. For example, 
% % \begin{align}\label{eqn:tau}
% % \text{if }\tau &= \frac{\mathrm{Ø} - \mathrm{O}}{\mathrm{Ø} + \mathrm{O}}&\text{then }\tau^* =
% %                                         \frac{1-\tau}{1+\tau}
% %   &=\frac{\mathrm{O}}{\mathrm{Ø}}&\text{and $\tau$ is an involution, }\tau^{**} &= \tau
% % \end{align}
% % Here, we let $\mathrm{Ø}, \mathrm{O}$
% % stand for the \emph{numbers} of households offline and online. We will
% % use this abuse of notation systematically, for these and other sets, below.
% % Here, $\tau$ provides a measure of net disadvantage; $\tau^*$ is the
% % odds of being online. The odds are less than even iff $\tau > 0$.
% % \subsection{The Digital Divide}
% % Each online household gains an advantage over each household that
% % remains offline; each offline household suffers a disadvantage with respect to
% % all those who are online.  We quantify the digital divide between two
% % households, $X,Y$ --- the net
% % digital advantage of $X$ relative to $Y$ --- by counting
% % these advantages and disadvantages.

% We write $\mathrm{Ø}_X, \mathrm{O}_X$ for the offline and online households
% in $X$, and similarly for $Y$.
% \begin{itemize}[noitemsep]
% \item The digital advantage of each online household $a\in \mathrm{O}_X$ with
%    respect to $Y$ is measured by ${\mathrm{Ø}}_Y$, the number of offline
%    households in $Y$. 
%    \item The digital disadvantage of each offline household $d\in \mathrm{Ø}_X$ is given by ${\mathrm{O}}_Y$ the
%    number of online households in $Y$. 
% \item An online household, $a$, suffers no
%    disdvantage. 
% \item An offline household, $d$, gains no
%    advantage. 
% \end{itemize}
% To summarise, if $a\in \mathrm{O}_X$ ($a$ is online), and $d\in \mathrm{Ø}_X$ ($d$ is offline) then:
% \vspace{-0.5em}
% \begin{equation}\label{eqn:individual}
% \begin{aligned}
% A(a,Y)&={\mathrm{Ø}}_Y &D(a,Y) &= 0&&&
% D(d,Y)&={\mathrm{O}}_Y &A(d,Y)&=0\,.
% \end{aligned}
% \end{equation}
% We aggregate these individual effects to measure the net effect of the digital
% divide on the relationships between two communities, $X$ and $Y$.
% \begin{align} 
% A(X,Y)&=\sum_{x\in X}A(x,Y) = {\mathrm{O}}_X{\mathrm{Ø}}_Y&D(X,Y)&=\sum_{x\in X}D(x,Y)={\mathrm{Ø}}_X{\mathrm{O}}_Y
% \end{align}
% The net effect of the divide on $X$ with respect to $Y$ is given by
% Yule's coefficient of association, $Q$ (\cite{yule1900} \S{21}), which
% is the difference $D(X,Y) - A(X,Y)$, normalised to give
% a value in the range $[-1,1]$:
% \begin{equation}
% Q_{X,Y} = \frac{D(X,Y) - A(X,Y)}{D(X,Y) + A(X,Y)} = \frac{{\mathrm{Ø}}_X{\mathrm{O}}_Y- {\mathrm{O}}_X{\mathrm{Ø}}_Y}{{\mathrm{Ø}}_X{\mathrm{O}}_Y+ {\mathrm{O}}_X{\mathrm{Ø}}_Y}
% \end{equation}
% As in (\ref{eqn:tau}) above,
%    \begin{equation*}
%     Q^*=
%      \frac{1-Q}{1+Q}= \frac{{\mathrm{O}}_X{\mathrm{Ø}}_Y}{{\mathrm{Ø}}_X{\mathrm{O}}_Y}.\end{equation*} 
% Thus, $Q$ is a measure of $X$'s digital distadvantage with respect to
% $Y$, while $\rho =Q^*$ is the odds ratio measure of $X$'s advantage
%  over $Y$. As the disadvantage $Q$ falls from $1$ to $-1$, this ratio rises from
%  $0$ to $\infty$.

\subsection{Effect on Deprivation}
We extend the ideas of the previous section to compare each household with the set
of all those who are more
fortunate.



Given a set $Y$, we define the sets of those less and more advantaged
than an individual, $x$.
\begin{align}
Y^{\prec x} &= \{y\in Y\mid y\prec x\}&
Y^{\succ x} &= \{y\in Y\mid y\succ x\}
\end{align}
We compute digital advantage and disadvantage of each household $x$ with
   respect to those more fortunate, $Y^{\succ x}$. The basic equations
   (\ref{eqn:individual}) reduce to
\begin{equation}\label{eqn:local}
\begin{aligned}
\text{if } x\in \mathrm{O}&&A(x, Y^{\succ x}) &= {\mathrm{Ø}} _Y^{\succ x}& D(x,Y^\succ) &= 0\\
\text{if } x\in \mathrm{Ø}&&D(x, Y^{\succ x}) &= {\mathrm{O}} _Y^{\succ x}& A(x,Y^\succ) &= 0 
\end{aligned}
\end{equation}

Each row represents an online household, $a$. The green dots in this
row represent pairs $a,d$ such that $a\prec d$ and $d\in\mathrm{Ø}(d)$. There
are $Y^{\succ a}_{\mathrm{Ø}} $ such pairs.  Each column represents an offline
household, $d$. The red dots in this column correspond similarly to
$Y^{\succ d}_{\mathrm{O}}$.

The \emph{Lorenz Curve} is a line separating the red and green
circles.  Each dot is placed in the centre of
  a grid square. Since $\prec$ is total, each online household
  falls between two offline households, and vice-versa.  For each
  index, $0\leq j \leq 100$,  the Lorenz curve plots the number of 
households in $P^{\prec j} = \{x_i \mid i < j\}$ that are online,  $P^{\prec j}_{\mathrm{O}}$, against the
number that are offline, $P^{\prec j}_{\mathrm{Ø}}$.

For any set $X$ we aggregate the effects to define
$\omega_{X,Y^{\succ}}$, which measures the impact of the digital
divide on $X$'s deprivation, relative to those more fortunate.
\begin{equation}
\begin{aligned} 
A(X,Y^\succ)&=\!\sum_{x\in X}A(x,Y^{\succ x}) =\!\!\!\sum_{a\in
  {\mathrm{O}}_X}\! {\mathrm{Ø}}_Y^{\succ a}\\
D(X,Y^\succ)&=\!\sum_{x\in X}D(x,Y^{\succ x})=\!\!\!\sum_{d\in
  {\mathrm{Ø}}_X}\! {\mathrm{O}}_Y^{\succ d}
\end{aligned}\quad
\begin{aligned} 
\omega_{X,Y^{\succ}} &=
\frac{D(X,Y^\succ)-A(X,Y^\succ)}{D(X,Y^\succ)+A(X,Y^\succ)}
\end{aligned} 
\end{equation}

In what follows, we will generally consider subsets $X$ of some fixed
population, $Y$. We write $\omega_X$, for $\omega_{X,Y^{\succ}}$, and just $\omega$ for $\omega_{Y,Y^{\succ}}$.
The areas above (red, disadvantage) and below (green, advantage) the Lorenz curve
represent $D(Y,Y^\succ)$ and $A(Y,Y^\succ)$ respectively.
So $\omega = \omega_{Y,Y^\succ}$ is the classical Gini index for our (non-classical)
Lorenz curve. The index is %
the difference between the areas below and above the Lorenz curve,
expressed as a percentage of the total area.  For Figure \ref{pairs} it is $\omega = 39\%$.

This index is an example of the ``ordinal measure of association
defined by the ratio of the proportions of concordant and discordant
pairs'' studied by Agresti \cite{agresti1980}. The odds that $d \succ a$, given that $a$ is online and
$d$ is offline, are given by $\omega^*$.
\begin{equation}\omega^* =
  \frac{1-\omega}{1+\omega}=\frac{A(Y,Y^\succ)}{D(Y,Y^\succ)} = \frac{\sum_{a\in
  {\mathrm{O}}}\! {\mathrm{Ø}}^{\succ a}}{\sum_{d\in
  {\mathrm{Ø}}}\! {\mathrm{O}}^{\succ d}}
\end{equation} 
Since if $a\in\mathrm{O}$ then $\mathrm{Ø}^{\succ a}
+\mathrm{Ø}^{\prec a} = \mathrm{Ø}$, and similarly $\mathrm{O}$ is
split by any $d\in \mathrm{Ø}$\,, we can also define
$\omega_{Y,Y^\succ}$ by a sum over columns, or by a sum over
rows. 
\begin{align} 
A(Y,Y^\succ)&=\sum_{a\in
  {\mathrm{O}}}\!{\mathrm{Ø}}^{\succ a} =\sum_{d\in
  {\mathrm{Ø}}}\! {\mathrm{O}}^{\prec d} &\qquad\omega &=\frac{1}{\mathrm{Ø}}
\sum_{d\in
  {\mathrm{Ø}}}\frac{ {\mathrm{O}} ^{\succ d} -{\mathrm{O}} ^{\prec
    d}}{\mathrm{O}}\\
D(Y,Y^\succ)&=\sum_{d\in
  {\mathrm{Ø}}}\! {\mathrm{O}}^{\succ d} =\sum_{a\in
  {\mathrm{O}}}\! {\mathrm{Ø}}^{\prec a}&&=\frac{1}{\mathrm{O}}
\sum_{a\in
  {\mathrm{O}}}\frac{ {\mathrm{Ø}} ^{\prec a} -{\mathrm{Ø}} ^{\succ a}}{\mathrm{Ø}}
\end{align}
If we define the advantage
of an individual $x$ relative to a set $X$ by 
\begin{align} 
x_Y &=
  \frac{X^{\prec x} - X^{\succ x}}{X^{\prec x} + X^{\succ x}},&&
                                                                \text{then}&
   \omega &= \frac{1}{\mathrm{O}}\sum_{a\in \mathrm{O}}a_{\mathrm{Ø}}
    = -\frac{1}{\mathrm{Ø}}\sum_{d\in \mathrm{Ø}}d_{\mathrm{O}}\,.
\end{align} 
Thus the index $\omega$ may be interpreted as the average advantage of
an online houshold relative to the set of offline households, or the
average disadvantage of an offline household relative to the set of
online households.

If we add an extra online household, $x$, to our population, we add an extra
row. The new index
$\omega^+$ is given by
\begin{align}
\mathrm{O}\,\omega &= \phantom{-}\sum_{a\in
                     \mathrm{O}}a_{\mathrm{Ø}}&(\mathrm{O}+1)\,\omega^+&=\mathrm{O}\,\omega+
                                                                         x_{\mathrm{Ø}}&\omega^+-\omega
  &= \frac{x_{\mathrm{Ø}} - \omega}{\mathrm{O}+1}\label{eqn:plus}\\
\intertext{Similarly, if we remove an offline household, $x$, we
  remove a column. In this case, the new index $\omega^-$ is given by}
\mathrm{Ø}\,\omega &= -\sum_{d\in \mathrm{Ø}}d_{\mathrm{O}}&(\mathrm{Ø}-1)\,\omega^-&=\mathrm{Ø}\,\omega
                                                                                                         + x_{\mathrm{O}}&\omega^--\omega
  &= \frac{x_{\mathrm{O}} + \omega}{\mathrm{Ø}-1}\label{eqn:minus}
\end{align}

Suppose we have a population
with index $\omega$. We apply (\ref{eqn:minus}) followed by
(\ref{eqn:plus}) to
calculate the effect of taking an offline household, $x$, online.
\begin{align}
\omega^-
  &= \omega + \frac{x_{\mathrm{O}} +
    \omega}{\mathrm{Ø}-1}&{\omega^-}^+&= \omega + \frac{x_{\mathrm{O}} +
                                      \omega}{\mathrm{Ø}-1} +\frac{x_{\mathrm{Ø}} - \omega }{\mathrm{O}+1}- \frac{x_{\mathrm{O}} +
                                      \omega}{(\mathrm{Ø}-1)(\mathrm{O}+1)}
\end{align}
Rearrange the second equation:
\begin{align}
(\mathrm{Ø}-1)(\mathrm{O}+1)({\omega^-}^+\!\!- \omega) 
  &= (x_{\mathrm{O}}
                                                    +\omega)(\mathrm{O}+1)
                                                    + (x_{\mathrm{Ø}}
                                                    - \omega
                                                    )(\mathrm{Ø}-1) + x_{\mathrm{O}} +
                                      \omega\\
&=(\mathrm{O} - \mathrm{Ø})\omega +\mathrm{O}x_{\mathrm{O}}
  +\mathrm{Ø}x_{\mathrm{Ø}}  +3\omega+ 2 x_{\mathrm{O}}-x_{\mathrm{Ø}}
\end{align}
Divide the rhs by the number of individuals, $N$ to
  conclude that
\begin{align}
{\omega^-}^+ > \omega&\ \text{ iff }\ (p - q)\omega +x_{\prec}
 + \frac{3\omega + 2 x_{\mathrm{O}}-x_{\mathrm{Ø}}
  }{N} > 0
\end{align}
Thus, the more households there are online, and the greater the
digital divide, $\omega$, the more likely it is that
getting more households online will increase inequality. For large $N$
we ignore the final term and apply the following criterion to
determine the households, $x$, which must go online if we are to reduce $\omega$.
\begin{align}
{\omega^-}^+ < \omega&\ \text{ iff }\ x_{\prec} < (q - p)\omega
\end{align}

% If we add an extra household, $x$, to our population, we add an extra
% row -- if $x\in \mathrm{O}$ -- or column -- if $x\in \mathrm{Ø}$ -- to
% our diagram. In either case we can compute the new index
% $\omega^+$ or $\omega^-$.
% \begin{align}
% \mathrm{O}\,\omega &= \phantom{-}\sum_{a\in \mathrm{O}}a_{\mathrm{Ø}}&&\text{if
%                                                            $x\in\mathrm{O}$
%                                                              then}&(\mathrm{O}+1)\,\omega^+&=\mathrm{O}\,\omega
%                                                                                                          +
%                                                                                                   x_{\mathrm{Ø}}\\
% \mathrm{Ø}\,\omega &= -\sum_{d\in \mathrm{O}}d_{\mathrm{Ø}}&&\text{if
%                                                            $x\in\mathrm{Ø}$
%                                                              then}&(\mathrm{Ø}+1)\,\omega^-&=\mathrm{Ø}\,\omega
%                                                                                                          - x_{\mathrm{O}}
% \end{align}
% The difference gives us a measure of the effect on inequality of
%  getting one offline household online.
% \begin{gather}
% \begin{aligned}
% (\mathrm{O}+1) (\mathrm{Ø}+1)(\omega^+ - \omega^-) &= \omega(
%                                                      \mathrm{O} -
%                                                      \mathrm{Ø})          
% + x_{\mathrm{Ø}} (\mathrm{Ø}+1)      + x_{\mathrm{O}} (\mathrm{O}+1)
% \\
% & =  \omega( \mathrm{O} -\mathrm{Ø})          
% + x_{\mathrm{Ø}} (\mathrm{Ø}+1)      + x_{\mathrm{O}} (\mathrm{O}+1)                                                        
% \end{aligned}\\
% \intertext{If we start from a population of N individuals, with $P% online and $Q$ offline, we can apply these equations with $\mathrm{O} = P$ and $\mathrm{Ø} = Q -1$ to compute the effect of taking one offline household, $ x$ online.}
% \begin{aligned}
% (\mathrm{O}+1) (\mathrm{Ø})(\omega^+ - \omega^-) &= \omega(
%                                                      \mathrm{O} -
%                                                      \mathrm{Ø}-1)          
% + x_{\mathrm{Ø}} (\mathrm{Ø})      + x_{\mathrm{O}} (\mathrm{O}+1)                                                               
% \end{aligned}\\
% \omega^+ - \omega^- < 0 \text{ iff } qx_{\mathrm{Ø}}
% + px_{\mathrm{O}} + \frac{1}{N}(x_{\mathrm{O}} +x_{\mathrm{Ø}})< \omega(q-p)
% \end{gather}


% \begin{align}
% P\omega &= \sum_{a\in\mathrm{O}}a_{\mathrm{Ø}} & Q\omega  &=\sum_{d\in  
%     \mathrm{Ø}}-d_{\mathrm{O}}\\ 
% PQ\omega &= \sum_{a\in\mathrm{O}}Qa_{\mathrm{Ø}} & PQ\omega  &=\sum_{d\in  
%     \mathrm{Ø}}-Pd_{\mathrm{O}}\\ 
% (P+1)(Q - 1)\omega^\prime &= PQ\omega +Px_{\mathrm{O}} + (Q-1)x_{\mathrm{Ø}}\\ 
% \omega^\prime &= \frac{PQ\omega +Px_{\mathrm{O}} +
%                             (Q-1)x_{\mathrm{Ø}}}{(P+1)(Q - 1)}\\
% \omega^\prime - \omega &= \frac{(1 + P - Q)\omega + Px_{\mathrm{O}} +
%                          (Q-1)x_{\mathrm{Ø}}}{(P+1)(Q - 1)}\\
% \omega^\prime < \omega &\text{iff} (p-q)\omega + px_{\mathrm{O}} +
%   qx_{\mathrm{Ø}} +\frac{\omega - x_{\mathrm{O}}}{N} < 0
% \end{align}
%  The difference gives us a measure of the effect on inequality of
%  getting one household online.
% \begin{align}
% WP &= \frac{(P-Q)W +
%   (Q+1)x_{\mathrm{Ø}}+(P+1)x_{\mathrm{O}}}{(P+1)(Q+1)}\\
% &= \frac{Q(x_{\mathrm{Ø}} -W) + P(x_{\mathrm{O}} +W) + x_{\mathrm{Ø}}+ x_{\mathrm{O}}}{(P+1)(Q+1)}
% \end{align}


  %  Consider a population, $P$ of individuals. Let $A$ be the set of
%    online households who enjoy the advantage, $B$ the set of offline
%    households who do not. How does the distribution of the
%    advantage, over the population, $P$, of individuals, affect
%    existing deprivation?

%    Each offline--online pair $(b,a)$, of households, consisting of an
%    offline household $b\in B$ and an online household $a\in A$, is an
%    instance of digital inequality. Consider the effect of $a$'s
%    digital advantage on the existing inequality, $\prec$. If
%    $(b\prec a)$ (the offline household is already more deprived) then
%    $a$'s additional digital advantage acts to \emph{strengthen} the
%    existing inequality. On the other hand, if the online household is
%    otherwise more deprived $(a\prec b )$, then the digital advantage
%    narrows the gap, to \emph{reduce} the existing inequality.

  
%    In this case every offline--online pair either strengthens or
%    reduces existing inequality. To quantify the net effect across the
%    population, $P$, we count the two cases and measure the difference
%    on a $[-1,1]$ scale.
%    \begin{align}
%        \text{Count how many strengthen inequality:}&&
%         D(P) &= \#\{(b,a)\in B \times A\mid b\prec a\}\nonumber\\
%        \text{Count how many reduce inequality:}&&
%        A(P) &= \#\{(b,a)\in B \times A\mid a\prec b\}\label{eqn:wagstaff}\nonumber\\
%        \text{Measure the difference:}&&W(P) &= \frac{D(P) - A(P)}{D(P) + A(P)}
%     \end{align} 
%     We will show in \S\ref{wagstaff}  that $W(P)$ is precisely
%     Wagstaff's index. We now generalise $W(P)$ to give a local
%     measure, $W(X)$, defined for any set $X\subseteq P$.
% \begin{equation}\label{eqn:local}% \begin{aligned}
% \text{We let}\ D(b) &=
% \#\{y\in A\mid b\prec y\},&\text{for each }&b\in B,\\
% \text{and}\ A(a)  &=
% \#\{y\in B\mid a\prec y\},&\text{for each }&a\in A\, .
% \end{aligned}
% \end{equation}
% Note that, $D(P) = \sum_{b\in B}D(b)$ and $A(P) = \sum_{a\in
%   A}A(a)$. 

% We extend the definition (\ref{eqn:wagstaff}) of $W(P)$ to define $W(X)$ for any set, $X$, of
% households. Let ${\mathrm{Ø}}_X = X\cap B,\ {\mathrm{O}}_X= X\cap A$ be the sets of offline,
% online households in $X$, respectively. We define, \begin{align}
%  D(X) &= \sum_{b\in {\mathrm{Ø}}_X}D(b),&A(X) &= \sum_{a\in {\mathrm{O}}_X}A(a),&
% \text{and}\ W(X) &= \frac{D(X) - A(X)}{D(X) + A(X)}
%     \end{align}

% \subsection{The Lorenz Curve}


\begin{wrapfigure}{r}{0.3\textwidth}
\vspace{-3.9em}
  \begin{center}
\includegraphics[width=0.3\textwidth]{fig1.pdf}
 \end{center}
\vspace{-5em}
\end{wrapfigure} 
\subsection{Wagstaff\label{wagstaff}}
We extend our treatment to a deprivation ordering
$\prec$ defined in terms of an index, $I:Y \rightarrow
\mathbb{R}$, and show that $\omega$ is precisely Wagstaff's
\cite{wagstaff2005} concentration index for a binary variable. 
We define:
\begin{align}
x\prec y&\text{ iff }I(x) < I(y)\nonumber\\
x\preceq y&\text{ iff }I(x) \leq I(y)\\
x\approx y &\text{ iff }I(x) = I(y) \nonumber
\end{align}
The relation $\prec$ is no longer a total order, but it is linear in
the sense that, for any $z$, if $x\prec y$ then $x\prec z$ or $z\prec y$. 

Again, for each index, we plot the cumulative number of households
online against the cumulative number offline.
This figure shows data for a population of 20,000 individuals, with 20
levels of deprivation. To generate this example, the uptake for each level of
deprivation has been sampled from a beta-binomial whose mean varies
linearly with deprivation in the same way as in our previous example.

In this case, for each value of the index, the offline--online pairs
of households with the same index lie in a rectangle not covered by
the rules given above (\ref{eqn:local}). We draw the Lorenz curve as a
diagonal line across each of the rectangles. This corresponds to a
linear interpolation of the Lorenz curve, between points given by the
cumulative offline/online data for each level of deprivation. 

Each advantage within the community of households sharing a common level of
deprivation, is balanced by a corresponding disadvantage. The equations 
(\ref{eqn:adj}) adjust the definitions (\ref{eqn:local}) of $A$ and
$D$ to share the advantages and disadvantages equally, over the online
and offline households (respectively) at this level of deprivation.
\begin{equation} \label{eqn:adj}\begin{aligned}A(a) &= \#\{y\in {\mathrm{Ø}}_Y\mid
    a\prec y\}
    +\frac{1}{2}\#\{y\in {\mathrm{Ø}}_Y\mid y\approx
    a\},&\text{for each }&a\in {\mathrm{O}}_Y\, ,\\
    D(d) &= \#\{y\in {\mathrm{O}}_Y\mid d\prec y\} +\frac{1}{2}\#\{y\in {\mathrm{O}}_Y\mid
    y\approx d\},&\text{for each }&d\in {\mathrm{Ø}}_Y\, .
  \end{aligned}\end{equation}

If we scale both online and offline populations to $[0,1]$, then
$\omega$ is given as the Gini index --the difference between the areas
below and above the curve--  for a Lorenz curve plotting cumulative
proportion of the online population against cumulative proportion of
the offline population.




% With this correction, $W(P)$, is again equivalent to Wagstaff's
% index.
% In the <a href="gmap.html">accompanying maps</a> we colour various communities $X$ according
% to the value of $W(X)$, in order to show whether they benefit, or
% suffer, from the digital divide.



We now show that $\omega$ is exactly Wagstaff's index.
Consider a population $U$ with $V$ households online Wagstaff plots the cumulative online population, $v$,
against cumulative population, $u$, ordered by index of deprivation, to give a concentration
curve.

The concentration index is the difference between the areas
below and above the curve, expressed as a proportion of the total
area, $U\times V$. Wagstaff corrects the concentration index for this curve, dividing it by
$q = \frac{U-V}{V}$, the proportion of the population offline. This is equivalent to
expressing the Gini difference as a proportion of the area of the
parallelogram shown in Figure \ref{fig:wagstaff}.

For each point $(u,v)$, on Wagstaff's Lorenz curve, the corresponding
offline population is $u-v$. so, transforming the parallelogram linearly to the unit square 
\[ (u, v) \mapsto \left (\frac{u-v}{U-V}, \frac{v}{V}\right )\]
transforms
Wagstaff's Lorenz curve to ours, which shows that our index does
indeed correspond to his.



\subsection{Interpretation}

\begin{align}
\{d,a&\mid d\prec a\} & pq \frac{1 +\omega}{2}\\
\{d,a&\mid a\prec d\}& pq \frac{1 -\omega}{2}\\
\{d, d^\prime&\mid d\prec d^\prime\}&~~\\
\{a, a^\prime&\mid a\prec a^\prime\} &~~
\end{align}

We now interpret $\omega_X$ as a generalised odds ratio statistic 
   We analyse inequalities in the distribution of fixed broadband
   connections across Scotland, and their effects on
   existing inequalities, as measured by the Scottish Index of
   Multiple Deprivation (SIMD).

   % We consider the availability and uptake of fixed broadband
   % connections. Our underlying model represents each of these as a
   % binary variable. 
\bibliography{gini.bib}{}
\bibliographystyle{plain}
 \end{document}
