AUSTIN -- With less than four months remaining in what has been the most expensive ($36.5 million and counting) and, at times, perhaps the ugliest gubernatorial campaign in American history, the numbers look somewhat daunting for Democrat Ann Richards in Texas.

Her Republican opponent, Midland oilman Clayton Williams, is ahead in the polls, outspending her by a 3 to 1 margin, and seems to have the state's geopolitical voting trends going his way.

That last point is crucial to understanding the Texas election; it frames the context of all the other variables: money, embarrassing utterances, the abortion issue, the gender gap, an October surprise, debate performances.

In primary elections in March, Democratic candidates attracted more voters than the Republicans and Richards, with less than 40 percent of the Democratic total, picked up more ballots on her side of the contest than Clayton Williams did on his, even though he clobbered his GOP challengers with more than 60 percent of the vote. Richards and her strategists often cite those figures when arguing that Texas is still a Democratic state.

But an analysis of the 1990 contest that includes a region-by-region study of the 1982 and 1986 gubernatorial races in Texas -- both featuring Republican Bill Clements and Democrat Mark White -- reveals a different political condition, one that in many ways parallels the built-in geographic advantages Republicans maintain in presidential contests. The map of Texas now seems shaded in Republican hues.

"Texas is becoming somewhat reflective of the national strategic situation," said political scientist Jerry Polinard of the University of Texas-Pan American. "The Democrat can no longer rely on the geographic equation; he or she needs some intervening variables to win."

Start with the Houston area, Harris County. The nation's fourth-largest city used to be the foundation of Democratic victories in Texas, and it is where the Richards camp is focusing much of its effort. But it could be argued that Harris County is, if not irrelevant, no longer pivotal -- roughly equivalent, perhaps, to New York state in presidential politics. When Democrat White defeated Republican Clements in 1982, he carried Harris County by 9,000 votes. Four years later, when Clements took the rematch, White increased his margin in Harris County, winning by almost 30,000 votes. It did not help. And there is no certainty that Richards will do as well there as White: he had the advantage of being from Houston; Richards is from Waco and Austin.

Now move to Dallas. It is Republican and year by year becoming decidedly more so -- perhaps analogous to Florida in presidential politics. In 1982, Clements lost the state but won Dallas County by 32,000 votes. Four years later he amassed a 45,000-vote margin there.

Dallas has a woman mayor and a large number of young, moderate Republican voters who Richards hopes to lure on social issues, especially abortion, but the odds against her are formidable.

Next door is Tarrant County -- Fort Worth -- which perhaps could be compared to the rest of the Sun Belt: dependent on defense contracts, with a burgeoning middle class that has turned Republican in elections beyond the local level. Tarrant County had the most revealing of all swings from 1982 to 1986. In the first White-Clements match, Democrat White carried Tarrant by 4,000 votes: four years later he lost it by 24,000.

West Texas is Clayton Williams country and, like the Rocky Mountain states in presidential elections, has moved rather solidly into the Republican camp. Democrat White won El Paso in both elections, but most Democratic activists there have already written it off to Williams this time. Midland, another urban area out west, went for Clements by 11,000 votes in 1986, and neighboring Odessa provided the Republican with a 10,000-vote margin.

South Texas, where Hispanic voters predominate, remains Democratic, but less so than in past decades. The Democratic advantage in Bexar County, which includes San Antonio, has all but vanished (White carried it by about 1,000 votes last time).

In the Rio Grande Valley, the rule of thumb is that Democratic candidates must come out of there with more than 60 percent of the vote. There are at least two major reasons why Williams might prevent that from happening. First, he speaks Spanish fluently; Richards does not. And second, the abortion issue, however it eventually plays, will not work to Richards's advantage in heavily Roman Catholic, Mexican-American Texas.

Austin is the San Francisco or Massachusetts of this analogy. Richards will win big in the capital city, probably, but with no larger impact.

That leaves East Texas, the old South, known historically as "yellow-dog Democrat" country, where voters were so conditioned to vote for Democrats that they would choose a yellow dog over a Republican. Those days are gone. In 1986, Republican Clements clobbered Democrat White in East Texas and, in fact, in all of rural Texas. That vote looms as the key to the 1990 election. It provided the widest swings from 1982 to 1986:

In the 24 most populous counties in the state, which comprise about two-thirds of the votes, White beat Clements by a margin of only 37,000 votes in 1982.

In the other 230 counties -- rural Texas, with about one-third of the total vote -- White amassed a 195,000-vote margin that year. Four years later, Clements narrowly won the urban vote but devastated White in the rural parts of East and West Texas, where he accumulated a 142,000-vote margin.

Can Richards recapture the East Texas vote, emblematic of the Lone Star rednecks or Bubbas? She has spent a good part of her summer working on that vote. In a recent tour of East Texas, Richards concentrated on law-and-order issues, trying to harden her image. She promised to eliminate parole for violent offenders, saying, "If you do the crime, you do the time." But in so doing she raised a common Democratic dilemma: she was dealing with issues that are fixed in voters' minds as Republican.

Williams was in East Texas too, pushing the same issues in his inimitable fashion. During a swing through Rusk, Carthage and Center, Williams picked up the endorsement of the Democratic dean of the Texas House, Rep. Bill Hollowell of Grand Saline, who said he was not changing parties but rather, "I saw some issues that were major and I saw a man I could back."

A perennial litmus test in Texas is gun control. Both Richards and Williams oppose it, but Williams takes the more intense position. "We may have to march on the government one day if it doesn't straighten out," he said. "We need to keep our guns." He later told reporters the comment was in jest. In any case, it did not seem to draw the attention of many of his earlier comments about rape and premarital visits to brothels.

With the political geography against Richards, she needs another serious Williams gaffe to stay in the race, political scientist Polinard said. "If she runs her campaign responding to his issues, she'll lose," he said. "If by October she's still going around having her picture taken with police officers, she just can't win on that issue. She needs intervening variables. She needs three or four debates with Williams. She needs a Supreme Court nomination fight that raises the intensity of the abortion debate. And she needs Williams to tell at least one more dumb joke. Two out of those three ain't bad, but if she only gets one, she's sunk."