Shopping for my first home has been an exploration in the fraught intersection of race and class. All of the housing workshops and research that filled my evenings and weekends did not prepare me for the complexities of buying a house as an African American.

When my husband and I moved from Washington to central Connecticut a year ago, I was not thrilled about leaving the city but took comfort in knowing that we could finally afford to buy a house. Real estate in our new home town is a fraction of the cost of houses in the District, even though the property taxes are steep.

We decided to rent for a year to get to know the area and save more money for a down payment. We wanted to stay close to the city. For months, we drove around neighborhoods, mapping out nearby amenities, researching schools and calculating commute times.

Just beginning the home-buying process can be a hurdle for some minorities. In a recent Redfin survey, 45 percent of minority buyers asserted that sellers and their real estate agents "may have been less eager" to do business with them because of their race.

My ideal was a majority-black, mixed-income community, somewhere I wouldn't have to worry about anyone feeling threatened by my husband walking the neighborhood.

When I was growing up in Greenbelt, Md., police were overly aggressive in stopping kids in their own yards. But the black enclaves in other parts of Prince George's County where my friends lived seemed like a haven. We could play in front of their houses without being harassed.

And I was awed by the black doctors, scientists, electricians and plumbers carving out their piece of the American Dream. It opened a world of possibilities for me, and I imagined it would do the same for children I'd have in the future.

But that kind of community did not exist anywhere near our city in Connecticut. The nearest neighborhood that fit the bill was a small town and would have added 20 minutes to my husband's commute. And I started to worry that buying in a predominantly black community would be an expensive gamble.

[Study ties black-white wealth gap to stubborn disparities in real estate]

Values in black neighborhoods lag

Studies have shown that homes in black neighborhoods don't gain as much value as those in mostly white communities. One report out of Brandeis University pegged the problem to white home buyers shunning neighborhoods with even a modest black population, which depresses housing demand, drives down prices and stifles appreciation in those communities. Another study found that even wealthy minority neighborhoods had less home value per dollar of income than wealthy white neighborhoods.

For instance, though prices are rising in Prince George's County after it experienced disproportionately higher foreclosure rates during the recession, home values there are still among the lowest in the D.C. region.

"Because whites are the primary purchasers in the home-buying market their preference dominates the market," said Dorothy Brown, an Emory University law professor who has studied the issue. "They are generally uncomfortable living in communities that are not all white, or almost all white."

She said that when more than 10 percent of families in a neighborhood are black, home values fall because the community becomes less attractive to white buyers. That sort of anti-black sentiment is even pervasive among other racial or ethnic minorities.

Sociologist Camille Charles at the University of Pennsylvania has written about Latino and Asian homeowners preferring few black neighbors in their communities.

"They internalize the same racial hierarchy that says blacks are always the least desirable group," she said. "Latinos and Asians are more likely to draw a neighborhood with no black people in it but [that] might otherwise be integrated."

Minorities also understand that white neighborhoods are afforded more amenities and reliable public services because of that same racial hierarchy, Charles said. Yet the greater the exposure to discrimination, she said, the less minorities are willing to live in predominantly white neighborhoods.

In the end, we focused on two communities in central Connecticut. One neighborhood is renowned for its public schools, a key selling point as we plan to start a family. The other is a historic district on the edge of the city, with stately Victorians bookended by two universities.

[Historically black beach enclaves are fighting to save their history and identity]

Both communities are home to college-educated, middle-class families, but neither had quite as much socioeconomic diversity as we would have liked. We spotted more black and brown faces in the historic district, although white families still make up the majority of the population. The racial diversity, albeit limited, was attractive, but the school ratings in the other community won us over.

The school challenge

We narrowed our search to houses near the top-rated school districts, which all happened to be in the least-diverse neighborhoods. It was a difficult decision, but we figured that as long as there were a few students of color our future children would be fine. That belief changed after we attended a few open houses.

It wasn't anything that anyone said, but the looks from neighbors as my husband and I went to one showing after another conveyed the message: What are you doing here?

Not only were we the only African Americans at every open house, we also were the only people of color. We always showed up in our Sunday best to put people at ease, so they would consider us to be just like them — professional, educated and wanting the best for our family. This is an infuriating ritual that black people have long endured to negotiate racial prejudice, even while recognizing that it often makes no difference.

