I came through this problem three years ago when I prepared for interview. Today when reviewing it, I still couldn't think out a mathematical way to solve it. Any help would be appreciated.
$4$ players roll a fair $30$-sided dice. Each of them rolls once and the $4$ numbers rolled are different. The $2$ individuals that rolled the biggest and small value will be in a team while the $2$ individuals who rolled the $2^{\text{nd}}$ and $3^{\text{rd}}$ smallest value will be on the opposite team. The team with the largest average wins and the loser has to pay the winners' average number (for example, if the dice outcome is $27, 20, 15,$ and $11,$ then the people who get $27$ and $11$ get paid $19$).
Q) If you are the first to roll, what number would you prefer to maximize your payout?
Here's a simple python program to find the answer:
I assumed that if both totals are equal no-one wins or loses anything. To avoid floats I also doubled everything (so that you win or lose the sum, rather than the average). The highest value is best; here that is 24.