Depends on the specific terms being offered, but when I looked into PMI a while back, my general conclusions were that if you have the 20%, your best financial move is to avoid PMI, but if you have to get PMI, then it generally makes sense to keep it, pay the minimum, and invest your savings.

I ran a scenario assuming a $100k house purchase, 4.125% available interest rate, 1% available PMI for borrowing an additional 10%, $20k cash on hand, and $1000 available every month for mortgage and/or investments. There are some assumptions you'll have to make on investment returns to determine the optimal strategy; I assumed this was a long-term (30-year) investment with constant investment returns. For this scenario, the breakeven point for getting PMI over no PMI is if investment returns are above 10%; otherwise, it is better to put 20% down (if available). If you already have PMI, the breakeven point to pay down the PMI as quickly as possible would be if you don't expect long-term returns to be at least 6%. Paying off the mortgage as quickly as possible in general would only make sense if long-term returns were less than your mortgage rate (4%). Attached is a plot showing 7% investment returns.

(I'm sure someone could come up with a fairly complex algebraic formula for plug and chug, but I'm not currently up for it.)