An index of qualitative variation (IQV) is a measure of statistical dispersion in nominal distributions. Examples include the variation ratio or the information entropy.
There are several types of indices used for the analysis of nominal data. Several are standard statistics that are used elsewhere - range, standard deviation, variance, mean deviation, coefficient of variation, median absolute deviation, interquartile range and quartile deviation.
In addition to these several statistics have been developed with nominal data in mind. A number have been summarized and devised by Wilcox,, who requires the following standardization properties to be satisfied:
In particular, the value of these standardized indices does not depend on the number of categories or number of samples.
For any index, the closer to uniform the distribution, the larger the variance, and the larger the differences in frequencies across categories, the smaller the variance.
Indices of qualitative variation are then analogous to information entropy, which is minimized when all cases belong to a single category and maximized in a uniform distribution. Indeed, information entropy can be used as an index of qualitative variation.
One characterization of a particular index of qualitative variation (IQV) is as a ratio of observed differences to maximum differences.
Wilcox gives a number of formulae for various indices of QV, the first, which he designates DM for "Deviation from the Mode", is a standardized form of the variation ratio, and is analogous to variance as deviation from the mean.
The formula for the variation around the mode (ModVR) is derived as follows:
M=
K | |
\sum | |
i=1 |
(fm-fi)
where fm is the modal frequency, K is the number of categories and fi is the frequency of the ith group.
This can be simplified to
M=Kfm-N
where N is the total size of the sample.
Freeman's index (or variation ratio) is[2]
v=1-
fm | |
N |
This is related to M as follows:
| |||||||||
|
=
M | |
N(K-1) |
The ModVR is defined as
\operatorname{ModVR}=1-
Kfm-N | |
N(K-1) |
=
K(N-fm) | |
N(K-1) |
=
Kv | |
K-1 |
where v is Freeman's index.
Low values of ModVR correspond to small amount of variation and high values to larger amounts of variation.
When K is large, ModVR is approximately equal to Freeman's index v.
This is based on the range around the mode. It is defined to be
\operatorname{RanVR}=1-
fm-fl | |
fm |
=
fl | |
fm |
where fm is the modal frequency and fl is the lowest frequency.
This is an analog of the mean deviation. It is defined as the arithmetic mean of the absolute differences of each value from the mean.
\operatorname{AvDev}=1-
1 | |
2N |
K | |
K-1 |
K | |
\sum | |
i=1 |
\left|fi-
N | |
K |
\right|
This is an analog of the mean difference - the average of the differences of all the possible pairs of variate values, taken regardless of sign. The mean difference differs from the mean and standard deviation because it is dependent on the spread of the variate values among themselves and not on the deviations from some central value.[3]
\operatorname{MNDif}=1-
1 | |
N(K-1) |
K-1 | |
\sum | |
i=1 |
K | |
\sum | |
j=i+1 |
|fi-fj|
where fi and fj are the ith and jth frequencies respectively.
The MNDif is the Gini coefficient applied to qualitative data.
This is an analog of the variance.
\operatorname{VarNC}=1-
1 | |
N2 |
K | |
K-1 |
\sum\left(fi-
N | |
K |
\right)2
It is the same index as Mueller and Schussler's Index of Qualitative Variation[4] and Gibbs' M2 index.
It is distributed as a chi square variable with K – 1 degrees of freedom.
Wilson has suggested two versions of this statistic.
The first is based on AvDev.
\operatorname{StDev}1=1-\sqrt{
| ||||||||||||
|
}
The second is based on MNDif
\operatorname{StDev}2=1-\sqrt{
| |||||||||||||||
N2(K-1) |
}
This index was originally developed by Claude Shannon for use in specifying the properties of communication channels.
\operatorname{HRel}=
-\sumpilog2pi | |
log2K |
where pi = fi / N.
This is equivalent to information entropy divided by the
log2(K)
Wilcox adapted a proposal of Kaiser[5] based on the geometric mean and created the B index. The B index is defined as
B=1-\sqrt{1-\left[\sqrt[k]{
k | |
\prod | |
i=1 |
fiK | |
N |
}\right]2}
Several of these indices have been implemented in the R language.[6]
proposed six indexes.
The unstandardized index (M1) is
M1=1-
K | |
\sum | |
i=1 |
2 | |
p | |
i |
where K is the number of categories and
pi=fi/N
M1 can be interpreted as one minus the likelihood that a random pair of samples will belong to the same category, so this formula for IQV is a standardized likelihood of a random pair falling in the same category. This index has also referred to as the index of differentiation, the index of sustenance differentiation and the geographical differentiation index depending on the context it has been used in.
A second index is the M2[7] is:
M2=
K | |
K-1 |
\left(1-
K | |
\sum | |
i=1 |
2 | |
p | |
i |
\right)
where K is the number of categories and
pi=fi/N
K | |
K-1 |
M1 and M2 can be interpreted in terms of variance of a multinomial distribution (there called an "expanded binomial model"). M1 is the variance of the multinomial distribution and M2 is the ratio of the variance of the multinomial distribution to the variance of a binomial distribution.
The M4 index is
M4=
| |||||||||
|
where m is the mean.
The formula for M6 is
M6=K\left[1-
| |||||||||
2N |
\right]
m=
| |||||||||
N |
This formula can be simplified
M6=K\left[1-
| ||||||||||||
2 |
\right]
where pi is the proportion of the sample in the ith category.
In practice M1 and M6 tend to be highly correlated which militates against their combined use.
The sum
K | |
\sum | |
i=1 |
2 | |
p | |
i |
has also found application. This is known as the Simpson index in ecology and as the Herfindahl index or the Herfindahl-Hirschman index (HHI) in economics. A variant of this is known as the Hunter–Gaston index in microbiology[8]
In linguistics and cryptanalysis this sum is known as the repeat rate. The incidence of coincidence (IC) is an unbiased estimator of this statistic[9]
\operatorname{IC}=\sum
fi(fi-1) | |
n(n-1) |
where fi is the count of the ith grapheme in the text and n is the total number of graphemes in the text.
The M1 statistic defined above has been proposed several times in a number of different settings under a variety of names. These include Gini's index of mutability,[10] Simpson's measure of diversity,[11] Bachi's index of linguistic homogeneity,[12] Mueller and Schuessler's index of qualitative variation,[13] Gibbs and Martin's index of industry diversification,[14] Lieberson's index. and Blau's index in sociology, psychology and management studies.[15] The formulation of all these indices are identical.
Simpson's D is defined as
D=1-
K | |
\sum | |
i=1 |
{
ni(ni-1) | |
n(n-1) |
}
where n is the total sample size and ni is the number of items in the ith category.
For large n we have
u\sim1-
K | |
\sum | |
i=1 |
2 | |
p | |
i |
Another statistic that has been proposed is the coefficient of unalikeability which ranges between 0 and 1.[16]
u=
c(x,y) | |
n2-n |
where n is the sample size and c(x,y) = 1 if x and y are unalike and 0 otherwise.
For large n we have
u\sim1-
K | |
\sum | |
i=1 |
2 | |
p | |
i |
where K is the number of categories.
Another related statistic is the quadratic entropy
H2=2\left(1-
K | |
\sum | |
i=1 |
2 | |
p | |
i |
\right)
which is itself related to the Gini index.
Greenberg's monolingual non weighted index of linguistic diversity[17] is the M2 statistic defined above.
Another index – the M7 – was created based on the M4 index of [18]
M7=
| |||||||||||||||
2\sumRi |
where
R=
O | |
E |
=
O | |
nipj |
and
R=
| |||||||||||||||
|
where K is the number of categories, L is the number of subtypes, Oij and Eij are the number observed and expected respectively of subtype j in the ith category, ni is the number in the ith category and pj is the proportion of subtype j in the complete sample.
Note: This index was designed to measure women's participation in the work place: the two subtypes it was developed for were male and female.
These indices are summary statistics of the variation within the sample.
The Berger–Parker index, named after Wolfgang H. Berger and Frances Lawrence Parker, equals the maximum
pi
pi
This index is strictly applicable only to entire populations rather than to finite samples. It is defined as
IB=
| |||||||||
N |
where N is total number of individuals in the population, ni is the number of individuals in the ith category and N! is the factorial of N.Brillouin's index of evenness is defined as
EB=IB/IB(
where IB(max) is the maximum value of IB.
Hill suggested a family of diversity numbers[20]
Na=
1 | ||||||||||||||
|
For given values of a, several of the other indices can be computed
Hill also suggested a family of evenness measures
E=
Na | |
Nb |
where a > b.
Hill's E4 is
E4=
N2 | |
N1 |
Hill's E5 is
E5=
N2-1 | |
N1-1 |
IMarg=
S-1 | |
logeN |
where S is the number of data types in the sample and N is the total size of the sample.[21]
IMen=
S | |
\sqrt{N |
}
where S is the number of data types in the sample and N is the total size of the sample.[22]
In linguistics this index is the identical with the Kuraszkiewicz index (Guiard index) where S is the number of distinct words (types) and N is the total number of words (tokens) in the text being examined.[23] [24] This index can be derived as a special case of the Generalised Torquist function.[25]
This is a statistic invented by Kempton and Taylor.[26] and involves the quartiles of the sample. It is defined as
Q=
| ||||||||||||
log(R2/R1) |
where R1 and R2 are the 25% and 75% quartiles respectively on the cumulative species curve, nj is the number of species in the jth category, nRi is the number of species in the class where Ri falls (i = 1 or 2).
This is taken from information theory
H=logeN-
1 | |
N |
\sumnipilog(pi)
where N is the total number in the sample and pi is the proportion in the ith category.
In ecology where this index is commonly used, H usually lies between 1.5 and 3.5 and only rarely exceeds 4.0.
An approximate formula for the standard deviation (SD) of H is
\operatorname{SD}(H)=
1 | |
N |
\left[\sumpi[loge(pi)]2-H2\right]
where pi is the proportion made up by the ith category and N is the total in the sample.
A more accurate approximate value of the variance of H(var(H)) is given by[27]
\operatorname{var}(H)=
| |||||||||
N |
+
K-1 | |
2N2 |
+
| |||||||||||||||||||||
6N3 |
where N is the sample size and K is the number of categories.
A related index is the Pielou J defined as
J=
H | |
loge(S) |
One difficulty with this index is that S is unknown for a finite sample. In practice S is usually set to the maximum present in any category in the sample.
The Rényi entropy is a generalization of the Shannon entropy to other values of q than unity. It can be expressed:
{}qH=
1 | |
1-q |
ln\left(
K | |
\sum | |
i=1 |
q | |
p | |
i |
\right)
which equals
{}qH=ln\left({1\over\sqrt[q-1]{{
K | |
\sum | |
i=1 |
pi
q-1 | |
p | |
i |
}}}\right)=ln({}qD)
This means that taking the logarithm of true diversity based on any value of q gives the Rényi entropy corresponding to the same value of q.
The value of
{}qD
McIntosh proposed measure of diversity:[28]
I=\sqrt{
K | |
\sum | |
i=1 |
2 | |
n | |
i |
}
where ni is the number in the ith category and K is the number of categories.
He also proposed several normalized versions of this index. First is D:
D=
N-I | |
N-\sqrt{N |
}
where N is the total sample size.
This index has the advantage of expressing the observed diversity as a proportion of the absolute maximum diversity at a given N.
Another proposed normalization is E — ratio of observed diversity to maximum possible diversity of a given N and K (i.e., if all species are equal in number of individuals):
E=
N-I | |||||
|
This was the first index to be derived for diversity.[29]
K=\alphaln(1+
N | |
\alpha |
)
where K is the number of categories and N is the number of data points in the sample. Fisher's α has to be estimated numerically from the data.
The expected number of individuals in the rth category where the categories have been placed in increasing size is
\operatornameE(nr)=\alpha
Xr | |
r |
where X is an empirical parameter lying between 0 and 1. While X is best estimated numerically an approximate value can be obtained by solving the following two equations
N=
\alphaX | |
1-X |
K=-\alphaln(1-X)
where K is the number of categories and N is the total sample size.
The variance of α is approximately[30]
\operatorname{var}(\alpha)=
\alpha | |
ln(X)(1-X) |
This index (Dw) is the distance between the Lorenz curve of species distribution and the 45 degree line. It is closely related to the Gini coefficient.[31]
In symbols it is
Dw=max[
ci | |
K |
-
i | |
N |
]
where max is the maximum value taken over the N data points, K is the number of categories (or species) in the data set and ci is the cumulative total up and including the ith category.
This is related to Simpson's D and is defined as
E=
1/D | |
K |
where D is Simpson's D and K is the number of categories in the sample.
Smith and Wilson suggested a number of indices based on Simpson's D.
E1=
1-D | |||||
|
E2=
loge(D) | |
loge(K) |
where D is Simpson's D and K is the number of categories.
E=
eH-1 | |
K-1 |
where H is the Shannon entropy and K is the number of categories.
This index is closely related to Sheldon's index which is
E=
eH | |
K |
where H is the Shannon entropy and K is the number of categories.
This index was created by Camargo in 1993.[32]
E=1-
K | |
\sum | |
i=1 |
K | |
\sum | |
j=i+1 |
pi-pj | |
K |
where K is the number of categories and pi is the proportion in the ith category.
This index was proposed by Smith and Wilson in 1996.[33]
B=1-
2 | |
\pi |
\arctan(\theta)
where θ is the slope of the log(abundance)-rank curve.
This is the slope of the log(abundance)-rank curve.
There are two versions of this index - one for continuous distributions (Ec) and the other for discrete (Ed).[34]
Ec=
| ||||||
|
Ed=
| |||||||||
|
where
O=1-
1 | |
2 |
\left|pi-
1 | |
K |
\right|
is the Schoener–Czekanoski index, K is the number of categories and N is the sample size.
This index (Rik) is based on Shannon's entropy.[35] It is defined as
Rik=
Hmax-Hobs | |
Hmax-Hmin |
where
X=\sumx
X=\sumx
H(X)=\sum
x | |
X |
log
X | |
x |
H(Y)=\sum
x | |
Y |
log
Y | |
x |
Hmin=
X | |
X+Y |
H(X)+
Y | |
X+Y |
H(Y)
Hmax=\sum\left(
x | |
X+Y |
log
X+Y | |
x |
+
x | |
X+Y |
log
X+Y | |
x |
\right)
Hobs=\sum
x+x | |
X+Y |
log
X+Y | |
x+x |
In these equations xij and xkj are the number of times the jth data type appears in the ith or kth sample respectively.
In a rarefied sample a random subsample n in chosen from the total N items. In this sample some groups may be necessarily absent from this subsample. Let
Xn
Xn
The rarefaction curve,
fn
fn=\operatornameE[Xn]=K-\binom{N}{n}
K | |
\sum | |
i=1 |
\binom{N-Ni}{n}
Note that 0 ≤ f(n) ≤ K.
Furthermore,
f(0)=0, f(1)=1, f(N)=K.
Despite being defined at discrete values of n, these curves are most frequently displayed as continuous functions.[36]
This index is discussed further in Rarefaction (ecology).
This is a z type statistic based on Shannon's entropy.[37]
V=
H-\operatornameE(H) | |
\operatorname{SD |
(H)}
where H is the Shannon entropy, E(H) is the expected Shannon entropy for a neutral model of distribution and SD(H) is the standard deviation of the entropy. The standard deviation is estimated from the formula derived by Pielou
SD(H)=
1 | |
N |
\left[\sumpi[loge(pi)]2-H2\right]
where pi is the proportion made up by the ith category and N is the total in the sample.
This is
I=
K | |
K' |
where K is the number of categories and K is the number of categories according to MacArthur's broken stick model yielding the observed diversity.
This index is used to compare the relationship between hosts and their parasites.[38] It incorporates information about the phylogenetic relationship amongst the host species.
STD=2
\sum\sum\omega | |
s(s-1) |
where s is the number of host species used by a parasite and ωij is the taxonomic distinctness between host species i and j.
Several indices with this name have been proposed.
One of these is
IQV=
| |||||||||||||||
1002(K-1) |
=
K | |
K-1 |
(1-
K | |
\sum | |
i=1 |
(pi/100)2)
where K is the number of categories and pi is the proportion of the sample that lies in the ith category.
This index is also known as the multigroup entropy index or the information theory index. It was proposed by Theil in 1972.[39] The index is a weighted average of the samples entropy.
Let
Ea=
a | |
\sum | |
i=1 |
pilog(pi)
and
H=
r | |
\sum | |
i=1 |
ni(E-Ei) | |
NE |
where pi is the proportion of type i in the ath sample, r is the total number of samples, ni is the size of the ith sample, N is the size of the population from which the samples were obtained and E is the entropy of the population.
Several of these indexes have been developed to document the degree to which different data types of interest may coexist within a geographic area.
Let A and B be two types of data item. Then the index of dissimilarity is
D=
1 | |
2 |
K | |
\sum | |
i=1 |
\left|
Ai | |
A |
-
Bi | |
B |
\right|
where
A=
K | |
\sum | |
i=1 |
Ai
B=
K | |
\sum | |
i=1 |
Bi
Ai is the number of data type A at sample site i, Bi is the number of data type B at sample site i, K is the number of sites sampled and || is the absolute value.
This index is probably better known as the index of dissimilarity (D).[40] It is closely related to the Gini index.
This index is biased as its expectation under a uniform distribution is > 0.
A modification of this index has been proposed by Gorard and Taylor.[41] Their index (GT) is
GT=D\left(1-
A | |
A+B |
\right)
The index of segregation (IS)[42] is
SI=
1 | |
2 |
K | |
\sum | |
i=1 |
\left|
Ai | |
A |
-
ti-Ai | |
T-A |
\right|
where
A=
K | |
\sum | |
i=1 |
Ai
T=
K | |
\sum | |
i=1 |
ti
and K is the number of units, Ai and ti is the number of data type A in unit i and the total number of all data types in unit i.
This index (H) is defined as[43]
H=1-
K | |
\sum | |
i=1 |
i | |
\sum | |
j=1 |
\sqrt{pipj}
where pi is the proportion of the sample composed of the ith variate.
See also: isolation index. This index (Lxy) was invented by Lieberson in 1981.[44]
Lxy=
1 | |
N |
K | |
\sum | |
i=1 |
XiYi | |
Xtot |
where Xi and Yi are the variables of interest at the ith site, K is the number of sites examined and Xtot is the total number of variate of type X in the study.
This index is defined as[45]
IR=
p-px | |
1-px |
where px is the proportion of the sample made up of variates of type X and
pxx=
| |||||||||
Nx |
where Nx is the total number of variates of type X in the study, K is the number of samples in the study and xi and pi are the number of variates and the proportion of variates of type X respectively in the ith sample.
The index of isolation is
II=
K | |
\sum | |
i=1 |
Ai | |
A |
Ai | |
ti |
where K is the number of units in the study, Ai and ti is the number of units of type A and the number of all units in ith sample.
A modified index of isolation has also been proposed
MII=
| ||||||
|
The MII lies between 0 and 1.
This index (GS) is defined as
GS=
1 | |
2 |
K | |
\sum | |
i=1 |
\left|
Ai | |
A |
-
ti | |
T |
\right|
where
A=
K | |
\sum | |
i=1 |
Ai
T=
K | |
\sum | |
i=1 |
ti
and Ai and ti are the number of data items of type A and the total number of items in the ith sample.
This index is defined as
IE=
K | |
\sum | |
i=1 |
Ai | |
A |
Bi | |
ti |
where
A=
K | |
\sum | |
i=1 |
Ai
and Ai and Bi are the number of types A and B in the ith category and ti is the total number of data points in the ith category.
This is a binary form of the cosine index.[46] It is used to compare presence/absence data of two data types (here A and B). It is defined as
O=
a | |
\sqrt{(a+b)(a+c) |
}
where a is the number of sample units where both A and B are found, b is number of sample units where A but not B occurs and c is the number of sample units where type B is present but not type A.
This coefficient was invented by Stanisław Kulczyński in 1927[47] and is an index of association between two types (here A and B). It varies in value between 0 and 1. It is defined as
K=
a | |
2 |
\left(
1 | |
a+b |
+
1 | |
a+c |
\right)
where a is the number of sample units where type A and type B are present, b is the number of sample units where type A but not type B is present and c is the number of sample units where type B is present but not type A.
This index was invented by Yule in 1900.[48] It concerns the association of two different types (here A and B). It is defined as
Q=
ad-bc | |
ad+bc |
where a is the number of samples where types A and B are both present, b is where type A is present but not type B, c is the number of samples where type B is present but not type A and d is the sample count where neither type A nor type B are present. Q varies in value between -1 and +1. In the ordinal case Q is known as the Goodman-Kruskal γ.
Because the denominator potentially may be zero, Leinhert and Sporer have recommended adding +1 to a, b, c and d.[49]
This index is defined as
Y=
\sqrt{ad | |
- |
\sqrt{bc}}{\sqrt{ad}+\sqrt{bc}}
where a is the number of samples where types A and B are both present, b is where type A is present but not type B, c is the number of samples where type B is present but not type A and d is the sample count where neither type A nor type B are present.
This index was invented by Baroni-Urbani and Buser in 1976.[50] It varies between 0 and 1 in value. It is defined as
BUB=
\sqrt{ad | |
+ |
a}{\sqrt{ad}+a+b+c}=
\sqrt{ad | |
+ |
a}{N+\sqrt{ad}-d}=1-
N-(a-d) | |
N+\sqrt{ad |
-d}
where a is the number of samples where types A and B are both present, b is where type A is present but not type B, c is the number of samples where type B is present but not type A and d is the sample count where neither type A nor type B are present. N is the sample size.
When d = 0, this index is identical to the Jaccard index.
This coefficient is defined as
H=
(a+d)-(b+c) | |
a+b+c+d |
=
(a+d)-(b+c) | |
N |
where a is the number of samples where types A and B are both present, b is where type A is present but not type B, c is the number of samples where type B is present but not type A and d is the sample count where neither type A nor type B are present. N is the sample size.
This coefficient is defined as
RT=
a+d | |
a+2(b+c)+d |
=
a+d | |
N+b+c |
where a is the number of samples where types A and B are both present, b is where type A is present but not type B, c is the number of samples where type B is present but not type A and d is the sample count where neither type A nor type B are present. N is the sample size
This coefficient is defined as
SS=
2(a+d) | |
2(a+d)+b+c |
=
2(a+d) | |
N+a+d |
where a is the number of samples where types A and B are both present, b is where type A is present but not type B, c is the number of samples where type B is present but not type A and d is the sample count where neither type A nor type B are present. N is the sample size.
This coefficient is defined as
SBD=\sqrt{
b+c | |
a+b+c+d |
}=\sqrt{
b+c | |
N |
}
where a is the number of samples where types A and B are both present, b is where type A is present but not type B, c is the number of samples where type B is present but not type A and d is the sample count where neither type A nor type B are present. N is the sample size.
This coefficient is defined as
RR=
a | |
a+b+c+d |
=
a | |
N |
where a is the number of samples where types A and B are both present, b is where type A is present but not type B, c is the number of samples where type B is present but not type A and d is the sample count where neither type A nor type B are present. N is the sample size.
This coefficient is defined as
\varphi=
ad-bc | |
\sqrt{(a+b)(a+c)(b+c)(c+d) |
}
where a is the number of samples where types A and B are both present, b is where type A is present but not type B, c is the number of samples where type B is present but not type A and d is the sample count where neither type A nor type B are present.
This coefficient is defined as
S=
b+c | |
b+c+d |
=
b+c | |
N-a |
where b is the number of samples where type A is present but not type B, c is the number of samples where type B is present but not type A and d is the sample count where neither type A nor type B are present. N is the sample size.
This coefficient is defined as
S=
a | |
a+min(b,c) |
where b is the number of samples where type A is present but not type B, c is the number of samples where type B is present but not type A.
This coefficient is defined as
D=
ad-bc | |
\sqrt{(a+b+c+d)(a+b)(a+c) |
}=
ad-bc | |
\sqrt{N(a+b)(a+c) |
}
where a is the number of samples where types A and B are both present, b is where type A is present but not type B, c is the number of samples where type B is present but not type A and d is the sample count where neither type A nor type B are present. N is the sample size.
This coefficient was proposed by Stephen Alfred Forbes in 1907.[51] It is defined as
F=
aN | |
(a+b)(a+c) |
where a is the number of samples where types A and B are both present, b is where type A is present but not type B, c is the number of samples where type B is present but not type A and d is the sample count where neither type A nor type B are present. N is the sample size (N = a + b + c + d).
A modification of this coefficient which does not require the knowledge of d has been proposed by Alroy[52]
F=
a(n+\sqrt{n | |
) |
}{a(n+\sqrt{n})+
3 | |
2 |
bc}=1-
3bc | |
2a(n+\sqrt{n |
)+3bc}
Where n = a + b + c.
This coefficient is defined as
SM=
a+d | |
a+b+c+d |
=
a+d | |
N |
where a is the number of samples where types A and B are both present, b is where type A is present but not type B, c is the number of samples where type B is present but not type A and d is the sample count where neither type A nor type B are present. N is the sample size.
This coefficient is defined as
F=
(a+b+c+d)(a-0.5)2 | |
(a+b)(a+c) |
=
N(a-0.5)2 | |
(a+b)(a+c) |
where a is the number of samples where types A and B are both present, b is where type A is present but not type B, c is the number of samples where type B is present but not type A and d is the sample count where neither type A nor type B are present. N is the sample size.
This coefficient is defined as
S=log\left[
| ||||||
(a+b)(a+c)(b+d)(c+d) |
\right]
where a is the number of samples where types A and B are both present, b is where type A is present but not type B, c is the number of samples where type B is present but not type A, d is the sample count where neither type A nor type B are present, n equals a + b + c + d and || is the modulus (absolute value) of the difference.
This coefficient is defined as
M=
4(ad-bc) | |
(a+d)2+(b+c)2 |
where a is the number of samples where types A and B are both present, b is where type A is present but not type B, c is the number of samples where type B is present but not type A and d is the sample count where neither type A nor type B are present.
In 1884 Charles Peirce suggested[53] the following coefficient
P=
ab+bc | |
ab+2bc+cd |
where a is the number of samples where types A and B are both present, b is where type A is present but not type B, c is the number of samples where type B is present but not type A and d is the sample count where neither type A nor type B are present.
In 1975 Hawkin and Dotson proposed the following coefficient
HD=
1 | |
2 |
\left(
a | |
a+b+c |
+
d | |
b+c+d |
\right)=
1 | |
2 |
\left(
a | |
N-d |
+
d | |
N-a |
\right)
where a is the number of samples where types A and B are both present, b is where type A is present but not type B, c is the number of samples where type B is present but not type A and d is the sample count where neither type A nor type B are present. N is the sample size.
In 1901 Benini proposed the following coefficient
B=
a-(a+b)(a+c) | |
a+min(b,c)-(a+b)(a+c) |
where a is the number of samples where types A and B are both present, b is where type A is present but not type B and c is the number of samples where type B is present but not type A. Min(b, c) is the minimum of b and c.
Gilbert proposed the following coefficient
G=
a-(a+b)(a+c) | |
a+b+c-(a+b)(a+c) |
=
a-(a+b)(a+c) | |
N-(a+b)(a+c)-d |
where a is the number of samples where types A and B are both present, b is where type A is present but not type B, c is the number of samples where type B is present but not type A and d is the sample count where neither type A nor type B are present. N is the sample size.
The Gini index is
G=
a-(a+b)(a+c) | |
\sqrt{(1-(a+b)2)(1-(a+c)2) |
}
where a is the number of samples where types A and B are both present, b is where type A is present but not type B and c is the number of samples where type B is present but not type A.
The modified Gini index is
GM=
a-(a+b)(a+c) | |||||
|
where a is the number of samples where types A and B are both present, b is where type A is present but not type B and c is the number of samples where type B is present but not type A.
Kuhn proposed the following coefficient in 1965
I=
2(ad-bc) | |
K(2a+b+c) |
=
2(ad-bc) | |
K(N+a-d) |
where a is the number of samples where types A and B are both present, b is where type A is present but not type B and c is the number of samples where type B is present but not type A. K is a normalizing parameter. N is the sample size.
This index is also known as the coefficient of arithmetic means.
Eyraud proposed the following coefficient in 1936
I=
a-(a+b)(a+c) | |
(a+c)(a+d)(b+d)(c+d) |
where a is the number of samples where types A and B are both present, b is where type A is present but not type B, c is the number of samples where type B is present but not type A and d is the number of samples where both A and B are not present.
This is defined as
\operatorname{SD}=
b+c | |
b+c+d |
=
b+c | |
N-a |
where a is the number of samples where types A and B are both present, b is where type A is present but not type B, c is the number of samples where type B is present but not type A and d is the number of samples where both A and B are not present. N is the sample size.
This is defined as
TI=1-
a | |
b+c+d |
=1-
a | |
N-a |
=
N-2a | |
N-a |
where a is the number of samples where types A and B are both present, b is where type A is present but not type B, c is the number of samples where type B is present but not type A and d is the number of samples where both A and B are not present. N is the sample size.
This is defined as
PSI=a-bc
where a is the number of samples where types A and B are both present, b is where type A is present but not type B, c is the number of samples where type B is present but not type A.
This is also known as the Bray–Curtis index, Schoener's index, least common percentage index, index of affinity or proportional similarity. It is related to the Sørensen similarity index.
CZI=
\summin(xi,xj) | |
\sum(xi+xj) |
where xi and xj are the number of species in sites i and j respectively and the minimum is taken over the number of species in common between the two sites.
The Canberra distance is a weighted version of the L1 metric. It was introduced by introduced in 1966[54] and refined in 1967[55] by G. N. Lance and W. T. Williams. It is used to define a distance between two vectors – here two sites with K categories within each site.
The Canberra distance d between vectors p and q in a K-dimensional real vector space is
d(p,q)=
n | |
\sum | |
i=1 |
|pi-qi| | |
|pi|+|qi| |
where pi and qi are the values of the ith category of the two vectors.
This is used to measure similarities between communities.
CC=
2c | |
s1+s2 |
where s1 and s2 are the number of species in community 1 and 2 respectively and c is the number of species common to both areas.
This is a measure of the similarity between two samples:
J=
A | |
A+B+C |
where A is the number of data points shared between the two samples and B and C are the data points found only in the first and second samples respectively.
This index was invented in 1902 by the Swiss botanist Paul Jaccard.[56]
Under a random distribution the expected value of J is[57]
J=
1 | |
A |
\left(
1 | |
A+B+C |
\right)
The standard error of this index with the assumption of a random distribution is
SE(J)=\sqrt{
A(B+C) | |
N(A+B+C)3 |
}
where N is the total size of the sample.
This is a measure of the similarity between two samples:
D=
2A | |
2A+B+C |
where A is the number of data points shared between the two samples and B and C are the data points found only in the first and second samples respectively.
See also: Sørensen–Dice coefficient.
This is a measure of the similarity between two samples:
M=
N-B-C | |
N |
=1-
B+C | |
N |
where N is the number of data points in the two samples and B and C are the data points found only in the first and second samples respectively.
Morisita's index of dispersion (Im) is the scaled probability that two points chosen at random from the whole population are in the same sample.[58] Higher values indicate a more clumped distribution.
Im=
\sumx(x-1) | |
nm(m-1) |
An alternative formulation is
Im=n
\sumx2-\sumx | |
\left(\sumx\right)2-\sumx |
where n is the total sample size, m is the sample mean and x are the individual values with the sum taken over the whole sample. It is also equal to
Im=
n IMC | |
nm-1 |
where IMC is Lloyd's index of crowding.[59]
This index is relatively independent of the population density but is affected by the sample size.
Morisita showed that the statistic[58]
Im\left(\sumx-1\right)+n-\sumx
is distributed as a chi-squared variable with n - 1 degrees of freedom.
An alternative significance test for this index has been developed for large samples.[60]
z=
Im-1 | |
2/nm2 |
where m is the overall sample mean, n is the number of sample units and z is the normal distribution abscissa. Significance is tested by comparing the value of z against the values of the normal distribution.
Morisita's overlap index is used to compare overlap among samples.[61] The index is based on the assumption that increasing the size of the samples will increase the diversity because it will include different habitats
CD=
| |||||||||
(Dx+Dy)XY |
xi is the number of times species i is represented in the total X from one sample.
yi is the number of times species i is represented in the total Y from another sample.
Dx and Dy are the Simpson's index values for the x and y samples respectively.
S is the number of unique species
CD = 0 if the two samples do not overlap in terms of species, and CD = 1 if the species occur in the same proportions in both samples.
Horn's introduced a modification of the index[62]
CH=
| ||||||||||||||
|
+
S | |
{\sum | |
i=1 |
2 | |
y | |
i |
\overY2}\right)XY}
Smith-Gill developed a statistic based on Morisita's index which is independent of both sample size and population density and bounded by −1 and +1. This statistic is calculated as follows[63]
First determine Morisita's index (Id) in the usual fashion. Then let k be the number of units the population was sampled from. Calculate the two critical values
Mu=
| |||||||||
\sumx-1 |
Mc=
| |||||||||
\sumx-1 |
where χ2 is the chi square value for n − 1 degrees of freedom at the 97.5% and 2.5% levels of confidence.
The standardised index (Ip) is then calculated from one of the formulae below
When Id ≥ Mc > 1
Ip=0.5+0.5\left(
Id-Mc | |
k-Mc |
\right)
When Mc > Id ≥ 1
Ip=0.5\left(
Id-1 | |
Mu-1 |
\right)
When 1 > Id ≥ Mu
Ip=-0.5\left(
Id-1 | |
Mu-1 |
\right)
When 1 > Mu > Id
Ip=-0.5+0.5\left(
Id-Mu | |
Mu |
\right)
Ip ranges between +1 and −1 with 95% confidence intervals of ±0.5. Ip has the value of 0 if the pattern is random; if the pattern is uniform, Ip < 0 and if the pattern shows aggregation, Ip > 0.
These indices are a measure of evenness between samples.[64]
E1=
I-Imin | |
Imax-Imin |
E2=
I | |
Imax |
where I is an index of diversity, Imax and Imin are the maximum and minimum values of I between the samples being compared.
Loevinger has suggested a coefficient H defined as follows:
H=\sqrt{
pmax(1-pmin) | |
pmin(1-pmax) |
}
where pmax and pmin are the maximum and minimum proportions in the sample.
The Tversky index [65] is an asymmetric measure that lies between 0 and 1. For samples A and B the Tversky index (S) is
S=
|A\capB| | |
|A\capB|+\alpha|A-B|+\beta|B-A| |
The values of α and β are arbitrary. Setting both α and β to 0.5 gives Dice's coefficient. Setting both to 1 gives Tanimoto's coefficient.
A symmetrical variant of this index has also been proposed.[66]
S1=
|A\capB| | |
|A\capB|+\beta\left(\alphaa+(1-\alpha)b\right) |
where
a=min\left(|X-Y|,|Y-X|\right)
b=max\left(|X-Y|,|Y-X|\right)
Several similar indices have been proposed.
Monostori et al. proposed the SymmetricSimilarity index[67]
SS(A,B)=
|d(A)\capd(B)| | |
|d(A)+d(B)| |
where d(X) is some measure of derived from X.
Bernstein and Zobel have proposed the S2 and S3 indexes[68]
S2=
|d(A)\capd(B)| | |
min(|d(A)|,|d(B))| |
S3=
2|d(A)\capd(B)| | |
|d(A)+d(B)| |
S3 is simply twice the SymmetricSimilarity index. Both are related to Dice's coefficient
A number of metrics (distances between samples) have been proposed.
While this is usually used in quantitative work it may also be used in qualitative work. This is defined as
d=\sqrt{
N | |
\sum | |
i=1 |
(x-x)2}
where djk is the distance between xij and xik.
This is defined as
GD=
| |||||||||
|
where di is the distance between the ith samples and wi is the weighing give to the ith distance.
While this is more commonly used in quantitative work it may also be used in qualitative work. This is defined as
d=
N | |
\sum | |
i=1 |
|x-x|
where djk is the distance between xij and xik and || is the absolute value of the difference between xij and xik.
A modified version of the Manhattan distance can be used to find a zero (root) of a polynomial of any degree using Lill's method.
This is related to the Manhattan distance. It was described by Prevosti et al. and was used to compare differences between chromosomes.[69] Let P and Q be two collections of r finite probability distributions. Let these distributions have values that are divided into k categories. Then the distance DPQ is
DPQ=
1 | |
r |
r | |
\sum | |
j=1 |
k | |
\sum | |
i=1 |
|p-q|
where r is the number of discrete probability distributions in each population, kj is the number of categories in distributions Pj and Qj and pji (respectively qji) is the theoretical probability of category i in distribution Pj (Qj) in population P(Q).
Its statistical properties were examined by Sanchez et al.[70] who recommended a bootstrap procedure to estimate confidence intervals when testing for differences between samples.
Let
A=\sumx
B=\sumx
J=\summin(x,x)
where min(x,y) is the lesser value of the pair x and y.
Then
d=A+B-2J
is the Manhattan distance,
d=
A+B-2J | |
A+B |
is the Bray−Curtis distance,
d=
A+B-2J | |
A+B-J |
is the Jaccard (or Ruzicka) distance and
d=1-
1 | |
2 |
\left(
J | |
A |
+
J | |
B |
\right)
is the Kulczynski distance.
HaCohen-Kerner et al. have proposed a variety of metrics for comparing two or more texts.[71]
If the categories are at least ordinal then a number of other indices may be computed.
Leik's measure of dispersion (D) is one such index.[72] Let there be K categories and let pi be fi/N where fi is the number in the ith category and let the categories be arranged in ascending order. Let
ca=
a | |
\sum | |
i=1 |
pi
where a ≤ K. Let da = ca if ca ≤ 0.5 and 1 - ca ≤ 0.5 otherwise. Then
D=2
K | |
\sum | |
a=1 |
da | |
K-1 |
This is the square of the coefficient of variation divided by N − 1 where N is the sample size.
H=
1 | |
N-1 |
s2 | |
m2 |
where m is the mean and s is the standard deviation.
The potential-for-conflict Index (PCI) describes the ratio of scoring on either side of a rating scale's centre point.[73] This index requires at least ordinal data. This ratio is often displayed as a bubble graph.
The PCI uses an ordinal scale with an odd number of rating points (−n to +n) centred at 0. It is calculated as follows
PCI=
Xt | |
Z |
\left[1-\left|
| |||||||||
Xt |
-
| |||||||||
Xt |
\right|\right]
where Z = 2n, |·| is the absolute value (modulus), r+ is the number of responses in the positive side of the scale, r− is the number of responses in the negative side of the scale, X+ are the responses on the positive side of the scale, X− are the responses on the negative side of the scale and
Xt=
r+ | |
\sum | |
i=1 |
|X+|+
r- | |
\sum | |
i=1 |
|X-|
Theoretical difficulties are known to exist with the PCI. The PCI can be computed only for scales with a neutral center point and an equal number of response options on either side of it. Also a uniform distribution of responses does not always yield the midpoint of the PCI statistic but rather varies with the number of possible responses or values in the scale. For example, five-, seven- and nine-point scales with a uniform distribution of responses give PCIs of 0.60, 0.57 and 0.50 respectively.
The first of these problems is relatively minor as most ordinal scales with an even number of response can be extended (or reduced) by a single value to give an odd number of possible responses. Scale can usually be recentred if this is required. The second problem is more difficult to resolve and may limit the PCI's applicability.
The PCI has been extended[74]
PCI2=
| |||||||||||||||
\delta |
where K is the number of categories, ki is the number in the ith category, dij is the distance between the ith and ith categories, and δ is the maximum distance on the scale multiplied by the number of times it can occur in the sample. For a sample with an even number of data points
\delta=
N2 | |
2 |
dmax
and for a sample with an odd number of data points
\delta=
N2-1 | |
2 |
dmax
where N is the number of data points in the sample and dmax is the maximum distance between points on the scale.
Vaske et al. suggest a number of possible distance measures for use with this index.[74]
D1:d=|ri-rj|-1
if the signs (+ or −) of ri and rj differ. If the signs are the same dij = 0.
D2:d=|ri-rj|
D3:d=|ri-rj|p
where p is an arbitrary real number > 0.
Dp:d=[|ri-rj|-(m-1)]p
if sign(ri) ≠ sign(ri) and p is a real number > 0. If the signs are the same then dij = 0. m is D1, D2 or D3.
The difference between D1 and D2 is that the first does not include neutrals in the distance while the latter does. For example, respondents scoring −2 and +1 would have a distance of 2 under D1 and 3 under D2.
The use of a power (p) in the distances allows for the rescaling of extreme responses. These differences can be highlighted with p > 1 or diminished with p < 1.
In simulations with a variates drawn from a uniform distribution the PCI2 has a symmetric unimodal distribution.[74] The tails of its distribution are larger than those of a normal distribution.
Vaske et al. suggest the use of a t test to compare the values of the PCI between samples if the PCIs are approximately normally distributed.
This measure is a weighted average of the degree of agreement the frequency distribution.[75] A ranges from −1 (perfect bimodality) to +1 (perfect unimodality). It is defined as
A=U\left(1-
S-1 | |
K-1 |
\right)
where U is the unimodality of the distribution, S the number of categories that have nonzero frequencies and K the total number of categories.
The value of U is 1 if the distribution has any of the three following characteristics:
With distributions other than these the data must be divided into 'layers'. Within a layer the responses are either equal or zero. The categories do not have to be contiguous. A value for A for each layer (Ai) is calculated and a weighted average for the distribution is determined. The weights (wi) for each layer are the number of responses in that layer. In symbols
Aoverall=\sumwiAi
A uniform distribution has A = 0: when all the responses fall into one category A = +1.
One theoretical problem with this index is that it assumes that the intervals are equally spaced. This may limit its applicability.
If there are n units in the sample and they are randomly distributed into k categories (n ≤ k), this can be considered a variant of the birthday problem.[76] The probability (p) of all the categories having only one unit is
p=
n | |
\prod | |
i=1 |
\left(1-
i | |
k |
\right)
p=\exp\left(
-n2 | |
2k |
\right)
This approximation follows from the exact formula as follows:
loge\left(1-
i | |
k |
\right) ≈ -
i | |
k |
For p = 0.5 and p = 0.05 respectively the following estimates of n may be useful
n=1.2\sqrt{k}
n=2.448\sqrt{k} ≈ 2.5\sqrt{k}
This analysis can be extended to multiple categories. For p = 0.5 and p 0.05 we have respectively
n=1.2\sqrt{
1 | |||||||||||
|
}
n ≈ 2.5\sqrt{
1 | |||||||||||
|
}
where ci is the size of the ith category. This analysis assumes that the categories are independent.
If the data is ordered in some fashion then for at least one event occurring in two categories lying within j categories of each other than a probability of 0.5 or 0.05 requires a sample size (n) respectively of[77]
n=1.2\sqrt{
k | |
2j+1 |
}
n ≈ 2.5\sqrt{
k | |
2j+1 |
}
where k is the number of categories.
Whether or not there is a relation between birthdays and death days has been investigated with the statistic[78]
-log10\left(
1+2d | |
365 |
\right),
where d is the number of days in the year between the birthday and the death day.
The Rand index is used to test whether two or more classification systems agree on a data set.[79]
Given a set of
n
S=\{o1,\ldots,on\}
S
X=\{X1,\ldots,Xr\}
Y=\{Y1,\ldots,Ys\}
a
S
X
Y
b
S
X
Y
c
S
X
Y
d
S
X
Y
The Rand index -
R
R=
a+b | |
a+b+c+d |
=
a+b | |
{n\choose2 |
}
a+b
X
Y
c+d
X
Y
The adjusted Rand index is the corrected-for-chance version of the Rand index.[79] [80] [81] Though the Rand Index may only yield a value between 0 and +1, the adjusted Rand index can yield negative values if the index is less than the expected index.[82]
Given a set
S
n
X=\{X1,X2,\ldots,Xr\}
Y=\{Y1,Y2,\ldots,Ys\}
X
Y
\left[n\right]
n
Xi
Yj
n=|Xi\capYj|
X\Y | Y1 | Y2 | \ldots | Ys | Sums |
---|---|---|---|---|---|
X1 | n | n | \ldots | n | a1 |
X2 | n | n | \ldots | n | a2 |
\vdots | \vdots | \vdots | \ddots | \vdots | |
Xr | n | n | \ldots | n | ar |
Sums | b1 | b2 | \ldots | bs | |
The adjusted form of the Rand Index, the Adjusted Rand Index, is
AdjustedIndex=
Index-ExpectedIndex | |
MaxIndex-ExpectedIndex |
,
more specifically
ARI=
\sumij\binom{nij | |
2 |
-\left.\left[\sumi\binom{ai}2\sumj\binom{bj}2\right]\right/\binomn2}{
1 | |
2 |
\left[\sumi\binom{ai}2+\sumj\binom{bj}2\right]-\left.\left[\sumi\binom{ai}2\sumj\binom{bj}2\right]\right/\binomn2}
where
nij,ai,bj
Since the denominator is the total number of pairs, the Rand index represents the frequency of occurrence of agreements over the total pairs, or the probability that
X
Y
Different indices give different values of variation, and may be used for different purposes: several are used and critiqued in the sociology literature especially.
If one wishes to simply make ordinal comparisons between samples (is one sample more or less varied than another), the choice of IQV is relatively less important, as they will often give the same ordering.
Where the data is ordinal a method that may be of use in comparing samples is ORDANOVA.
In some cases it is useful to not standardize an index to run from 0 to 1, regardless of number of categories or samples, but one generally so standardizes it.