Solution to the Ecological Inference Problem