Dr. Khaw, 53, an associate professor in anesthesia and intensive care at the Chinese University of Hong Kong, had designed an experiment to test the effect of carbon monoxide on rabbits. A student with whom Dr. Khaw had begun an extramarital relationship had also been involved in the experiment. He was later seen filling two yoga balls with the gas.

When Dr. Khaw, who is Malaysian, was questioned by officers, he told them that he had transported the carbon monoxide in a yoga ball from the university to kill rats at his home. He said that his daughter Lily had seen him leave the ball in the family’s exercise area, and that, after his warnings about its lethal contents, she may have used it to commit suicide.

Dr. Khaw’s defense lawyer, Gerard McCoy, tried to build a case by portraying Dr. Khaw as a loving father who had inadvertently driven his daughter to kill herself because of his high expectations for her academic achievement. He argued that Dr. Khaw had found it difficult to empathize with his children’s learning disabilities and mental health issues.

Later, in his closing remarks, Mr. McCoy said that Lily could have tried to use the gas-filled ball to kill insects without anticipating its fatal consequences.

The prosecutor, Andrew Bruce, described the deaths as a “deliberate and calculated murder.”

There was also the question of motive. For a few years before her death, Ms. Wong had known about her husband’s affair with the woman who had once tutored their children. In interviews with the police, Dr. Khaw said that he had stayed married to his wife because neither of them could “cope with four children individually.” Ms. Wong had told her yoga teacher that they did not divorce because her husband did not want to divide their assets.