Though this tag is usually for TIFF files - not for JPG files.
1) The above code doesn't work (even for 'JPG in TIFF' files that have this tag). IM can't output these EXIF tags in TIFF directly.
2) IM translates the info from the EXIF tags in TIFF partly into 'tiff:', 'jpeg:' or 'photoshop:' attributes. So, one can retrieve the info from the YCbCrSubsampling tag again with "identify -format "%[jpeg:sampling-factor]" image.tif". For example, if the stored values in the tag are "2 2", then IM displays that as "jpeg:sampling-factor: 2x2".
3) But even this info will be wrong for most of the 'JPG in TIFF' files that IM creates. Most of these files can't use subsampling anyway (the sampling-factor will be just 1x1). See my report here
So, sadly there is no easy way to retrieve the real sampling-factor for JPG compression in TIFF.