Parametric empirical Bayes problems with cost for component observations