I know the following question has been asked by the following link: Random ants probability question
But my question is more about computing the final result: expected value of the maximum of 500 IID random variables, and I highlighted my doubt in bold in the following:
500 ants are randomly put on a 1-foot string(independent uniform distribution for each ant between 0 and 1). Each ant randomly moves toward one end of the string (equal probability to the left and right) at constant speed of 1 foot/minute until it falls off at one end of the string. Also assume that the size of the ant is infinitely small. When two ants collide head-on, they both immediately change directions and keep on moving at 1 foot/min. What is the expected time for all ants to fall off the string?
When two ants collide head-on, both immediately change directions. What does it mean? When an ant A collides with another ant B, both switch direction. But if we exchange the ants' labels, it's like that the collision never happens. A continues to move to the right and B moves to the left. Since the labels are randomly assigned anyway, collisions make no difference to the result. So we can assume that the two ants meet, each just keeps on going in its original direction. What about the random direction that each ant chooses? Once the collision is removed, we can use symmetry to argue that it makes no difference which direction that an ant goes either. That means if an ant is put a the $x$th foot, the expected value for it to fall is just x min. If it goes in the other direction, simply set $x$ to $1-x$. So, the original problem just becomes what is the expected value of the maximum of 500 IID random variables with a Uniform Distribution between 0 and 1. Clearly the answer is $499/500$. So my question is: how do we know the answer is $499/500$? What is the theorem or formula to get this number?