 # Mathematical Function For Subtracting Background?

If I have 2 curves, 1 of the background and 1 of the background plus the thing I’m interested in, to remove the background should I subtract or divide it? Does it matter what kind of curve it is?

How about if a curve is skewed upwards, to flatten it should I subtract the line y=mx or divide the y-values of the curve by the y-values of the line?

Yes it matters on what the graphs represent

Not sure where division would be correct, but it serves as an example of “some complex formula”.

For example, if it was sound volume, it might depend on the units. eg in PSI (or a unit that measures the linear amplitude of the sound.), it would a more complex formula, but if its in dB, or dBm , then simple subtraction would be correct…

The process of ‘removing background’ wouldn’t depend on the the shape of the ‘wanted thing’ graph.

If you actually know the background (which is very rare in practice), then yes, you just subtract it.

If your data are skewed and you want to unskew them, then you need to know (or guess) what’s causing the skew, and how it manifests, and that will guide you on how to correct for it.

There are certainly cases where background can be multiplicative and dividing it can be the correct action. However usually this is an indication that the data is better viewed on a log rather than linear scale.

For X being the signal and Y being the background, try plotting X vs Y and also plotting log(x) versus log(y). Look for the graph which has a slope of 1 (with possibly a non-zero intercept) and noise (ie distance of data points from the regression line) that is most stable in terms of not increasing nor decreasing with greater values of background. If the log scale version looks best, consider background division, and analyzing this data on a log scale. Otherwise do simple background subtraction.

Thanks for the replies. This was for cases where I measure a sample and substrate separately, and want to remove the substrate’s measurements. For X-Ray Diffraction measurements, if the baseline is not flat, can I just fit a polynomial to it and subtract the polynomial? I think the XRD’s software plots in log10, but may be exporting the raw values.

The skewed data is for Differential Scanning Calorimetry. I have some data where the baseline isn’t flat. Some DSC software has analytical tools to skew it back, but I don’t have that software on my personal computer, and it’s better to understand what it’s doing. So I’m wondering if I should divide by or subtract the line y=mx. I think if I divide, I should also shift the graph so that one end is at y=0?

Ok I just realised “skew” in mathematics doesn’t mean “skew” in Photoshop, which is what I was referring to. So, I want to turn something from a parallelogram into a rectangle.

I just love math and physics threads. I never understand what is being said, but it’s fascinating just the same.