1
$\begingroup$

Let $X_i$ ~ Unif(0, 1) s.t.

$X_1 + X_2 + ... + X_6 = 1$

Let $Y = X_1 + … X_6$

What is $Var(Y)$?

(Also the case when it's $X_n$)


Purpose for the curious:

I'm trying to rank confidence for softmax predictions using variance.

6 classes,

1 | .01, .01, .01, .01, .01, .95 ; var=.1227, max=.95
2 | .01, .01, .01, .01, .50, .46 ; var=.0492, max=.50
3 | .01, .01, .01, .33, .33, .30 ; var=.0241, max=.33
4 | .01, .01, .25, .25, .25, .23 ; var=.0123, max=.25
5 | .01, .20, .20, .20, .20, .19 ; var=.0049, max=.20
6 | .16, .16, .16, .16, .16, .20 ; var=2.2e-4, max=.20
… etc

If we rank them by max or var, will both list be same?

Hypothesis: Similar but no.

In this case,
- Var would rank obs#5 higher than #6; bc var says there’s no way the pred can class 1 in #5
- Max, on the other hand would say there’s no difference in information between #5 and #6

For cutoff idk if the variance of Unif(0, 1) would be a good cutoff or if I need to solve the problem I mentioned above for insight.

$\endgroup$
2
  • 4
    $\begingroup$ As your question is written, $\operatorname{Var}(Y)=0$. If you have a random vector $X:=(X_1,\dots,X_n)$ constrained to sum to $1$ then the variance of the sum is zero since it's constant $\endgroup$ – jld May 8 '20 at 17:29
  • $\begingroup$ Wait I'm dumb... what am I trying to ask then? Am I trying to find Var of X? I think I've gone full circle. $\endgroup$ – Linsu Han May 8 '20 at 17:31
1
$\begingroup$

jld has already shown in his comment that $Var(Y)=0$ because $Y=0$ and a constant must have variance zero.

It should also be noted that the question is only possible when $n=1$.

From the question, generalized to n:

Let $X_i$ ~ Unif(0, 1) s.t.

$X_1 + ... + X_n = 1$

That is, each $X_i$ is an uniform variable but the sum of all $X_i$ is 1. Since the expectation of sum is sum of expectations and all $X_i$ have the same distribution:

$E(X_1 + ... + X_n) = n·E(X_i)$

and

$E(X_1 + ... + X_n) = E(1) = 1$

and

$E(X_i)=0.5$ because $X_i$ ~ Unif(0, 1)

$n=\frac{1}{0.5}=2$

Furthermore, we can compute $Cov(X_1,X_2)$ and $Cor(X_1,X_2)$

$$0=Var(1)=Var(X_1+X_2)=var(X_1)+Var(X_2)+2\cdot Cov(X_1,X_2)=$$

$$=\frac{1}{12}+\frac{1}{12}+2\cdot Cov(X_1,X_2)$$

$$Cov(X_1,X_2)=-\frac{1}{12}$$

$$Cor(X_1,X_2)=\frac{Cov(X_1,X_2)}{\sqrt{(Var(X_1)\cdot Var(X_2))}} =\frac{-\frac{1}{12}}{\frac{1}{12}}=-1$$

In fact, that matches the only solution of two random variables with the same distribution and constant sum $X_2=1-X_1$

And returning to the question (modified in comments) after that digression: $Var(X_i)=\frac{1}{12}$ just as with any uniform variable.

And interestingly, the sample variances in the original question are different from 1/12 because those samples don't add to 1 or are uniform.

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.