### On getting unlucky

My computer has a problem. I can either send it in for repairs or try to fix it myself. If I send it in for repairs, it will definitely cost me 1 hour. If I try to fix it myself I’m not sure how long it will take.

I decide to try to fix it myself, and it ends up taking 3 hours.

What should I conclude? Is it plausible that I got unlucky, or is this a strong sign that I’m making a mistake?

In this post I’ll look at a closely related question: what is the maximum probability that a rational actor could get this unlucky, and end up taking N hours even though there was an option that would be guaranteed to solve the problem in 1 hour?

Warning: this post has no broader significance whatsoever.

### Markov

Consider a simplified case, in which I’m given a one-shot choice between two options:

• Send in the computer for repairs. Cost: 1 hour.
• Fix it myself. Cost: ???

Trying to fix it myself is rational iff the expected cost of fixing it myself is < 1 hour.

In particular, fixing it myself is irrational if there is a probability >1/N that it will take me N hours. So the probability that I take 3 hours should be at most 1/3, if the decision was actually rational.

This can be obtained, if fixing it is extremely quick 2/3 of the time, but takes 3 hours nearly 1/3 of the time.

In order to reject the hypothesis “my behavior is rational” at the 5% level, I’d need to take 20 hours.

### A tighter bound

In reality, I can give up at any time and send my computer in for repairs, taking exactly 1 additional hour. If I’ve been working on it for a few hours, I should probably give up. But it’s not completely obvious—maybe it always feels like I’ve almost got it, and maybe that intuition is right but I happen to get unlucky. So again: how unlucky can I get?

This is a much harder situation to model, because I might be getting complicated information about how well the process is going. It turns out the analysis is pretty easy anyway.

A very simple situation would be: every additional minute I work on the problem I have a 1/60 chance of fixing the problem. Working more is always rational if I’m risk neutral. In this case the probability of not fixing the problem after T hours is ~1/exp(T).

To maximize my probability of taking  > N hours without doing anything irrational, I would try for (N-1) hours and then give up, taking N hours. That gives a probability of 1/exp(N-1) of taking N hours.

Can it get any worse than that?

If I have a 1/2 chance of fixing the problem each half hour, it’s easy to see that this is less likely to result in taking N hours.

But what about very different dynamics? Is there any way that reality can dangle the possibility of success forever out of reach, getting me all the way back to a 1/N probability of taking N hours?

I’ll prove by induction that it’s impossible, and that 1/exp(N-1) is the worst case. (There is probably a cleaner way to prove this.)

Let S<1 be the expected number of hours it takes me to repair my computer, and assume N>1. I’ll prove by induction that the maximum probability that I take N time is S/exp(N-1). I’m going to assume that I only have an opportunity to give up every ε hours, and that N is an integer multiple of ε, and then induct on N/ε. I’ll leave the continuous case as an exercise.

If N=1, then we can apply Markov again: my expected time-to-fix is S hours, so I have at most a probability S of taking > 1 hours. This is the inductive base case.

If N>1, and I choose to give up, then I have 0 probability of taking N hours, and so the claim is true.

If I try to fix it on my own, consider the set of states I might reach after spending ε hours trying to fix my problem. In each possible state, I have some expected amount of time T remaining to fix my problem (which might be 0 if I fixed it within ε hours). And I have some probability P that I will end up taking at least N-ε additional hours (which means it would have taken at least N hours from the initial time).

I know that the expectation of T is (S-ε), which is at most (1-ε)S since S < 1. And by induction I know that P is always less than T/exp((N-ε) – 1). So:

E[P] < E[T]/exp(1 – (N-ε)) = (S-ε)/exp((N-ε)-1) < (1-ε)S/exp((N-1)- ε) < S/exp(N-1)

As desired. Equality is obtained in the limit of small ε if and only if T=1 with probability (S-ε), i.e. in exactly the simple case we described at the beginning of this section.

### Complications?

#### Non-time costs

What if I need to purchase \$100 of supplies to fix my computer myself, and it costs \$100 to send in the computer for repairs? Does this put us back in the model from the first section, since once I buy the supplies I effectively can’t give up without paying an extra \$100?

If \$100 is very large relative to my value of time then I clearly need to make a commitment. But in that case, thinking about time is a very unnatural way to analyze the situation.

To get a tighter bound, we should think of N as a multiplier on the total cost rather than the time. A rational agent might get unlucky and spend much more time than necessary, but they can’t get unlucky and pay a much larger cost than necessary.

To prove this, just convert all other costs into time; whenever the actor pays \$1, imagine them sitting still for \$1’s worth of time, getting no new information. Then we can directly apply the analysis from the last section to bound the cost they incur.

By the same argument, we can apply the analysis to agents with nonlinear time preferences, as long as we talk about total cost instead of hours.

This assumes that costs increase either predictably or continuously, and that I can stop paying them at any time.

For example, if I go to a sketchy repairman, I must either know the price upfront, or they send me bills one at a time and I can quit whenever I want. If the sketchy repairman breaks my computer 1% of the time, costing me 50 hours, we can’t apply this analysis because I don’t have the opportunity to quit once my computer is half-broken. In that case, we are back to the 1/N bound from the first section.

#### No sure thing

Usually I don’t actually know the value of the fallback in advance. For example, I don’t know how long it will actually take for my computer to get repaired, it might turn out that the problem is really bad so it will take 10 hours instead of 1 hour.

The analysis also applies in this case though—now N is the ratio between the cost I actually pay and some upper bound on the cost of the fallback option. Most of the time I’m becoming more pessimistic about the fallback as I try and fail to solve the problem on my own, so we can just talk about the multiplier between the amount of time I actually spent and my final estimate for the cost of the fallback.

### Conclusion

If it’s possible to fix a problem by paying x at any time, a rational actor should have a probability at most 1/exp(N-1) of paying N*x.

If someone pays > 2x the sure-thing cost, you can reject rationality at p=0.37
If someone pays > 3x the sure-thing cost, you can reject rationality at p=0.14.
If someone pays > 4x the sure-thing cost, you can reject rationality at p=0.05.
If someone pays > 6x the sure-thing cost, you can reject rationality at p=0.007.

This is a nice example of a problem where it’s hard to set up a convincing formal model, but we can still get a really clean answer.

Of course this is a conservative answer: a rational agent won’t really pay 2x the sure-thing cost 37% of the time. But I do sometimes feel like I encounter situations that are close to the worst case, where I think the 37% upper bound isn’t too far from the truth.

## 2 thoughts on “On getting unlucky”

1. Anurag Kashyap says:

‘To maximize my probability of taking > N hours without doing anything irrational’
Did you mean <N hours?

1. paulfchristiano says:

I’m wondering “What’s the largest possible probability that I take >N hours without doing anything irrational.” So I really did mean “>N”, it’s a bit of a weird way of thinking about it maybe.