I don't have any formal math for you, but my answer is that trying to not get a refund is a planning question that involves predicting the coming year, whereas trying to maximize your refund is a strategic question about filing your taxes after the year happened. In other words, tax owed or refunded at filing time is a measurement of prediction error about your expectations for the prior year.
At any given time, I can make tax withholding decisions (or estimated tax payments for the self-employed) that I expect will mean I pay the exact right amount in withheld taxes. However, between now and the end of the tax year, lots of things can happen. My income can change, the tax rates can change, I can buy or sell a house or car and both my deductions and tax obligations can change, I could get married or otherwise change my filing status, and so on. There are enough variables outside my direct control that I should not expect to always get this right.
When I file, I have all the information. I know exactly what happened, where reality differed from my predictions. Yes, there may be things I can do even then in how I file that might legally change the outcome, but in general that's a question of skill in reading legalese and filling out forms.