I want to determine the power of the noise component of a time dependend signal x(t) (similar to picture below)
With constant sampling rate I use Parceval's Therorem and calculate the standard deviation with
$$ \sigma^2 = \frac{\text{abs}(\text{FFT}(x))^2}{N} $$
where N is number of data points and fft matlab dft implementation. For the standard deviation according to white noise I remove the discrete frequencies of the spectrum and use above formula with the mean value of the remaining spectrum.
In some signals there are quite a few NaN data points (~ 10%), so said method can not be applied anymore.
Is there a mathematically correct method to determine the power of the noise component of the signal? Interpolation does not seem to be a good solution, because this would lead to an underestimation of the noise.