Mathematically, getting a mortgage and investing the cash is a no brainer. I'd still be tempted to give up some performance for peace of mind.
If friend really wants to optimize and de-risk:
Get 30 year fixed at 3%. Put cash in closed end municipal bond funds IQI and NEA (paying 4.59% and 4.49%, respectively) federal income tax free. These montly payers should more or less cover his payment (escrow for tax, insurance etc another matter). But the core loan becomes self liquidating and kicks off an itemized tax deduction. Basically, have your cake and eat it too by deploying the cash in a mental bucket towards the house, while making a tax arbitrage play.
Theoretically, you come out 1.5% ahead plus some tax benefits. Risk is very low and you lock in a small return.
EDIT: The decision doesn't need to be binary either. Friend can put 20% down, 50% down, 75% down, w/e. A "large" downpayment might allow for a 15 yr fixed at a substantially lower interest rate.