# Interview

Welcome to your expected value interview! In a quantitative finance interview, one of the most important things is to explain your thoughts. A good thought process is worth more than a correct answer with no ability to articulate your reasoning. This quiz is no different, as we’ll be breaking down a challenging problem into its logical steps.

## Interview

### Expected Value

# Interview

Here’s the problem we’ll be tackling:

An ant is at a vertex of a tetrahedron. Every second, it randomly chooses one of the other 3 vertices, and crawls to that vertex. What is the expected number of seconds until it has visited every vertex?

## Interview

### Expected Value

# Interview

First of all, to get a sense of the possible outcomes, what is the probability that the ant visits all 4 vertices in 3 seconds (that is, the minimum possible)?

## Interview

### Expected Value

# Interview

Let’s define some variables to help solve the original problem. Which do you think would be the most helpful?

• A: $$X_i,$$ the expected number of distinct vertices visited after $$i$$ seconds
• B: $$X_i,$$ the expected number of seconds until $$i$$ distinct vertices have been visited

## Interview

### Expected Value

# Interview

If $$X_i$$ is the expected number of seconds until $$i$$ distinct vertices have been visited. What is $$X_1?$$

Remember that the ant starts at a vertex (at time 0).

## Interview

### Expected Value

# Interview

If $$X_i$$ is the expected number of seconds until $$i$$ distinct vertices have been visited, what is $$X_2?$$

## Interview

### Expected Value

# Interview

Once 2 vertices have been visited, what is the probability of visiting a new vertex on the next step?

## Interview

### Expected Value

# Interview

What is the expected number of steps between visiting the second distinct vertex and visiting a third distinct vertex?

## Interview

### Expected Value

# Interview

Using the same logic, you can determine the expected number of seconds between visiting the third vertex and final vertex.

Using this and all prior knowledge, what is $$X_4,$$ the amount of total expected time in seconds from when the ant starts moving at 0 seconds?

## Interview

### Expected Value

# Interview

To wrap up, what we did in this interview was to determine that the time between reaching the $$k^\text{th}$$ and $$(k+1)^\text{th}$$ vertex had an expectation of $$\frac{3}{4-k}.$$ Thus, by linearity of expectation (the expected value to hit all 4 distinct vertices is the sum of the expected values to get from the 1st to the 2nd, 2nd to the 3rd, and 3rd to the 4th distinct vertex), the expected value was: $\frac{3}{3} + \frac{3}{2} + \frac{3}{1} = 5.5.$

## Interview

### Expected Value

×