Since 2000, Westchester, Nassau and Suffolk have experienced a drop in the number of 25- to 44-year-olds, with the declines particularly sharp in more affluent communities. Between 2000 and 2011, Rye, for example, had a 63 percent decrease in 25- to 34-year-old residents and a 16 percent decrease in 35- to 44-year-olds.

Image Jennifer Levi Ross at age 7.

New York suburbs are not the only ones getting somewhat grayer. In three Maryland suburbs outside Washington, Chevy Chase lost 34 percent of its 25- to 34-year-olds, Bethesda 19.2 percent and Potomac 27 percent. The declines were comparable for Kenilworth, Winnetka and Glencoe outside Chicago, and Nantucket, Barnstable and Norfolk Counties outside Boston.

Alexander Roberts, executive director of Community Housing Innovations, an advocacy group for affordable housing that released the report about the New York counties, attributed the declines in Westchester and on Long Island to the increasing cost of houses and the resistance by localities to building apartment buildings with modest rentals. The greatest population losses, he said, were in “the least diverse communities with the most expensive housing, which happen also to be those that have almost no affordable multifamily housing.”

Others who accept the data dispute Mr. Roberts’s explanations, pointing out that prices in some Manhattan and Brooklyn neighborhoods are even higher than those in the more expensive suburbs. But, he continued, the city is safer and more energized than it was a generation ago, and its allure has grown. Cities like Baltimore, Washington and Boston have also revitalized rundown or desolate neighborhoods.

Some suburbs are working diligently to find ways to hold onto their young. In the past decade, Westbury, N.Y., has built a total of 850 apartments — condos, co-ops and rentals — near the train station, a hefty amount for a village of 15,000 people. Late last year it unveiled a new concert venue, the Space at Westbury, that books performers like Steve Earle, Tracy Morgan and Patti Smith.