Cavity averages for hard spheres in the presence of polydispersity and incomplete data