What is a good measure of "controversy", given a support score and opposition score? Suppose I have a topic or discussion, and a number of "support" and "opposition" points on each side (You can also think of them as "upvotes" and "downvotes") and I want to calculate a score of how "controversial" a topic is. (Let $p$ be the support score, $c$ be the opposition score, and $f(p, c)$ be the function that determines the controversy score.)
It should have the following properties:


*

*Controversy is maximized when equal support is given to both sides. Given that some property $g(p, c)$ is held constant (such that the slope of the tangent line of the level curve of $g(p, c)$ at any point is never positive), $f(p, c)$ should be maximized when $p = c$.

*More support on both sides means that more people care and therefore there is more controversy. Given that $p/c$ is held constant, a higher value of $p$ or $c$ should result in a higher value of $f(p, c)$.

*The amount of controversy is the same for the same imbalance of support no matter which side the imbalance favours. $f(p, c)$ should equal $f(c, p)$.

*All the support being on one side means there is no controversy. Given that either $p$ or $c$ is equal to zero, $f(p, c)$ should be equal to zero.


Is there any function like this that is already in use? If not, could one be devised?
 A: $$f = \min$$

More generally, choose an even function $g:[-1,1]\to\mathbb R_{\ge0}$ such that $g(-1)=g(1)=0$, and an increasing function $h:\mathbb R_{\ge0}\to\mathbb R_{\ge0}$, and let $$f(p,c)=g\left(\frac{p-c}{p+c}\right)h\left(\frac{p+c}2\right).$$ Here $g$ controls the "cross-section" for a fixed number of votes, while $h$ controls the growth for a fixed $p/c$ ratio. For example, $f(p,c)=\min(p,c)$ arises from setting $g(x)=1-\lvert x\rvert$ and $h(y)=y$. @michielm's solution $f(p,c)=pc/\lvert p-c\rvert$ corresponds to $g(x)=(1-x^2)/\lvert x\rvert$, $h(y)=y/2$. Another nice solution is $g(x)=\sqrt{1-x^2}, h(y)=y \implies f(p,c)=\sqrt{pc}$.
A: What about $\frac{p c}{|p-c|}$?
This will grow (to infinity) for $c$ and $p$ being closer together and will also grow if $p/c=constant$ with increased $p c$. All support on one side will mean that $pc$ is low (or 0)
Maybe it is not perfect in its general behaviour, but the limiting behaviour seems to be right, so you can probably go from here.
A: The formula I came up with myself was: $\displaystyle \frac{\min(p,c)^2}{\max(p, c)}$
I called it the "geometric progression" algorithm, because it represents the next term of the geometric progression lower than $\max(p,c)$ and $\min(p, c)$. In this way, as $p$ increases past $c$, $f(p, c)$ will get smaller, reaching its maximum of $c$ when $p = c$.
It also has the additional scaling property that the number of votes on $\max(p,c)$ varies inversely with $f(p, c)$.
A: I would argue that a simple and natural measure of controversy is simply the product of the support vote count $p$ and the opposed vote count $c$:
$$f(p,c) = pc$$
In particular, for a fixed total number of votes $p+c$, $f$ is maximized at $p = c$ (or at $p = c \pm 1$ if the total is odd), and it also satisfies your requirements 2–4.  It also has the convenient property that $f(p,c)$ is a non-negative integer whenever $p$ and $c$ are.
One downside is that, for a fixed vote ratio $0 < p/c < \infty$, $f(p,c)$ grows proportionally to the square of the total number of votes $p+c$.  If you'd prefer a linearly growing function instead, you can always take the square root to get the geometric mean of $p$ and $c$:
$$f^*(p,c) = \sqrt{pc}$$
As the square root is a strictly monotone increasing function, it does not affect the relative ranking of the results: $f(p,c) > f(p',c')$ if and only if $f^*(p,c) > f^*(p',c')$.  However, by the AM–GM inequality, we can see that $f^*(p,c)$ can never exceed half of the total vote count $p+c$.
