TITLE: Ant in a circle
QUESTION [16 upvotes]: An ant is sitting in the middle of a circle of radius 3 meters.  Every minute, the ant picks a random direction and moves straight 1 meter.  
On average, how long does it take the ant to leave the circle?  If it helps calculations, you can disregard the fact that the ant may technically leave prior to the end of the minute, in other words, if the ant is 0.5 meters from the edge of the circle and walks outwards, consider it a minute, not 30 seconds.
I'm normally quite good at these types of problems, but this one seems more statistical in nature and I'm not sure how to approach it.  Obviously the ant could stay in the circle forever wandering around, but it's statistically impossible, meaning the average amount of time the ant spends in the circle is a limit which converges (answer is not "infinite time").  
I'd love to hear any techniques on solving this problem.

REPLY [2 votes]: I developed code using Monte Carlo Method as show below.  I used Java because that is what I had available, but it could be translated to Matlab or other code:
import java.util.Random;
import static java.lang.Math.* ;

public class RandomWalk {
static int N = 100000 ; // Number of iterations
static double R = 3.0 ; // Radius of circle
static int L = 200 ;

public static void main(String[] args) {
    int countArr[] = new int[L] ;
    for (int ci : countArr) countArr[ci]=0 ;
    Random rGen = new Random();   
    rGen.setSeed(856) ;

    for (int i=0 ; i<N ; i++)
    {
        int c = 0 ; // Count number of legs
        double d=0 ; // distance from center ;
        double xt=0.0, yt=0.0 ; // Total x,y distance from 0

        while (d <= R)
        {
            double ang = 2*PI*rGen.nextDouble() ;
            xt += cos(ang) ;
            yt += sin(ang) ;
            d = sqrt(xt*xt + yt*yt) ;
            c++ ;
        }
        countArr[c]++ ;
    }
    for (int i=0 ; i<L ; i++)
        System.out.println(i + ", " + countArr[i]/(double)N) ;
 }
}

The PDF of the ant leaving the circle on leg $i$ looks like this:

Note that the plot has modes at $i=4$ and $i=6$.  The expected value is 11.4.