A method for identifying the presence of at least one adulterant substance in a sample comprising the steps of: receiving a set of sample spectral data acquired for a sample, receiving a set of reference spectral data which is representative of a substance which is expected to be nominally the same as the sample if the sample does not contain adulterant substances, receiving a plurality of sets of validation spectral data each set for a respective validation example and representative of a substance which is expected to be nominally the same as the sample if the sample does not contain adulterant substances, receiving a set of adulterant substance spectral data for said at least one adulterant substance; determining sample residue data which is representative of a residue which would remain after performing a least squares fitting process between the sample spectral data and the reference spectral data; determining modified sample residue data which is representative of a residue which would remain after performing a least squares fitting process between the sample spectral data on the one hand and the sum of the reference spectral data and the adulterant substance spectral data on the other hand; for each validation example, determining validation residue data which is representative of a residue which would remain after performing a least squares fitting process between the validation spectral data for the respective example and the reference spectral data; for each validation example, determining modified validation residue data which is representative of a residue which would remain after performing a least squares fitting process between the validation spectral data for the respective example on the one hand and the sum of the reference spectral data and the adulterant substance spectral data on the other hand; performing at least one comparison amongst the sample residue data, the modified sample residue data, the validation residue data, and the modified validation residue data using at least one metric determined in respect of the data to be compared; determining a likelihood value for the presence of said at least one adulterant substance in said sample in dependence on said at least one comparison; and outputting said likelihood value. receiving a set of sample spectral data acquired for a sample, receiving a set of reference spectral data which is representative of a substance which is expected to be nominally the same as the sample if the sample does not contain adulterant substances, receiving a plurality of sets of validation spectral data each set for a respective validation example and representative of a substance which is expected to be nominally the same as the sample if the sample does not contain adulterant substances, receiving a set of adulterant substance spectral data for said at least one adulterant substance; determining sample residue data which is representative of a residue which would remain after performing a least squares fitting process between the sample spectral data and the reference spectral data; determining modified sample residue data which is representative of a residue which would remain after performing a least squares fitting process between the sample spectral data on the one hand and the sum of the reference spectral data and the adulterant substance spectral data on the other hand; for each validation example, determining validation residue data which is representative of a residue which would remain after performing a least squares fitting process between the validation spectral data for the respective example and the reference spectral data; for each validation example, determining modified validation residue data which is representative of a residue which would remain after performing a least squares fitting process between the validation spectral data for the respective example on the one hand and the sum of the reference spectral data and the adulterant substance spectral data on the other hand; performing at least one comparison amongst the sample residue data, the modified sample residue data, the validation residue data, and the modified validation residue data using at least one metric determined in respect of the data to be compared; determining a likelihood value for the presence of said at least one adulterant substance in said sample in dependence on said at least one comparison; and outputting said likelihood value.