When I think about extended warranties, I think about how the warranty has to be priced based on the following factors (this is what I am paying for):
1) The expected cost of covered repairs, on average, for this kind of vehicle.
2) The administrative overhead of the company that underwrites the warranty and processes the claims (basically a share of the salaries of everyone who works at the company, etc.).
3) A profit margin for this company in addition to the above.
The sum of those 3 things is the price of the warranty. But only the wholesale cost. So add these things:
4) The dealership that sells it to you has to mark it up to make it a profitable product for them to sell.
5) The individual salesman gets a commission to motivate him to badger you into buying it.
Those last two items might double the wholesale cost of the warranty.
Out of those 5 things, only item 1 directly benefits me. And that thing might be just a small fraction of the total price I am paying.
So for me, it makes sense to decline the warranty and invest the money instead.
But obviously that is a risk, because a couple of major covered repairs could pay for the warranty. On average, that will not happen to the typical owner, but it could happen to any individual. So you have to be willing to take the risk. But I believe that while that might happen to me once, it probably will not happen to me every time I buy a car. So if I put the $2500 in an investment account every time I buy a car throughout my life, then I should still be ahead in the end even if some of my cars are lemons.
Another factor is that I happen to take very good care of my cars. I drive them gently, maintain them well and keep them in like new condition, even after many years. Some people seem to have consistent terrible luck with cars and turn them into beaters much more quickly. Maybe a warranty makes more sense for people who have "bad luck" with cars.
One final note about extended warranties: My sister was once talked into an extended warranty on a Honda that she was buying. She bought it at the dealership at the same time as the car. Years went by and then the car's timing belt broke, so she tried to make a claim. What she discovered was that the company behind the warranty had since gone out of business, so she was just flat out of luck. Money thrown away. I had a similar thing happen to me on an piece of consumer electronics bought at Circuit City. Extended warranties do not completely eliminate risk.