More generally, if you roll two X-sided dice and take the higher number, your average is 2/3*X + 0.5 - 1/(6*X).
If you roll three X-sided dice and take the highest number, your average is 3/4*X + 0.5 - 1/(4*X).
You can plug in X=20 to these formulas and see that you get the exact answers that Abisashi did.
Would it be possible to show your method of calculation? Don't worry, I trust you on the result, but it has been a long time since I have done probability, so I want to re-learn how to do this kind of thing on my own by following your working. Thanks!
For the case of rolling two dice, imagine drawing out a grid of all the possible results, with one dice as the up/down (1 to 20) and the other dice as left/right (1 to 20). To get a result of 1, both dice need to come up as 1, so that's the top left corner- 1 outcome out of the total number of outcomes. To get a result of 2, you can either have (1,2), (2,1), or (2,2)- that's 3 outcomes. To get a result of 3, you can have (1,3), (2,3), (3,3), (3,2), or (3,1); 5 outcomes. Indeed, the number of possibilities that get you a result of
i is 2
i-1.
The expected result is just the sum, from 1 to 20, of (Result of taking the higher of the two die rolls) * (the number of combination of die rolls that get you this result), divided by the number of outcomes, since all combinations of die rolls are equally likely. So you're going to add up 1*1 + 2*3 + 3*5 + ... + 20*39 and then divide by (20*20) possibilities, which gives you 5530/400= 13.825.
The general formula above is what you get if you replace 20 with X, replace 39 with (2X-1), and use a few formulas for sums to get the answer.