# The Measure of Consensus

### (or The Index of Disagreement)

First and best free consensus tools to check for Consensus Levels and

The Index of Disagreement within groups.

## Statistical Concepts

Before going to the statistical construction, we need to notice that the index to measure consensus given in this article is established on the fact that when using a Likert scale, we ha handle the data as interval, and can compute the mean and the variance. We also notice that the range of the variance is always a function of the mean.\\ In this section, we will briefly discuss several statistical terms that are widely used not only in statistical field, but in many other areas of applied science. These concepts are: Mean, Variance, Expectation Value and Conditional Probability. Observations on the relationship between the mean and the variance are presented in this section as well. Since both variance and the expected value apply only to numerically-valued random variables, we assume in this article that all random variables have numerical values \cite{Hogg05}. Finally, we end this short introduction by mentioning that all our work here is for discrete random variable.\\

#### Mean

The mean has more than one definition in mathematics depending on the context. In statistics, mean is used to refer to the measure of central tendency of the data being collected \cite{Hogg05}. Mathematically, the mean of the discrete random variable $X$ is a weighted average of the possible values that the random variable can take. It is not like the sample mean of a group of examination, which gives each examination the same, or equal, weight. The mean of random variable gives each consequence $x_i$ depending on its probability $p_i$. The popular symbol for the mean is $\mu$, which is formally defined by: \begin{align} \label{meaneq} \mu_x & = x_1 p_1 + x_2 p_2 + … + x_n p_n \\ \nonumber & = \sum x_i p_i \end{align} In other words, the mean of the random variable is the expected average outcome over many observations.

#### Variance

\par Another statistical measure used frequently in statistics field, and many other fields, is variance. Variance is used to measure how far a set of points are spread out. A zero variance refers to all points that are the same. It is always a non-negative function. A small value of variance means that all points lie very close to the mean and, of course, to each other, while a large value of variance signifies that the points are distant from the mean and from each other \cite{Blum12}. \par The variance of a discrete random variable $X$ (commonly symbolized by $\sigma^2$) measures the expansion, or variability, of the distribution. Formally, the variance of a random variable $X$ is defined by:\\ \begin{align} \label{vareq} \sigma^2 _X = \sum (x_i - \mu_x)^2 p_i \end{align}

#### Expectation Value

Another concept related to the mean for a probability distribution is the concept of expected value, or expectation. The expected value $E(x)$ is used in different kinds of games of chance, in insurance, and in many other area, like decision theory. If we ran a probability experiment over and over, keeping track of the result, the expected value is the average of all the values acquired. The formula of the expected value has the same formula of the theoretical mean, and hence, it is the theoretical mean of the probability distribution. That is, the expected value of a game that has result $x_1, x_2, \dots , x_n$ with probabilities $p_1, p_2, \dots , p_n$, will be calculated by: \begin{align} \label{expeq} \nonumber & E(X) =x_1 p_1 + x_2 p_2 + . . . + x_n p_n \\ & i.e. \\ & \mu = E(x) = \sum x P(x). \nonumber \end{align} \par Furthermore, the expected value is not used for the random variable $X$ only, but we can find the expected value for any real-valued random variable, say $f(X)$. Although the understandable way to find the expected value of $f(X)$ is to find first the distribution function of this random variable, and then apply the definition of expectation, there is a better way to determine the expected value of $f(X)$ as presented by Blitzstein in \cite{Grin97}. The general formula to find the expected value of $f(X)$, is given by \begin{align} \label{expeq2} E(f(X))= \sum f(x) d(x) \end{align} \par Where $X$ is a discrete random variable and $d(x)$ is a distribution function. Notice that, therefore, we can rewrite (\ref{vareq}) as: \begin{align} \label{vareq2} \sigma^2 = E[X^2]- \mu^2 \end{align} Finally, in this article our distribution function is the probability function $p_i$.

#### Conditional Probability