"If you talk to African Americans, the strategy they use to overcome the experience of feeling like people are judging them is to project their class status: I'm going to drive the nice car. I'm going to dress up really nicely. I'm going to drop that I'm a doctor," said Maria Krysan, a sociologist as the University of Illinois at Chicago.

These encounters started to wear on me, but I kept thinking about the school system. It seemed so much easier to navigate than the one in the historic district, where we would have to go through a lottery process. But once I met black parents with children in some of those top-rated public schools, I completely lost faith.

Some recounted incidents of teachers labeling their children as troublemakers or administrators steering them into remedial classes. Others recalled white parents simply treating them with disdain. Even our mortgage lender, an African American woman, had a story that involved her hiring an attorney.

After every story, each black parent said essentially the same thing: The schools are good, but you have to be prepared to fight — fight for respect, fight for dignity, fight for white people to see your humanity.

Yes, parents everywhere butt heads with school administrators, teachers and other parents. But the picture that was emerging about our desired community was less than desirable, especially because it elicited bad memories from my own childhood.

My parents did their fair share of fighting after enrolling me in a predominantly white elementary school. There were some great teachers, but too many others who pegged me as a menace for getting into arguments with white students who called me nigger or felt I wasn't acting black enough.

I tried not to let that experience cloud my judgment, but the last thing I wanted to do is place my kids in a similar environment. Yet as an education writer, I've seen an abundance of evidence showing disparities in opportunities, treatment and outcomes for black and white children.

There are enough odds stacked against black children, who too often are perceived as troublemakers for behavior that is excused in children of other races. Researchers at Yale University found teachers, both black and white, simply expect black children, especially black boys, to misbehave.

[My son has been suspended five times. He’s 3.]

That implicit bias probably factors into the disproportionate rate of suspensions for black preschoolers, who accounted for 19 percent of all preschoolers in the 2013-2014 school year but, according to the U.S. Education Department, represented 47 percent of those who received suspensions. If you expect the worst from a child, even little infractions can be blown out of proportion.

"You have all of these issues around race, some of them have to do with children, some of them have to do with your own personal safety, so that if you buy a house in an all-white neighborhood and you're the only black, it's going to be a good investment but what's the potential emotional toll?" Brown said.

Reaching out to neighbors

It became apparent that we needed to rethink our house hunt. The turning point came when we decided to go to an open house in the historic district. The house was a complete gut job and far more work then we could handle, but what struck us was an encounter with the neighbors.

After spotting us leaving the house, the white couple who lived next door called us over to encourage us to buy the place. They invited us into their home to get some renovation ideas. We talked about the close-knit community and about the local schools, which they had concluded got a bum rap because of the racial and socioeconomic diversity the lottery system created.

The couple's hospitality made us feel welcomed, and the black woman tending to her garden two doors down made us feel at home.

[School quality has a mighty influence on neighborhood choice, home values]

"Thirty years ago when you asked African Americans what is it about white neighborhoods that make you reluctant, there is an edge to the hostility they anticipate: I don't want crosses burned on my front lawn," Krysan said. "What I hear today is: I'm not going to be welcomed and if anything ever goes wrong in this neighborhood they're going to look at me. Or if I have kids, nobody is going to play with them. It's that kind of subtle discrimination. Who wants to live like that?"

We shifted our search to the historic district after a few more conversations with families in the neighborhood and other sightings of people of color. People were friendlier as we walked around the neighborhood and there were other black families at the open houses.

Still, I couldn't help wonder whether the warm reception would have been the same if we weren't still wearing our Sunday best, if my husband had showed up in a uniform like my dad wore to work.

The funny thing is, I went into this house hunt worried about lending discrimination or having agents steer us from neighborhoods. Far too many African Americans have been shut out of affordable mortgages or quality homes because of unscrupulous banks or prejudiced brokers. We were fortunate to find an amazing community banker and tenacious agent who fought to get us the best deal on a great house.

We closed during the summer on one of those stately Victorians in the historic district. Now, here's to hoping that my positive perception of the neighborhood proves accurate.