I can't solve the problem about the AUC ROC metric. Problem condition: on the answers (estimates) of the algorithm, objects of class 0 are distributed uniformly on the segment [0, 2/3], and answers of class 1 are distributed uniformly on the segment [1/3, 1]. What is AUC ROC equal to?
My approach. AUC is the area under the curve that can be expressed using TPR and FPR:
$$\int_0^1 TPR(x)\cdot FPR'(x)\, dx$$.
Since the distribution is uniform, TPR and FPR can be represented as: $$ TPR(x) = \begin{cases} 0, & \text{if $x$ < 1/3} \\ \frac{3}{2}\cdot(x-\frac{1}{3}), & \text{if 1/3 $\le$ $x$ $\le$ 1} \end{cases} $$
$$ FPR(x) = \begin{cases} \frac{3}{2}\cdot x, & \text{if 0 $\le$ $x$ $\le$ 2/3} \\ 1, & \text{if $x$ > 2/3} \end{cases} $$
Then we get the integral: $$\int_\frac{1}{3}^\frac{2}{3} \frac{3}{2}\cdot(x-\frac{1}{3})\cdot \frac{3}{2}\, dx = \frac{1}{8}$$.
But the answer is $\frac{7}{8}$. Which means that either I made a mistake in the calculations or the classifier predicts zeros ($1 - \frac{1}{8} = \frac{7}{8}$). Where did I go wrong?