It is often recommended that when investing money in a mutual fund or security to use a strategy called dollar cost averaging. This simply means you invest a fixed amount of money at periodic intervals rather than say buy a fixed number of shares at periodic intervals or invest as a lump sum. The argument is that when the price of the fund is low you buy more shares and when it is high you buy fewer shares. In this way you can ride out the fluctuations in the stock price.
Evaluating which strategy is best is a great example of how concepts in calculus and in particular Jensen’s inequality enter every day life and more reasons for why an average person should learn more math. The question is how do the investment strategies compare over time. Let be the price of the fund at time . In dollar cost averaging, you would invest dollars at periodic intervals (say each week). So the number of shares you would buy each week is . Over a time period you will have purchased shares, which can be rewritten as , where is the expectation value or average. Since you have invested dollars, you have paid per share on average, which is also called the harmonic mean.
If on the other hand you decided to buy a fixed number of shares per week then it would cost . Over the time period you will have spend and have shares. Thus you have paid on average. Now the question is how does the mean compare to the harmonic mean . This is where Jensen’s inequality comes in, which says that for a convex function , . A convex function is a function where a straight line joining any two points on the function is greater than or equal to the function. Since is a convex function, this means that which can be rearrange to show that . So dollar cost averaging is always better than or as good as buying the same number of shares each week. Now of course if you buy on a day when the price is below the harmonic mean of a time horizon you are looking at you will always do better .