In small ways, the rebellion against Shah Mohammad Riez Pahlavi's tight-fisted rule in Iran has affected the lives of all of the approximately 41,000 Americans living here. For some, the impact does not seem so small, and 4,000 of them have gone home.

Battle tanks rumbling through downtown Tehran and Iranian Army troops patrolling the streets with bayonetted automatic rifles are reason enough for some.

Leaflets left in mailboxes warning "Cursed Yonkys" to leave the country are enough for others.

Close brushes with death are reasons for a few, such as Janice Allen, of San Jose, Calif., who was trapped in her ninth floor room when her hotel was set on fire by rioters Sunday, and who escaped in a hair-raising rescue by a crane operator.

She and her husband, David, an RCA Corp. computer consultant, had been looking for an apartment in Tehran, but they are going home as soon as they can get a flight.

For most Americans living and working in Iran, however, it is the uncertainty of everyday life that causes anxiety: the uncertainty that the police and the army can control massive protests, and the uncertainty that insulated American residential colonies - most of them in the suburbs - can be guaranteed safety.

Overriding all of the question marks is whether or not the shah, whom many Americans equate with security and law and order, can remain on the throne much longer.

There is no massive exodus of Americans from Iran yet. The most responsible estimates are 10 percent or less of the total number of workers and dependants living here.

While several firms have arranged charter flights on a cooperative basis to fly dependants out, most of the flow of Americans homeward has been in the form of a steady trickle rather than a rush.

Nevertheless, there is persistent apprehension, fueled by constant rumor.

Tehran has become Rumor City, and the more bizarre the rumor, the faster it seems to spread. One day, 20 Iranian soldiers were said to have committed suicide rather than fire on student protestors, and before nightfall the report had reached the comfortable northern Tehran suburb of Niavaran, where Americans began wondering aloud whether the shah's army could be counted upon.

Another day, there were reports that two American women had been raped and murdered by rampaging youths, until somebody tracked down the rumor and found that it began with an inaccurate translation of a report in Persian that two women had been "insulted" instead of "assaulted."

The problem of spurious stories has grown so much that the U.S. Embassy is operating a rumor control center around the clock, fielding hundreds of telephone questions daily in an attempt to sort out fact from fiction.

Not all of the reports are dismissed lightly, such as earlier this week when fire bombs were thrown at three apartment units in Niavdran, where many Americans live. U.S. Embassy employes lived in all three buildings, but so did other foreign nationals and an Iranian family.

So far, there have been no confirmed serious injuries or deaths of Americans in the recent disturbances, although some offices and businesses associated with the United States were damaged in two days of rioting.

Also, at the peak of the disturbances any obvious foreigner who walked the streets could count on icy stares and venemous insults in Persian.

But much of the anxiety of American expatriates here stems from the suddenness of Iran's social and political problems being thrust into the lives of an alien community which, for the most part, has never concerned itself with Iranian issues.

A majority of the Americans living here are employed by U.S. defense and telecommunications industries, such as Bell Telephone, Grumman Aircraft, Bell Helicopter, Lockheed Corp., Boeing Corp. and GTE.

There are also large numbers of employes of contracting firms, service industries, oil production-related companies, and various technical and management consultants to Iranian industries.

Many of the Americans lead an insular life, staying close to their suburban colonies, reluctant to mix regularly with Iranians, learn Persian or study the complex of Persian psyche and the turbulent history of this country.

"So many Americans come over here and don't even try to understand the culture. Maybe they think it's not worth it for their two or three years here," said one American businessman who, like others interviewed, did not want his name associated with remarks critical of his fellow countrymen here.

"They have their barbeques, softball leagues, American schools and American suburban homes. They don't want to be bothered with somebody else's problems," said the American, who speaks Persian and lives in an Iranian neighborhood.

This insular attitude is fed daily by two English language daily newspapers and an American staffed radio station and television channel that seems to barely acknowledge the existence of a non-American culture here.

An American disc jockey on National Iranian Radio opened a show recently with a tasteless literal translation of a Persian salutation, laughing as he said, "Good morning on your face."

American housewives at cocktail parties here tend to talk more about dysentery and worms in vegetables than they do about Iran's social and economic problems, even in the eventful recent weeks.

Some of the Americans who do try to bridge the cultural gap blame this condition on shallow company orientation programs, which they say sometimes emphasize practical living comforts while sidestepping controversial political issues.

Others blame the U.S. Embassy, saying that in briefings and various outreach programs, the U.S. government in the past has tended to minimize the opposition, and overshadowed the significance of the social unrest with uncritical support of the shah and his government.

In any case, the result has been a striking ambivalence to domestic political events here and, subsequently, confusion and anxiety once the events could no longer be ignored.

For its part, the U.S. Embassy is trying hard to keep panic under control, and offer calm advice, which so far has been simply that Americans can go about their daily routines and feel safe as long as they obey curfew and other martial law regulations to the letter.

"There's not much anybody can do. It's tough to jump from here. You just don't cross a border," said an embassy official.