Expected falling time of all $500$ random ants

3k Views Asked by At

The random ant question is asked in this post. I reproduce it below for completeness.

Question: $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 on end of the string (equal probability to the left or the right) at constant speed of 1 foot/minute until it falls of a t 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?

The question above is equivalent to asking the expected value of the maximum of $500$ IID random variables with uniform distribution between $0$ and $1$.

We know that the expected value of $\max(X_1,...,X_{500})$ where $X_1,...,X_{500}$ are IID, is $\frac{500}{501}$, as shown in another post.

However, the answer given to the random ant question is $\frac{499}{500},$ which I fail to decipher.

2

There are 2 best solutions below

6
On BEST ANSWER

The guide that gives $\frac{499}{500}$ as an answer is wrong. You're right that it should be $\frac{500}{501}$.

0
On

A Monte Carlo simulation in python:

import numpy as np
from scipy.stats import uniform 
from scipy.stats import bernoulli

N = 1000000   # number of samples
ant = 500
X = uniform.rvs(0, 1, size=(N,ant))  # ant position
end_point = bernoulli.rvs(p=0.5, size=(N,ant))  # is 0 or 1
distance = np.abs(X - end_point)
np.mean( np.max(distance, axis=1) )