The velocity anisotropy—density slope relation