Will Ferrell
Comedian Will Ferrell (r) is presented with an honorary doctoral degree by USC President C L Max Nikias before delivering the commencement address at the University of Southern California in Los Angeles, California REUTERS/Patrick T. Fallon

When the University of South California's graduating class of 2017 were informed that Will Ferrell would be giving a speech at their commencement, they were ready for a round of laughs from the comedic actor. What they got was a surprise musical performance by the Daddy's Home star.

Addressing the students, Ferrell, a graduate of USC, gave out advice about following their dreams. "Enjoy the process of your search without succumbing to the pressure of the result. Trust your gut, keep throwing darts at the dart board, don't listen to the critics and you will figure it out," the funnyman told the graduates.

"Class of 2017, I just want you to know you will never be alone on whatever path you may choose. If you do have a moment where you feel down, just think about the support you have from this great Trojan family. Imagine me — literally picture my face — signing this song, gently into your ear."

He then proceeded to sing Whitney Houston's 1992 hit I Will Always Love You and impressed the crowd as he managed to hit all the high notes towards the end of the song.

Ferrell was also awarded an honorary Doctor of Humane Letters Degree, along with actress Helen Mirren, AIDS researcher David D Ho, social work pioneer Suzanne Dworak-Peck, Los Angeles County Supervisor Mark Ridley-Thomas and inventor and surgeon Gary K Michelson.

"I've been informed that I can now perform minimally invasive surgery, at any time or any place, even if people don't want it," the actor joked on now becoming 'Dr Ferrell'. "The next time I'm flying and they ask if there's a doctor on board, I can now confidently leap to my feet and scream, 'I am a doctor! What can I do? Yes, no problem, I can absolutely deliver that baby!' Hopefully, it will be on United Airlines."

The Anchorman star also turned his attention to fellow honouree Mirren and joked about how she stole his chance at winning an Oscar. "Even now, I still lose out on the parts that I want so desperately. My most painful example was losing the role of Queen Elizabeth in the film The Queen," he said. "Apparently, it came down to two actors — myself and Helen Mirren. The rest is history. Dame Helen Mirren, you stole my Oscar!"

Watch Will Ferrell's complete commencement speech below: