There is provided herein a method for producing a representative CO2 waveform, the method comprising obtaining two or more CO2 waveforms, for each of the two or more CO2 waveforms determining one or more scale factors and one or more shape factors, computing, based on the one or more shape and scale factors of each of the two or more CO2 waveforms, a representative set of shape factors and scale factors representing the two or more CO2 waveforms and constructing a representative waveform based on the representative set of shape and scale factors.