Parameter inference from event ensembles and the top-quark mass