The spectral centroid is a measure used in digital signal processing to characterise a spectrum.
Some people use "spectral centroid" to refer to the median of the spectrum.
Since both are measures of central tendency, in some situations they will exhibit some similarity of behaviour.
But since typical audio spectra are not normally distributed, the two measures will often give strongly different values.
[1] Because the spectral centroid is a good predictor of the "brightness" of a sound,[1] it is widely used in digital audio and music processing as an automatic measure of musical timbre.