I am searching for an almost-everywhere continuous and monotonic function $f:[0,1]^2\to[0,1]$ with the following properties:
- $f(x,y)=f(y,x)$
- $f(0,y)=0$ and $f(1,y)=1$ (so $f(0,1)$ and $f(1,0)$ are undefined)
- $f(x,y)=1-f(1-x,1-y)$
- therefore $f(0.5,0.5)=0.5$
- $\int_0^1f(x,y)dy=x$
Here is what it should look like
Are there functions having those properties?
And if yes which one?
If possible, I would prefer a not too complicated function.
Here is a clarification:
By "monotonic function $f:[0,1]^2\to[0,1]$" I mean "function for which, for any $y\in [0,1]$, the function $f_y: [0,1]\to[0,1]$ so that $f_y(x)=f(x,y)$ is monotonic (and reciprocally by swapping $x$ and $y$)".
Here are my attempts so far:
- there is a singular "discontinuous solution": the function which is equal to 0 when $x+y\lt1$ and to 1 when $x+y\gt1$; it's not really a solution since it's discontinuous, but it can be a starter
- if you know an invertible and monotonic function $g$ on $[0,1]$ with $g(0)=\infty$ and $g(1)=0$, you can combine them like this: $f(x,y)=g^{-1}(g(x)g(y))$ and it already have the properties 1 and 2
- to enforce the property 4 you can define instead $f(x,y)=g^{-1}(\frac{g(x)g(y)}{g(0.5)})$
- to enforce the property 3 (and 4) you can define instead $f(x,y)=h^{-1}(\frac{h(g^{-1}(\frac{g(x)g(y)}{g(0.5}))+h(1-g^{-1}(\frac{g(1-x)g(1-y)}{g(0.5)}))}{2})$ with a generalised $h$-mean, but it's starting to get ugly (the $\frac{1}{g(0.5)}$ seems to be mandatory to have the right shape but I can't explain why)
- if we try with $g=ln$, we get $f(x,y)=exp(\frac{ln(x)ln(y)}{ln(0.5)})$, but we don't have the property 3, so we need to change it to $f(x,y)=h^{-1}(\frac{h(exp(\frac{ln(x)ln(y)}{ln(0.5)}))+h(1-exp(\frac{ln(1-x)ln(1-y)}{ln(0.5)}))}{2})$, but I can't find an $h$ that allow to have property 5: using the power means (with $h(x)=x^p$), at $y=0.5$ property 5 always holds, but at $y=0.25$, I always have $\int_0^1f(0.25,y)dy\gt x$. It seems to decrease with $p$, but even with $p=-\infty$ (which corresponds to the minimum instead of a mean), I have $\int_0^1f(0.25,y)dy=0.276657\gt x$
- idem for $g=arctanh$: the minimum is $0.2703866$
- it's slightly better with $g=x^{-1}-1$: we get $f(x,y)=((x^{-1}-1)(y^{-1}-1)+1)^{-1}$ with which properties 1, 2, 3 and 4 already hold, but sadly not property 5: $\int_0^1f(x,y)dy=x\frac{2x-1+2(x-1)arctanh(2x-1)}{(2x-1)^2}\neq x$
Here is the background:
This question follows this one: I'm trying to find a way to calculate (or approximate) $Pr(S|A B)$ given $Pr(S|A)$ and $Pr(S|B)$ (and possibly $Pr(S)$), and knowing that $A$ and $B$ are independent, and that if $Pr(S|A_1)\geq Pr(S|A_2)$ then $Pr(S|A_1 B)\geq Pr(S|A_2 B)$.
The last condition was not present in the initial question but seems useful to me: if the skill categories are well defined, a player that is better at a category of skills than another player should be better at any skill test from this category than the other player.
EDIT: Since that question was asked and answered, I realised that the 5th property is not necessary for my problem, see my last comment.
There ain't no such function.
Really, consider the following four integrals: $$\int_0^{1\over2}\int_0^{1\over2}f(x,y)\,dx\,dy = A\\ \int_{1\over2}^1\int_0^{1\over2}f(x,y)\,dx\,dy = B\\ \int_0^{1\over2}\int_{1\over2}^1f(x,y)\,dx\,dy = C\\ \int_{1\over2}^1\int_{1\over2}^1f(x,y)\,dx\,dy = D\\ $$ Apparently, $B$ and $C$ are equal by property 1 and complementary by property 3, hence both equal $1\over8$.
Now, $B+D = \int_{1/2}^1\int_0^1f(x,y)\,dx\,dy=\int_{1/2}^1y\,dy={3\over8}$, which gives $D={1\over4}$.
This may only happen if $f(x,y)$ is a constant $1$ in the whole upper right quarter. Consequently, $f(x,y)\equiv0$ for $(x,y)\in[0,{1\over2}]^2$. So the function is not going to be continuous at $(0.5,0.5)$.
But maybe we can keep it nice everywhere else?
Well, let's split the remaining squares into smaller yet squares in a similar manner. Our $B$ becomes $B_A+B_B+B_C+B_D$. Same thing with $C$.
Apparently, $B_B$ and $C_C$ are equal by property 1 and complementary by property 3, hence both equal $1\over32$. So are $B_C$ and $C_B$...
...shall I continue?