In statistics, there is no difference when determining the probability for one event or for more than one independent event, like the probability to pass the test of class $A$ and to get a full grade for the homework of class $B$. However, there are many dependent events in our life that we want to obtain the probability of them, such as to park on the non-parking place and get a parking ticket or having a high level of education with a wide experience and get a job. These kind of events when the probability of the second event is dependent on the probability of the first event are called a conditional probability. That means, the conditional probability of an event $B$ is related to an event $A$. The probability of event $B$ will occur after event $A$ has previously taken place. The formal notation for the conditional probability is given by $P(B|A)$ which means the event $B$ happens given that event $A$ has already occurred \cite{Blum12}. To see the difference between the “regular” probability and the conditional probability, let's take a look to the following simple example. \begin{Example} \par Assume we have two fair six-sided dice, say $A$ is the first die and $B$ is the second, and we want to predict the outcome of $A=3$. In other words, what is the probability that $A=3$? \par Basically, $A=3$ in exactly $6$ of the $36$ outcomes, and hence $P(A=3)=6/36 = 1/6 = 0.167$. What about the prediction of $A+B \leq 6$, we mean, what is the probability of $A+B \leq 6?$ This will be exactly $15$ in the same results we have $36$. Then $P(A+B \leq 6) = 15/36 = 0.417$. Now what if we want to find the probability of $A=3$ given that $A+B \leq 6$, so the conditional probability $P(A=3 | A+B \leq 6) = 3/15$. \end{Example} \newpage

## Some Computational Geometry Concepts

As known, computational geometry broadly construed is the study of algorithms for solving geometric problems on a computer. It stood out from the fields of algorithms design and analysis at the end of 1970s \cite{Berg08}. The early algorithmic solutions for numerous geometric problems were slow or difficult to understand and apply, but in recent years, many of the new algorithmic techniques have progressed and many of the previous approaches simplified. The importance of computational geometry is because of the collection of two factors: sound connections the classical mathematics and the theory of computer science on one side, and many ties with applications on the others \cite{Guib} \cite{Shab14}. Finally, this article will focus on some of the computational geometry concepts and definitions supported with numerous theorems. These concepts are Convex set, Convex hull, Cone and Convex cone. Finding the area of polygon by dividing each polygon into triangles will be discussed in this section as well.

#### Convex Set

Let introduce the convex set in $R^n$ first \cite{Deng13}. \begin{Definition} (Convex set) A set $S \subset R^n$ is called a {\bf convex set} if the straight line segment connecting any two points in $S$ lies entirely in $S$, i.e. for any $x_1, x_2 \in S$ and any $\lambda \in [0,1]$, we have $$\lambda x_1 + (1-\lambda)x_2 \in S.$$ \end{Definition} \par Intuitively, in the two-dimensional space $R^2$, the circle shaped set in figure (\ref{ConvexFigure}) is a convex set, while the kidney shaped set in figure (\ref{NonConvexFigure}) is not since the line segment connecting the two points in the set shown as dots is not contained in this set. It is easy to prove the following conclusion, which shows that the convexity is preserved under intersection. \begin{figure}[h] \centering \subfloat[Convex set.]{\includegraphics[width=0.4\textwidth]{ConvexPolygon} \label{ConvexFigure}} \hfill \subfloat[Non-convex set.]{\includegraphics[width=0.4\textwidth]{NonConvex} \label{NonConvexFigure}} \caption{Convex and Non-convex sets} \label{Conv_Non_conv_Figure} \end{figure} \begin{Theorem} If $S_1$ and $S_2$ are convex sets, then their intersection $S_1 \cap S_2$ is also a convex set. \end{Theorem} Another important definition related to the convex set is a \textit{convex combination} that define as below. \begin{Definition} Let $S$ be a convex set, for any $x_1, x_2, \dots x_n \in S$ and any non-negative numbers $\{\lambda_1, \lambda_2, \dots , \lambda_n \}$ with $\sum_{i=1}^{n} \lambda_i =1$, the vector $\sum_{i=1}^{n} \lambda_i x_i$ is called the convex combination of $x_1, x_2, \dots x_n$ and $\sum_{i=1}^{n} \lambda_i x_i$ belongs to $S$. \end{Definition}

#### Convex Hull

