During a simulation I discovered an interesting phenomenon: Given you have 3 agents. 2 are uniformly distributed between [0,1] and one between [0,2].
The question is how often do the smaller agents win and what is there average value when winning. As expected the winning probability is 50%. However it turns out that the smaller agents have an average combined value of approx. 1.167 when winning and the large agent has an average combined value of approx. 1.418 (close to root 2). At least for me this is counterintuitive. Can someone give me an explanation of why this is.
Source code:
double totalSmall=0;
double totalLarge=0;
int smallCount = 0;
int largeCount = 0;
int count = 0;
for (int i = 0; i < 1e6; ++i) {
double large = Math.random() * 2;
double small = Math.random() + Math.random();
if(large>small){
largeCount++;
totalLarge+=large;
}else{
smallCount++;
totalSmall+=small;
}
}
System.out.println(count);
System.out.println(smallCount);
System.out.println(totalSmall);
System.out.println(totalSmall/smallCount);
System.out.println(largeCount);
System.out.println(totalLarge);
System.out.println(totalLarge/largeCount);