The trouble is, she couldn't have: no such "Law & Order" episode was ever produced or televised.
The error in the testimony by forensic psychiatrist Dr. Park Dietz became known to prosecutors and jurors after the conviction and before the sentencing phase of the 2002 trial. The defense asked for a mistrial because of it, but the judge refused. The jury ultimately spared Yates from the death penalty.
The appeals court absolved prosecutors of any wrongdoing. And Joe Owmby, who prosecuted Yates, said Thursday that he had no reason to doubt Dietz at the time.
"We fully intend to pursue a motion for a rehearing," said Harris County Assistant District Attorney Alan Curry.
The ruling means Yates is entitled to a new trial, although prosecutors say they will try to have the conviction reinstated.
says prosecutors now have a few choices to make.
"They can appeal this reversal up the ladder through the Texas appellate system. They can simply accept this result and retry Yates. They can try her for the first time for two of the killings that were not a part of the original case," says Cohen, noting that she was only tried for three of the five child murders. "Or they can simply drop the matter, save their own time and taxpayer money, and allow Yates to be treated as insane but not as a premeditated criminal."
Yates, 40, is more than two years into a life sentence after a trial that stirred national debate over postpartum depression, mothers who kill, and the legal definition of insanity.
Yates was thrilled by the news after learning of the ruling at the psychiatric prison where she is serving her sentence.
"She smiled and said she was basically just kind of in shock," said Todd Foxworth, warden at the Texas Department of Criminal Justice Skyview Unit, who delivered the news. "But she was very happy. Physically and mentally, she's doing as well as I've ever seen her."
Yates' husband, Russell Yates, told CNN's Larry King on Thursday "I'm happy, happy for Andrea."
"I think she needs to be in a state mental hospital until she's well," said Yates, who has filed for divorce. "Had she not been mentally ill, she never would've done what she did."
Yates defense attorney George Parnham said he has no plans to seek her release from the prison, about 140 miles north of Houston, where she works in a flower garden and has janitorial duties.
"Andrea is where she needs to be right now, as far as security is concerned for her," he said. "The last thing Andrea needs, quite frankly from my perspective, is to walk from the TDCJ Skyview Unit into the public arena."
On June 20, 2001, Yates drowned her five children one by one, then called police to her Houston home and showed them the bodies of Noah, 7, John, 5, Paul, 3, Luke, 2, and 6-month-old Mary.
Yates pleaded insanity, and according to testimony at the trial, she was overwhelmed by motherhood, considered herself a bad mother, suffered postpartum depression, had attempted suicide and had been hospitalized for depression.
Five mental health experts for the defense testified that she did not know right from wrong or that she thought what she did was right.
Dietz, a nationally known authority who took part in the Jeffrey Dahmer and Unabomber cases, was the only mental health expert to testify for the prosecution, and the only one to say she knew right from wrong. Ultimately, the jury rejected her claim of insanity.
The Yates case and others in Texas where the insanity defense was cited have prompted Texas legislators to take another look at the state's insanity laws. The case also stirred debate over whether postpartum depression is properly recognized and taken seriously.
Thursday's appeals court ruling is based on the testimony of Dietz, a forensic psychiatrist who consulted for "Law & Order" and helped prosecutors land a conviction in 2002. Dietz testified at the trial that shortly before Yates' crime occurred, a "Law & Order" episode ran about a woman who drowned her children and was found innocent by reason of insanity.
"We conclude that there is a reasonable likelihood that Dr. Dietz's false testimony could have affected the judgment of the jury," a three-judge panel of the First Texas Court of Appeals said.
A receptionist at Dietz's Newport Beach, Calif., office said Thursday that neither Dietz nor his firm had an immediate comment on the ruling. In its ruling, the court noted Dietz "acknowledged that he had made an error in his testimony."
"We may never know precisely how and why Dietz thought the show had aired or had even ever been produced," says CBS Legal Analyst Andrew Cohen. "What we do know is that the mistake was important and fairly inexcusable. Dietz or prosecutors or both should have tracked down the story to verify it before using it as part of the case against Yates. This is the precisely the sort of trial sloppiness that appellate courts are designed to fix."
"His testimony was critical to establish the state's case," the appeals court said. "Although the record does not show that Dr. Dietz intentionally lied in his testimony, his false testimony undoubtedly gave greater weight to his opinion."
In his testimony, Dietz said he consulted for the popular NBC series, and added: "As a matter of fact, there was a show of a woman with postpartum depression who drowned her children in the bathtub and was found insane and it was aired shortly before the crime occurred."
Later, during closing arguments, a prosecutor referred to the Dietz testimony to suggest that Yates learned from the TV show a way to escape responsibility for her actions. The prosecutor told the jury: "She watches 'Law & Order' regularly, she sees this program. There is a way out. She tells that to Dr. Dietz. A way out."