Ernest Rubin, 63, a retired Commerce Department official and professor of statistics at the University of the District of Columbia, died of cancer Sunday at George Washington University Hospital.

He was director of the Eastern Europe Division of the Bureau of International Commerce from 1961 until retiring in 1973. He had joined the Bureau in 1948 as chief of the statistics section in the European Division.

As an economist in charge of research of East-West trade, Dr. Rubin participated in numerous trada missions abroad. He wrote numerous papers in his field and was editor of the Questions and Answers section of the American Statistician, a journal of the American Statistican, a journal of the American Statistical Association, from 1954 through 1973.

He had been a research statistican with the immigration and Naturalization Service in New York City before coming here in 1943. He was the author of monograph, "Unemployment of Aliens," in 1947 and coauthor with Simon Kuznets in "Immigration and the Foreign Born," published in 1954.

During his years of Commerce, Dr. Rubin also was a part-time instructor at American Howard, Catholic and Georgetown Universities and the predecessors of the University of the District of Columbia, later becoming a full-time professor at the latter.

He became known for turning the often dull subject of statistics into an entertaining subject.

Dr. Rubia was born in New York City. He was a graduate of the City College of New York and held master's and doctor's degrees from Columbia University.

He was a fellow of the American Statistical Association and the American Associaton for the Advancement of Science.

He is survived by his wife, Mary Villon Rubin, of the home in Arlington; two sons, George, of Santa Monica, Calif., and Michael, of Winston-Salem, N.C.; a daughter, Eleanor Baldwin, of Irvine, Calif; a sister, Charmion Pearlman, of Woodbury, Long Island, N.Y., and seven grandchildren.

The family suggests that expressions of sympathy be in the form of contributions to the American Cancer Society.