The math behind Warren Buffett's famous rule – never lose money This is a question about a mathematical concept, but I think I will be able to ask the question better with a little bit of background first.
Warren Buffett famously provided 2 rules to investing:

Rule No. 1: Never lose money. Rule No. 2: Never forget rule No. 1.

I initially took this quote as tongue-in-cheek.  Duh, of course you don't want to lose money. But after better educating myself in the world of investing I see this quote more as words from the wise sensei of investing.  It means more than just be careful, or be conservative.  Losing money can destroy a portfolio because there is a mathematical disadvantage.
Consider two hedge fund managers:  Mr. Turtle and Mr. Hare.
Mr. Turtle is steady, he doesn't have high returns, but he also doesn't lose money.  Mr. Hare is aggressive, getting huge returns, but occasionally losing money. Here are their returns over the past 5 years

Mr. Hare has a higher average rate of return.  Further, he has made (significantly) more money in 4 out of the 5 years.  Mr. Turtle, however, has made his clients more money overall in the same timeframe.
This seems counter-intuitive. I would think you would want to maximize your average rate of return at all costs, but it's not that simple.
Why?
Why does one negative input have such a significant impact on an exponential growth function?
Why doesn't the average rate of growth always lead to the largest possible result?
How does one explain this (hopefully in layman's terms)?
 A: Let $x$ be a percentage. If the return in a good year is $(1+x)$ and the return in a bad year is $(1-x)$, the the total return is given by $$(1+x)(1-x)=1-x^2$$ What this tells us is that negative returns have a much greater impact on investments than positive returns at the same rate.
In the example given, even though Mr. Hare was able to achieve a $56%$ increase on the original investment in just two years, all it took was just one year for the cumulative return to fall back to $1.01$, just a $1%$ increase over the original investment. Granted, Mr.Hare was able to make up for his losses within two years, but based on his history it's likely he will produce another bad year in the near future that will be just as devastating.
On the other hand, Mr. Turtle produces fare more consistent results. Even though his returns might not look as impressive as Mr. Hare's, Mr.Turtle experiences little to no losses which means his clients in the long term will experience a much larger return on their original investment than those of Mr. Hare.
A: I was initially on the bandwagon with jgon's answer but on more thought/discussion, I think the difference between the geometric and arithmetic means is not a sufficient answer for why Buffet recommends this.  To be clear, the geometric mean is the correct way to talk about rates of return and jgon's answer explains very well why using the arithmetic mean is not useful for this kind of situation.  However, this is true whether there are losses or not.  The question is about what makes losses special aside from them not being gains, which is obviously what we want.
The key here is the asymmetry of negative return rates versus positive return rates on a positive investment balance.  I will demonstrate this graphically.  First we consider a balance under a constant positive growth rate:

This shows the magic of compounding interest.  The numbers don't really matter but if you are interested, this is simply 10,000 units compounded over 360 periods at a rate of 2% per period.  The value after 360 period is more than 12 million units.  The slope of change start out low but as time goes on, it becomes much steeper.
Now we consider a balance under a constant negative growth rate:

Same thing as before but now we have a -2% growth rate.  The ending balance is a little less than 7 units.
There's a fundamental difference between these curves that is the point here.  While the growth curve gets steeper as time goes on, the negative growth curve is its steepest at the first period.  That's why losses are so punishing.  While you have to wait to get the benefits of compound growth, losses hit you the hardest right away.  Because 2 and -2 are equidistant from the origin, we can be tricked into thinking they balance.  But they do not.  For any % loss, you need a greater % gain to make up for it and even once you do, you've lost out on compounding growth during that time.
A: After a 50% loss you need a 100% gain to break even.  In that scenario the arithmetic average return is 25% and the geometric average return is 0%.
It is more important to maximize geometric rather than arithmetic average return -- and this is intimately connected with the concept of risk-adjusted return and mean-variance optimization.
Given a set of returns $R_1,R_2, \ldots, R_n$ we have the arithmetic average and variance
$$A = \frac{1}{n} \sum_{k=1}^nR_k, \quad\quad V = \frac{1}{n}\sum_{k=1}^n(R_k - A)^2$$
A useful approximation that relates the geometric and arithmetic average return is
$$G = \left[\prod_{k=1}^n(1+R_k) \right]^{1/n}- 1 \approx A - \frac{V}{2}$$
This is in part a motivating factor for constructing a portfolio that maximizes expected return subject to a an upper constraint on  variance or minimizes variance subject to a lower constraint on expected return.
A: This is not the answer to the question you have asked.  But, it does get to the point of why you "never want to lose money."
Investing is risk.  There is always a chance that you will lose some money.  But, it is important that you never lose so much money that you can't come back.  If you lose all (or almost all) of your money, no matter how good your decisions are, you don't have enough capital to earn back your earlier losses.
Suppose someone offered to play a game with you.  He will pay you 2 times your wager if the coin comes up heads.  It is a fair coin.
This is a bet that is very much in your favor.  You would be a fool to pass it up.   Assuming that you trust that the guy isn't running a scam.  A offer this good is too good to be true, and likely is a scam.  He has provided sufficient credentials that he is not running a scam.  The question still remains, how much should you wager.  
You would also be a fool to bet all of your money on this flip.  You would have a 1/3 chance of being wiped out.
The Kelly criterion, says that you should never wager more than 3/4 of your wealth in this game.  The Kelly criterion says, that if you could play this game repeatedly, what size wagers will maximize the long-run growth rate of your endowment.  Any more than that, and you are taking risk with no return.
In the world of investing, this shows up as "diversification."  Don't put too much money behind any one name, because any company is capable of going bankrupt, and any investment has the potential to be wiped out.  Professional investors are typically following 30 - 100 names, and hold some block of cash, in case the whole market crashes simultaneously.
A: This looks like the difference between an arithmetic mean and a geometric mean.  
Each year, if you invest $\$1000$ at the start and cash out at the end of the year, you want to use the arithmetic mean pointing at Mr Hare
But if instead you invest $\$1000$ at the start of year $1$ and keep all the money invested until the end of year $5$ then you want to use the geometric mean pointing at Mr Turtle
The geometric mean is particularly sensitive to low values: in the worst case of you losing all your money in a particular year ($0$ in your table), you can never make it back.  But you can if you restart each year with the same amount

If you want to do even better, each year give half your money to Mr Turtle and half to Mr Hare to invest, rebalancing every year.  With these results, you will be $43\%$ better off after five years, a compound $7.4\%$ a year, better than both Mr Turtle's $39\%$ and $6.8\%$ and Mr Hare's $36\%$ and $6.4\%$. Half-and-half is not quite optimal but it is simple and is close to optimal with these particular numbers 
A: The clearest explanation for why this can't get a good return doesn't involve much math at all.
Let's say you've got some investment (a bond, a stock, a plot of real estate) that will pay out a million dollars and can't lose money.
How much would a rational investor pay for that? Well, it's a guaranteed million dollars. You'd maybe rather have a million in your bank account than tied up in the investment, because it's a bird in the hand and you can spend it. But if you can afford to put away the money until it pays off, you'd pay very nearly a million dollars for that asset.
What's the return? If you pay \$900k and get a million back, your profit was \$100K, or \$1 for every \$9 you invested, an 11% return on your investment. If you paid \$990K, you got back 1:90, or 1.1%. If you paid \$999K, you get back 1:900, or 0.11%.
So, because an investment that cannot lose money is so valuable, there will be more demand for it by its very nature. Its yield will go down. A safe investment always has a lower return than a risky one with the same expected value.
In the real world, the closest thing to that is a Treasury bond, and people who don't accept any risk of losing money buy them. (And people legally required to.) You're effectively competing with all other investors for the chance to buy low. You can make the investment a little less valuable and get a slightly better return by making it illiquid, which is why bank CDs pay a higher return the harder they are to cash out. The government can make its debt a little more desirable an investment by making it tax-free, which lowers the yield it needs to pay.
However, Buffett is neither recommending a strategy of such extreme loss-aversion, nor practicing it himself. What he's famous for doing is actively making his investments more valuable: if you buy most of a company's voting shares, you can change how it's managed.
A: See The Kelly Criterion, especially as explained in the book Fortune's Formula.  The strategy for maximizing your expected return in a positive expectation game actually involves a very, very significant risk of loss.  
Since the optimal strategy for maximizing gain has a huge risk of loss, any strategy that eliminates the risk of loss is very far from optimal.  
A: This is a somewhat subtle concept.  Say you have two fund managers, Alice and Bob.  Alice has return exactly 5% per year and Bob has return either 0% or 10% per year with equal probability.  Then clearly both fund managers will have the same average return (in expectation) if you define "average return" as just the arithmetic mean of your percent returns each year.  
Now let's look at how the fund managers are doing 10 years from now.  Think of simulating many trials of their fund performances.  In each trial, of course Alice has the exact same outcome: her wealth has increased by a factor of $(1.05)^{10}$.  What about Bob?  Well his wealth in each trial is $(1.05+X_1)(1.05+X_2)...(1.05+X_{10})$ where $X_1,...,X_{10}$ are independent random variables taking value -0.05 and +0.05 with equal probability.  It's not hard to see that in expectation (computing $\mathbb{E}[(1.05+X_1)(1.05+X_2)...(1.05+X_{10})]$ ), Bob will in fact have the same performance as Alice, i.e. $(1.05)^{10}$.  
So should you be as willing to invest with Bob as with Alice?  Well, yes if all you care about is the mean.  But most people care about the distribution of returns as well.  One can show that looking 10 years from now, Bob will with high probability have made less money for you than Alice.  This is made up for by a small percentage of time where Bob makes astronomically more than Alice.  So going with Bob instead of Alice is essentially buying a lottery ticket.  
Another way to say this is that even though Alice and Bob have the same expected (as in averaging over the sample trials) arithmetic returns, Bob has a lower expected geometric return (as mentioned in the other answers) than Alice.  This follows from the concavity of the $\log$ function. 
This concept is generally called "volatility drag."  If you take the continuum limit of the situation, you end up with a model known as geometric Brownian motion.  In this framework, there's actually a formula for this drag.  Your average geometric return will be $r - \sigma^2/2$ instead of $r$ where $\sigma^2$ is the variance of the noise in your returns (e.g. the $X_i$ in Bob's returns).
Added
For readers who are perhaps unfamiliar with the notion of expectation from probability, I'll show how the calculation works explicitly for 2 years.  Then there are 4 possibilities:
$X_1= -0.05$ and $X_2 = -0.05$
$X_1= -0.05$ and $X_2 = +0.05$
$X_1= +0.05$ and $X_2 = -0.05$
$X_1= +0.05$ and $X_2 = +0.05$
Thus, the expectation is $$\mathbb{E}[(1.05+X_1)(1.05+X_2)] = \frac{1}{4}(1 \cdot 1 + 1 \cdot 1.10 + 1.10 \cdot 1 + 1.10 \cdot 1.10) = 1.05^2$$  Please read here for more information. 
A: There are two things I should point out. One is that the arithmetic mean doesn't properly measure annual growth rate. The second is why.
The correct calculation for average annual growth is geometric mean.
Let $r_1,r_2,r_3,\ldots,r_n$ be the yearly growth of a particular investment/portfolio/whatever. Then if you invest $P$ into this investment, after $n$ years your final amount of money is $Pr_1r_2\cdots r_n$. The (yearly) average growth rate of this investment is the number $r$ such that if the investment grew at a constant rate of $r$ every year then after $n$ years we'd have the same amount as we actually ended up with. In other words it is $r$ such that $Pr_1r_2\cdots r_n=Pr^n$. Thus we have
$$r=\sqrt[n]{r_1r_2r_3\cdots r_n},$$
which is the geometric mean, not the arithmetic mean.
If we use the geometric mean, we see that Turtle's average yearly growth is $\sqrt[5]{1.39}\approx 1.07$, and Hare's average yearly growth rate is $\sqrt[5]{1.36}\approx 1.06$, which is more in line with our expectations.
Why doesn't the arithmetic mean behave as expected?
Well, let's look at something over two years. Say its arithmetic mean growth is 1. Then the growth rate for one year will be $1+x$ and the other year will be $1-x$. Multiplying these together, we see that total growth is $1-x^2$. In other words, actual growth is always less than or equal to that predicted by the arithmetic mean (this is true for $n$ years as well, see the AM-GM inequality). Note further that the actual growth is closer to that predicted by the arithmetic mean when the individual annual growth rates are closer together. Thus if you are more consistent (your annual growth rates are closer together) then your arithmetic mean growth rate will closely approximate your true average annual growth rate as in Turtle's case. On the other hand, if your annual growth rates are more spread out, then your true average annual growth rate will be much lower than the arithmetic average growth rate (as in Hare's case).
A: The average is misleading; what you want is either the geometric mean, or the average of the logs of the return.
With $x \ll1$, $\ln(1+x) \approx x$.  For x further away, this fails to hold.
ln(1.30)+ln(1.20)+ln(0.65)+ln(1.10)+ln(1.22)=0.308, average 0.0616
ln(1.06)+ln(1.08)+ln(1.07)+ln(1.08)+ln(1.05)=0.329, average 0.0657
If we then take $e^{0.308}$ and $e^{0.329}$ we get 1.361 and 1.389 respectively, which matches the total return.  This is also equal to $(e^{0.0616})^5$ $and (e^0.0657)^5, aka 1.0635^5 and 1.0679^5.
Taking the log-average, then raising e to the power of that, does the same thing as taking the geometric mean.  I just find taking averages and adding values easier than multiplying values and taking nth roots.
A: Others have pointed out that the geometric mean is a more accurate reflection of how you're doing than a simple arithmetic mean, but if you look at it the right way, you actually can use arithmetic mean calculations. 
You calculated the mean based on five data points, considering each year-to-year event to be one data point. But what if we consider what happens to each dollar each year to be a data point? 
Suppose we have 1,000 at the start. Mr. Hare has 1,000 instances of a dollar turning into  1.30, or 1,000 instances of a 30% gain. The next year, he has 1,300 instances of a dollar turning into  1.20. And so on. So if we take the total gains, that's 1000*1.30+1300*1.20+..., while the total amount of data points is 1000+13000+... Dividing the first by the second, we get 1.06, which is the same as the geometric mean of the raw percentages. So if we take the arithmetic mean, but take into account how much money is involved, we get the same number as if we take the geometric mean without taking that into account.
The basic arithmetic mean that you calculated would be the average gain if the same amount were put at risk each year. If every year, Mr. Hare were to put  1000 at risk, regardless of how much he made the previous year, then at the end of the five years his total profit, divided by the  5000 total that he put at risk, would be 9%. But because Mr. Hare is putting a different amount at risk each year, depending on how he did the previous year, his rate of return is much lower. 
For instance, before Year 2, he has  1300, and after, he had  1560. So only  1300, rather than  1560, got the 20% return. Before Year 3, he had 1560, but after, he had  1014. So the full  1560, rather than the 1014, had the -35% return. Because of the compounding effect, every time he has a good year, that means he put less money in that year than the next year. But every time he has a bad year, he's putting more in that year than the next year. So not only is he not putting the same amount in every year, he's putting in less money when the market is good and more when the market is bad.
The same effect is happening to Mr. Turtle, but because his returns are lower, this has a smaller effect.
A: In Layman terms:The short down-to-earth economics' explanation is that when the return of investment is 0.65; you didn't just lose the the gains you made in the past years (aka returns or interest), you lost part of the original investment as well!
The down-to-earth math explanation is that you see '0.65' and think $1-0.65 = 35%$. OK that's very close to the 30%, 20%, 10% and 22% increments we've seeing, so 35% should be a small loss.
And this is the completely wrong mindset!
To recoup all of the losses of 0.65 on the next year, you need to calculate 1 / 0.65 = 1.54. A whooping 54%! You need to always think in terms of inverse function.
This is more obvious with a ROI of 0.0: Mr. Hare lost all the money he invested, and to recoup it he would need an infinite return on the next year (1/0 = ∞)!
A common mistake is to think you would need a 100% return on the next year to recover.
An infinite return can be interpreted that if the next year he makes money again, it wasn't because of whatever investment he made. Because theoretically he lost of all of it. It would make no sense to make money if you have no factory, no land, no money to pay salaries, no anything.
I see a very similar problem happens in video game development:
Newcomers compare frames per second (i.e. fps, frames / second) to measure performance, so if a game goes from 220 to 200 fps, they see it as a disaster because losing 20 fps looks like a lot. The problem is that they should be comparing milliseconds per frame (milliseconds / frames), thus they need to invert it. So instead of $220 - 200$, they should be doing $1000/200 - 1000/220 = 0.45$ ms.
That means that if the game would be running at 60 fps, that same performance hit would cause it to drop to 58.41fps = 1000 / (1000/60 + 0.45454545). So we see it wasn't a big deal: A 20 fps loss when running at 220fps is just a 2.59fps loss when running at 60 fps.
So that's why your original example feels counterintuitive to you: You're operating in the wrong space.
You're directly comparing the difference between numbers i.e. Mr Hare did 30% more in the first year, 20% in the second year, and made a 35% loss in the third year; when you should be thinking in terms of their inverse: Mr Hare did 30% more in the first year, so a loss of 23.07% on the next year would negate those results (23.07% = 1 - 1/1.3).
Mr Hare did an accumulated 1.3*1.2 = 1.56x in the first two years. So a loss in the 3rd year of (1 - 1 / 1.56) = 35.89% would negate all that.
Why it takes so little to fall so much apart? I feel there's a life lesson in there: things are hard to build, and easy to destroy.
Or you could see it from the angle that the 35,89% loss is not just taking a chunk of the money you already made, but also of the money you originally invested.
That original 1.56x increase had to be done in two years: the first year from 1.3x with JUST only the original money; and 1.2x with the original money + the returns from the first year. The loss of the 3rd year can take a bite from the returns of all 2 years combined plus the original investment.
If you kick a yenga tower by the middle, you make a lot more ruckus if it's a big tower that took a lot of time to build, than if it's a small one that was made a second ago with just a few pieces.
A: The fundamental problem with "percentages" is that they are a difference divided by some number. The choice of the divisor depends on the point that the salesman is trying to make. The result of using the initial or the final value is that if something goes up $x$ percent, and then down $x$ percent, it does not return to the same level. A much better solution would be to use the average of the initial and final values. But even then, there is a problem because percent changes are not additive.
Percent changes done MY way can be averaged and produce a result consistent with the geometric mean.
My solution is to use the simple formula %change $= 100 \times \ln(\text{final}/\text{initial})$. This allows you to add, subtract, and average percent changes. Of course, this is in defiance of everything we are taught in school and by our certified financial planners. I am waiting for the percent police to come knocking at my door...
A: When the economy is doing well, invest in the Hare. Just before the economy fails, sell your Hare investments and move them to Turtle/gold. Wait 2 years. When the economy gets better, sell Turtle/gold and buy Hare again. Everybody selling Hare at once actually causes the Hare stock to drop and, indirectly, the economy to fail. The trick is to guess when the recession will hit and be the first to move your money. Sell just before the bubble bursts. and buy back just after the market hit rock bottom.
A: The actual explanation is simpler and has little to do with maths. Warren Buffett is talking about protecting the principal. That's it. In other words: don't overpay.
This fits well with the investing philosophy of his earlier years: cigar butt investing.
And even after his shift to the moat investing style he has always stressed that what is smart at one price is stupid at another. Again: don't overpay.
Last, year to year returns is something that doesn't really apply to anything Buffett does. Once he assesses a company's economics and finds it is undervalued or fairly priced it will let his investment play out over a period of several years, potentially forever. A company's economics can hardly be adequately modeled by doing some random coin toss every year! Typically their margins, pricing power, sales, etc. are gradually eroded or strengthened.
For the most part Buffett also doesn't believe in the risk-return correlation in stocks.
Of course how a stock's quotes jump around in the stock market casino it's an entirely different story, but Buffett surely wasn't talking about that.
