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.
I think there are several factors to consider before you can answer for your self.
First, discount rates. What is your discount rate for future money? If that is high then clearly getting the refund is not optimal for you and you'd be better off setting deductions such that you don't get much of a refund (or even perhaps owe a small amount). However, if your discount is 0 then you don't care if you get the money now or sometime in the future.
The implication here seems to be that getting the refund is at best no better than not getting the refund. One might take a further step to say over the course of a year various things can come up where having a bit more cash would help so, risk adjusted, the refund is the second best choice for you.
The flip side might relate to personal financial discipline and spending habits. If you need to save (say for larger ticket item things or for placing in a savings/investment account) but struggle to achieve that the refund may well be better. It becomes something of a forced savings strategy. Money you never see is much easier to save than money you hold in you hand.