In many mathematics and computational geometry fields, the convex hull plays a critical role. Thus, it can be found in different fields for several purposes, such as: image processing, statistics, support vector machine and static code analysis. The measurement of brain size is one of many examples in our life that used convex hall as a measure. Brains are too involuted to be measured in an exact way; hence the convex hull is a way to prevail over this problem. Many attempts over recent years, or even decades, have been initiated to develop convex hull algorithms \cite{Ceul06}. In this work, since all the intersection points are known, the convex hull of a simple polygon will be sufficient to compute the area. Moreover, Bayer in \cite{Bayer99} presents a survey for deterministic, randomized and approximation algorithms for two and higher dimensions. \par The convex hull can be defined in several different ways. The simplest way to define the convex hull of a set of points, is as the smallest convex set that contain all the points. In Euclidean space, the plane is convex if every pair of points falls in the plane. In other words, any point along the straight line segment connecting every point pair is within the plane \cite{Zhong14}. Moreover, according to the definitions in the last section and this section the convex hull $S_X$ of a dataset X in the Euclidean space has the following equivalent definitions: \begin{itemize} \item the minimal convex set containing X, or \item the intersection of all convex sets containing X. or \item the set of all convex combinations of points in X. \end{itemize}

#### Cone and Convex Cone

\begin{Definition} (Cone and convex cone) $A$ set $K$ in $R^n$ is called a {\bf cone} if for every $x \in K$ and $\lambda \geq 0, \lambda x \in K$. $A$ set $K$ in $R^n$ is called a {\bf convex cone} if it is a cone and a convex set, which means that for any $u,v \in K$ and $\lambda_1,\lambda_2 \geq 0, \lambda_1 x_ + \lambda_2 x_2 \in K$. \end{Definition} \begin{Definition} (Proper cone) $A$ set $K$ in $R^n$ is called a {\bf proper cone} if it satisfies: \begin{enumerate} %[label=(\roman*)] \item $K$ is a convex cone; \item $K$ is closed; \item $K$ is solid, which means it has nonempty interior; \item $K$ is pointed, which means that it contains no line (or, equivalently, $x$ must be null $(x = 0)$ if $x \in K$ and $-x\ in K$). \end{enumerate} \end{Definition} \begin{Example} The nonnegative orthant $K=R_+^n in R^n$ $$R_+^n={u=(u_1, \ldots, u_n)^T \in R^n | u_i \geq 0, i=1, \ldots, n}$$ is a proper cone. \end{Example}

#### Area of Polygon

Polygons are geometrical objects known in many computational geometry fields. Polygons have been known since ancient times. The subject of regular polygon was taken up by Coxeter. His inquiry and conjunction of the theory culminated in his famous book \textit{Regular Polytopes} \cite{Coxe70}. Shephard generalized the idea of polygons to the complex plan, his idea presented by each real dimension is accompanied by an imaginary one \cite{Shep52}. \begin{Definition} A polygon is the region of a plan bounded by a finite collection of the line segments forming a simple closed curve. \end{Definition} \par The precise meaning of "simple closed curve" it is not that easy. However, O'Rourke presents a good explanation for what it means exactly. In the field of topology, the simple closed curve can defined as a homeomorphic image of a circle. This means it is a certain deformation \cite{Orou98}. \par One of the most popular and easy ways to find the area of any polygon is by triangulating the area. That means, dividing the area of any polygon to a number of triangles. This method works by finding a diagonal, cutting the polygon into two pieces, and recursing on each (see figure (\ref{TrangPolygon})). As known, the area of a triangle is one half the base times the altitude. However, this formula is not directly useful if we want the area of a triangle $T$ whose three vertices are arbitrary points. Finding the area of triangle in any case can be known by picking any linear algebra or shape analysis book. Strang book, \textit{Linear Algebra and Its Applications} \cite{Stra06}, is an example of good scholarship on this topic. While Floriani and Spagnuolo covered this subject for many different shapes \cite{Flor08}. \begin{figure}[h] \centering \includegraphics[width=0.4\textwidth]{TrangPolygon2} \hfill \caption{Triangulating a Polygon} \label{TrangPolygon} \end{figure} \par It is not difficult to find the area of any polygon by triangulating, and then do the summing of the triangle areas. The way to triangulate any convex polygon is by choosing any vertex to be a common vertex with all diagonals incident to this common vertex. Notice that, the common vertex can be any vertex serving as the center of the convex polygon (see figure ). Therefore, the area of a polygon with vertices $v_0, v_1, \dots, v_{n-1}$ categorized counterclockwise can be determined by: $$\label{A(P)} A(P)= A(v_0, v_1, v_2) + A(v_0, v_2, v_3) + \dots + A(v_0, v_{n-2}, v_{n-1})$$ where $P$ is the polygon and $v_0$ is the center vertex. \par Although the polygons in this work are convex polygons, the theorem below generalizes the equation (\ref{A(P)}) to convex and non-convex cases.