A U.S. District Court judge yesterday overturned the March 19 Washington Teachers Union election in which James D. Ricks unseated 19-year-incumbent William H. Simons by four votes for the presidency of the union.

Chief Judge Aubrey E. Robinson Jr.'s order was based on the U.S. Labor Department's recent decision to recommend that the mail-in election be thrown out, based on the discovery of "inadvertent mistakes" in the union's mailing list and interviews with union members whose votes were counted even though they said they did not receive ballots in the mail.

It was the second consecutive teachers union election that Robinson has ordered thrown out.

In a related but separate order yesterday, Robinson also denied without explanation a request by Ricks to be installed as interim president until the election dispute is completely resolved.

The complaints that led the Labor Department to recommend scrapping the results of the election were raised by Ricks, although he had requested that officials throw out election results for only 20 of the union's 22 contested posts, letting stand his own election and that of ally Jeannette Feely as general vice president.

Last November, Robinson threw out the union's May 1981 election, won by Simons, because that election was not conducted by secret ballot as required by federal law. Robinson then ordered the March 19 election, which he threw out yesterday.

In that March 19 vote, Ricks defeated Simons, 1,146 to 1,142.

Robinson ordered a new election for the union's presidency, general vice presidency, and six other union posts. No reason was offered in the order explaining why he did not order elections for all 22 electoral posts. Robinson's order said that the Labor Department will monitor the new election and that the election is to be held by June 24.

Ricks said yesterday he was miffed that Robinson had made his ruling "without giving us any opportunity" to explain why he believed his own election should not be overturned.

But, Ricks added: "I'm not disappointed and I'm very confident about winning again. It's a temporary setback."

Simons, who had requested a recount, was unavailible for comment yesterday, but said earlier that he welcomed the Labor Department's decision to ask for a new election and expressed confidence that he would win if the judge ordered new balloting.