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?
$$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}$.