Dr. J. William Lloyd, 57, director of the office of statistical studies and analysis of the Labor Department's occupational safety and health administration, died of cancer March 27 in Montgomery General Hospital. He lived in Rockville.

Dr. Lloyd was a native of Pennsylvania. He earned bachelor's and master's degrees at the University of Pittsburgh, and received his doctorate in epidemiology and biostatistics from its school of public health. He served in the Army from 1945 to 1946.

He moved to this area in 1956. He worked for the National Institutes of Health from 1957 to 1976. During those years he served with NIH's National Cancer Institute, National Institute of Environmental and Health Sciences, and National Institute for Occupational Safety and Health. He then spent two years as an epidemiologist with the United Steelworkers' Union before joining the Labor Department in 1978.

Dr. Lloyd was a founder and past vice president of the Society for Occupational and Environmental Health, and a fellow of the American College of Epidemiology. He was the author of technical works on occupational epidemiology.

He was a member of Holy Cross Catholic Church in Garrett Park, where he sang in the choir and participated in its little theater group.

Survivors include his wife, Laura (Lolly), two daughters, Laura (Lolly) and Theresa Lloyd, all of Rockville; a son, William, of Greenbelt; his parents, Thomas F. and Catherine Lloyd of Wilkinsburg, Pa.; two brothers, John (Jack), of Lanham, and Gene, of Roswell, Ga., and two sisters, Betty Lloyd of Monroeville, Pa., and Mary C. Diskin of Penn Hills, Pa.