A former Rhodes Scholar and internationally-respected epidemiologist, Prof Skegg was commenting at the graduation ceremony at the Dunedin Town on Saturday, during which more than 330 people graduated in person, mainly in humanities and health sciences.
Prof Skegg, who steps down as vice-chancellor at the end of July, also received an honorary doctorate in laws at the ceremony.
During a wide-ranging address, he indicated that although there had been much discussion about "declining standards of behaviour", the behaviour of Otago students during the annual capping ceremony had actually significantly improved.
Such a ceremony held at the town hall in 1930 had "turned into a riot".
"The students poured flour down the organ pipes. They dangled crayfish over the professors' heads, and they let off firecrackers.
"The next year there were policemen at the doors and only a few students were let in."
He later praised universities as "wonderful institutions" and reflected on their "commitment to truth and their respect for academic freedom, which is the right of people to express the truth as they see it - whether or not their views may be unpopular or even offensive to some people."
He recalled the first time he attended an Otago graduation ceremony was in 1969, when the university had celebrated its centenary and, as student president at Knox College, he had been invited to various events.
After returning to Otago University as a medical graduate in 1980, he had attended many graduation ceremonies and had sometimes wondered "whether the best way to stay awake during a graduation address is to be the speaker".
He said everyone was born with different opportunities, including "our physical and mental talents, our family circumstances" and the ways people were brought up also made a "further big difference". Chance also played a part.
"Some of us will face unexpected tragedies -think of your fellow Otago students who died in the Christchurch earthquake -while others will enjoy unforeseen opportunities."
He recalled a fellow surgeon once told patients: "Life is like a game of cards, and you have to do the best you can with the cards you are given."
Prof Skegg said he thought at the time the comment seemed "callous" in the way it was expressed, but had later realised there was "an important kernel of truth" in it.
"While we have to expect the unexpected, and to accept the cards that we are given, you can still make a big difference to the life you lead."