# Probability of guessing True when the target is True in a multi-label classification problem?

I will try to explain what I am trying to ask in my terms because I don't know how to do any better. Feel free to edit for clarity if you understand better than I do what I am trying to ask.

# The problem

Say I have a multi-label object $$X$$ with a total of $$n$$ possible labels, such that a certain object in that class is defined as

$$X_{target}(L_1, L_2, L_3,...,L_n)$$

Where any of $$L_1$$ to $$L_n$$ can be either $$True$$ or $$False$$,

Now say I make a guess, knowing that there are $$k$$ labels that are $$True$$ in $$X_{target}$$, so I choose $$k$$ labels at random to set to $$True$$ $$X_{guess}(L_1, L_2, L_3,...,L_n)$$

What I want to know is what is the probability that, for any $$L_i$$ in both $$X$$s, both labels are $$True$$

• Are you asking for the probability of a given $L_i$ to be True in both Target and Guess? e.g. Probability of $L_1$ to be True in both? May 2, 2021 at 11:19
• Yes, that is correct. I want to know the probability that it is True in both in the scenario where I necessarily have to choose $k$ entries to be True in both. May 2, 2021 at 18:08

Let's assume that your dataset is balanced, i.e. $$P(L_i = True)$$ is equal for all $$i$$s. It follows that $$P(L_i = True) = k / n$$ for $$i = 1..n$$. The same is true for your guess: let $$\hat{L_i}$$ be your guesses. Then $$P(\hat{L_i} = True) = k/n$$ as well. And since your guess was random and does not depend on the target label, it follows that: $$P(\hat{L_i} = True \cap L_i = True) = P(\hat{L_i} = True) P(L_i = True) = (k/n)^2.$$
• Right, I had arrived at this earlier on but I decided it was wrong because...? I think I was thinking of the probability of choosing a set that contains a given $True$ label. Regardless, you answered the question I posed, thanks! May 2, 2021 at 21:34