This paper describes a method for carrying out inference on partially identiﬁed parameters that are solutions to a class of optimization problems. The optimization problems arise in applications in which grouped data are used for estimation of a model’s structural parameters. The parameters are characterized by restrictions that involve the unknown population means of observed random variables in addition to the structural parameters of interest. Inference consists of ﬁnding conﬁdence intervals for the structural parameters. Our theory provides a ﬁnite-sample bound on the diﬀerence between the true and nominal probabilities with which a conﬁdence interval contains the true but unknown value of a parameter. We contrast our method with an alternative inference method based on the median-of-means estimator of Minsker (2015). The results of Monte Carlo experiments and empirical examples illustrate the usefulness of our method.