Eliminating nuisance parameters: two characterizations