t1 = 0; 
t2 = 10; 
n = 1000; 
dt = (t2 - t1)/n

mv = {1, 1.5,  -1,  1.2,  -2}

Задаем периодический сигнал с высокочастотным шумом и случайными выбросами:

ind = 
      Table[{dt*i, Sin[dt*i] + 0.1*Sin[200*dt*i]}, {i, 0, 
          n}]; 
For[i = 1, 
      i < 6, {sl = Random[Integer, {1, n + 1}], 
        ind[[sl, 2]] = 
          ind[[sl, 2]] + 
            mv[[
              i]]}; i++]
ListPlot[ind]

Фильтр скользящего среднего:

filt = {{0, 0}, {dt, 0}, {2*dt, 0}, {3*dt, 0}, {4*dt, 
          0}, {5*dt, 0}, {6*dt, 0}, {7*dt, 0}, {8*dt, 
          0}}; 
For[i = 10, i < n + 2, 
      filt = Append[
          filt, {(i - 1)*
              dt, (ind[[i, 2]] + ind[[i - 1, 2]] + 
                  ind[[i - 2, 2]] + ind[[i - 3, 2]] + 
                  ind[[i - 4, 2]] + ind[[i - 5, 2]] + 
                  ind[[i - 6, 2]] + ind[[i - 7, 2]] + 
                  ind[[i - 8, 2]] + 
                  ind[[i - 9, 2]])/
              10}]; i++]
ListPlot[filt]

Экспоненциальный фильтр:

al = 0.95; 
filt1 = {{0, 0}}; 
For[i = 2, i < n + 2, 
      filt1 = Append[
          filt1, {(i - 1)*dt, 
            al*filt1[[i - 1, 2]] + (1 - al)*
                ind[[i, 
                  2]]}]; i++]
ListPlot[filt1]

Определение выброса:

signal1 = 
        Table[{dt*i, (filt[[i + 1, 2]])^2}, {i, 0, 
            n}];
ListPlot[signal1]

ind2 = 
      Table[{dt*i, (ind[[i + 1, 2]])^2}, {i, 0, 
          n}];

al = 0.95; 
signal2 = {{0, 0}}; 
For[i = 2, i < n + 2, 
      signal2 = 
        Append[signal2, {(i - 1)*dt, 
            al*signal2[[i - 1, 2]] + (1 - al)*
                ind2[[i, 
                  2]]}]; i++]
ListPlot[signal2]

signal21 = {{0, 0}, {dt, 0}, {2*dt, 0}, {3*dt, 
          0}, {4*dt, 0}, {5*dt, 0}, {6*dt, 0}, {7*dt, 0}, {8*dt, 
          0}}; 
For[i = 10, i < n + 2, 
      signal21 = 
        Append[signal21, {(i - 1)*
              dt, (ind2[[i, 2]] + 
                  ind2[[i - 1, 2]] + 
                  ind2[[i - 2, 2]] + 
                  ind2[[i - 3, 2]] + 
                  ind2[[i - 4, 2]] + 
                  ind2[[i - 5, 2]] + 
                  ind2[[i - 6, 2]] + 
                  ind2[[i - 7, 2]] + 
                  ind2[[i - 8, 2]] + 
                  ind2[[i - 9, 2]])/
              10}]; i++]
ListPlot[signal21]

signal31 = 
        Table[{dt*i, 
            Sqrt[Abs[
                signal1[[i + 1, 2]] - 
                  signal21[[i + 1, 2]]]]}, {i, 0, 
            n}];
ListPlot[signal31, 
      PlotRange -> {0, 0.7}]

signal32 = 
        Table[{dt*i, 
            Sqrt[Abs[
                signal1[[i + 1, 2]] - 
                  signal2[[i + 1, 2]]]]}, {i, 0, 
            n}];
ListPlot[signal32]

k = 2.5; 
v = {}; 
For[i = 10, i < n + 2, 
      If[filt[[i, 2]] < 
            ind[[i, 2]] - k*signal31[[i, 2]]  || 
          filt[[i, 2]] > 
            ind[[i, 2]] + k*signal31[[i, 2]] , 
        v = Append[
            v, {dt*(i - 1), 0}]]; i++]
G1 = ListPlot[ind];
G2 = 
        ListPlot[v, 
          PlotStyle -> {Red, 
              PointSize[0.015]}];
Show[G1, G2]
v