Bill Cosby waves as he departs his sexual assault trial Wednesday. (Matt Slocum/AP)

— On the opening day of the prosecution case against Bill Cosby, a shoulder-to-shoulder courtroom audience waited, many scooting forward in their seats, for an assistant district attorney to call the first witness.

Would it be Andrea Constand, the lanky former pro basketball player and main witness against Cosby, who alleges that he drugged and sexually assaulted her? Would it be one of five other women — known as “prior bad act” witnesses — cleared to testify against the legendary entertainer?

The reaction, then, when prosecutor Kristen Feden called out the name of an expert witness to lead off Cosby’s retrial on sex assault charges might best be summed up as “meh.” Shoulders slumped. There were audible groans.

But this particular expert, a flinty-voiced and abundantly self-assured forensic psychiatrist named Barbara Ziv, may prove to be one of the most important witnesses if prosecutors prevail in the sprawling case. Ziv testified about “rape myths” — widely believed misconceptions about the behavior of victims of rape and sexual assault, such as expecting women to immediately file police reports and to cut off contact with the men who attack them.

“Most common knowledge about sexual assault is wrong,” Ziv said.

In a sense, the Cosby retrial, now nearing the two-week mark, is shaping up as a referendum on rape myths, a test both of their grip on the mind-set of the public and of the notion that there may be exceptions to their tenets. Prosecutors, who rested their case Thursday, are betting on jurors absorbing the concept and applying it to Constand’s testimony, particularly her behavior after she says Cosby assaulted her in 2004.

The core of the defense case is a portrayal of Constand as a liar and extortionist. But Cosby’s attorneys are also angling to raise doubts that she is a true victim by pounding her with arched-eyebrow questions about the same sorts of behaviors that Ziv described as commonplace for women who have been sexually assaulted.

While being cross-examined, Ziv testified that no more than 7 percent of sexual assault allegations are false, and she thinks the number could actually be as low as 2 percent.

Rape myths have been studied for decades. But, according to Ziv, they persist despite the voluminous academic research that undercuts them. She explained that people generally believe sexual assault is committed by strangers when, in fact, 85 percent of victims know their attackers. Citing U.S. government statistics, she said fewer than 30 percent of sexual crimes are reported to police. And, crucially for the Cosby case, she testified that victims are often fuzzy about details, frequently wait for long periods to report their crimes and typically maintain contact with their attackers to try to “make sense” of what happened to them.

The decision to call Ziv as the first witness represented a major tactical shift by prosecutors. In Cosby’s first trial, which ended with a hung jury last June, they opted for a more dramatic kickoff, calling a prior bad act witness who sobbed on the witness stand about Cosby allegedly drugging and sexually assaulting her at the swanky Bel-Air Hotel in Los Angeles in 1996. This time, they opted to first educate the seven-man, five-woman jury about rape myths.

Once on the stand, Constand — a former Temple University women’s basketball official, who is more than 30 years younger than the legendary comedian — gave chilling testimony about a night in January 2004 when she says Cosby gave her pills that he claimed were herbal medication. She says they blurred her vision and left her legs feeling rubbery, and that the entertainer groped her breasts and roughly penetrated her vagina with his fingers.

Constand has said she regarded Cosby, then a Temple trustee, as a mentor. She testified that she didn’t contact police until a year later when she’d moved back to Canada and began screaming at night from persistent nightmares.

That is normal behavior, according to researchers such as Ziv. But Cosby’s defense team framed it differently, hoping to convince jurors that Constand delayed because she wasn’t actually assaulted and suggesting that her nightmares and depression were caused by the breakup of a friendship and financial problems.

Once Constand went to police, her statements were fraught with inconsistencies large and small — a not uncommon occurrence with sexual assault victims still sorting through their trauma. James Reape, a Montgomery County, Pa., detective, testified that those inconsistencies “fell by the wayside” when he read deposition testimony in which Cosby admitted to giving Benadryl, which the comedian uses as a sleep aid, to Constand and to having sexual contact with her.

A key potential problem with Constand’s accounts is that she told a police investigator that she was assaulted after eating dinner with Cosby and a group of Philadelphia educators at a Chinese restaurant in March 2004. She later changed her account, saying the assault happened two months earlier on an evening when she arrived at Cosby’s house with an empty stomach and he insisted she drink an old-vintage wine.

Over and over, Constand was forced to admit under a barrage of questions from Cosby’s attorney, Tom Mesereau, that she’d gotten key details wrong.

“I was mistaken about the night of the Chinese food,” Constand said. “It was just my mistake.”

Another time she attributed a detail she changed to the fact that she “was nervous” when interviewed by police.

Before Constand took the stand, Ziv — who spoke in general terms and said she had not reviewed the Cosby case — advised jurors that the public often wrongly thinks that sex-assault victims do things to make themselves vulnerable to attack. She was referring to the clothes women wear or the way they behave before they’re assaulted.

On the witness stand, Constand — who testified three days after Ziv — found herself answering questions along those same lines. Constand testified that the comedian gave her gifts, including three cashmere sweaters.

“Did you make a point to wear the cashmere sweaters that Mr. Cosby gave you when you saw him?” Mesereau asked.

Constand, who often appeared confused on the witness stand, stammered that she hadn’t. But the implication was clear: Constand wearing the sweaters might be interpreted by Cosby as a sign that the much younger woman was receptive to his sexual advances.

Of all the lines of attack on Constand’s credibility, one of the most persistent has been the defense suggestion that she is lying because she maintained contact with Cosby after the alleged assault. In one of Constand’s police interviews, she said their contact was “rare and brief.” But, on the witness stand, she said they spoke dozens of times on the phone, although she asserted that the calls — including two she placed on Valentine’s Day — were related to the Temple women’s basketball team.

Constand also was forced to acknowledge that she’d gone to Cosby’s home after the dinner at the Chinese restaurant to confront him.

In a mocking tone, Mesereau asked: “After the Chinese dinner you drove to his house with the man who had assaulted you?”

Constand said she had.

“I wanted to know what pills he gave me,” she said.

But he wouldn’t answer her questions, she said.

So she left, she said, still wondering what exactly had happened — and why.