Prime Minister Julia Gillard agrees her partner's joke about prostate cancer and Asian women was in poor taste and says he did the right thing in apologising.

Tim Mathieson landed in hot water after delivering the joke to members of the West Indian cricket team at a reception at The Lodge in Canberra on Monday, as Ms Gillard stood behind him.

"We can get a blood test for it but the digital examination is the only true way to get a correct reading on your prostate so make sure you go and do that, and perhaps look for a small Asian female doctor is probably the best way," he joked.

While the joke did attract some laughs, others were not amused. Federal Liberal MP Kelly O'Dwyer said the joke was tasteless, inappropriate and lacked judgment.

Mr Mathieson was quick to apologise.

"It was meant as a joke and on reflection I accept it was in poor taste," he said in a brief statement issued by the prime minister's office on Tuesday.

"I apologise for any offence caused."

Ms Gillard said her partner was passionate about promoting men's health but the joke did warrant an apology.

"He could have picked his words a lot better and he has apologised for it," she told reporters in Canberra.

Prostate Cancer Foundation of Australia chief executive Anthony Lowe downplayed the gaffe, saying Mr Mathieson was a strong advocate for men's health.

"Men often use humour to deal with difficult or embarrassing issues like the digital rectum examination," Dr Lowe told AAP.

"I'm sure he meant it in a light-hearted way of getting the message across. Of course it's a little bit unfortunate, the words he used."

However, Dr Lowe did question the accuracy of Mr Mathieson's advice.

"Neither test is perfect but we would recommend that men over 50 talk to their doctor about getting both the blood test and the physical examination," he said.

Shadow attorney-general George Brandis said while the joke was "slightly unfortunate" he believed the episode highlighted that political correctness had gone too far.

"The joke was in poor taste but that having been said, I don't think we want to have in this country a culture of finger-wagging and confected outrage," he said.

But Australian Greens leader Christine Milne, who was at the function on Monday, said it was good for people to think twice about their off-the-cuff remarks.

"Whilst part of our culture is larrikinism, it has led to some pretty unfortunate consequences in the way people tend to express that," she told reporters in Canberra.