Some statistical applications in X-ray crystallography