Some discrepancies were notably large: In one case, a product had just three milligrams of THC even though its label claimed 108, said Ryan Vandrey, the study’s lead author and an associate professor of psychiatry and behavioral sciences at the Johns Hopkins University School of Medicine.

The researchers declined to name specific manufacturers or products. “I didn’t want to get sued,” Dr. Vandrey said.

“The point is not to say, ‘Hey, X medical marijuana company, you’re bad,’ ” he added. The more serious issue is that “we don’t have the kind of quality assurance for edibles that we have for any other medicine.”

The analysis found some geographical differences: The likelihood of having edible medical marijuana with more THC than advertised was higher in Los Angeles, while the likelihood of having it with less THC than labeled was greater in Seattle.

The researchers also tested each product for cannabidiol, or CBD, a nonpsychoactive ingredient of marijuana that is being studied in purified form as a possible aid to children with intractable epilepsy.

Forty-four products had detectable levels of CBD, though only 13 disclosed CBD. Nine had less CBD than labeled; four had more.

One limitation was that just one laboratory performed the analysis, medical and lab experts cautioned. Methodologies and results vary from lab to lab.