Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How to calculate standard deviation from the delay?

  1. Jan 5, 2017 #1
    I am trying to calculate the unit vector and standard deviation of the signal. I hope everyone can give me ideas.

    Here is my scenario:

    I have 2 rx channels: - f is channel 1 with the length 1x256 complex, then FFT. - g is channel 2 with the length 1x256 complex, then FFT. - from f and g, I can calculate the spectrum density S_fg = f * conj(g), with the length 1x256 complex

    S_fg = f * conj(g)
    t_0 = 1 / f_0;
    r_0 = t_0 / (2 * pi);
    delay = angle(S_fg) * r_0 * 1e12; % in pico second
    d = median(delay);

    since I have those parameters, How can i calculate the unit vector (x,y), and standard deviation?

    The unit vector maybe calculated by the equation:
    x = 1*cos(delay); % 1x256
    y = 1*sin(delay); % 1x256

    but I do not know how to get the standard deviation?

    Hope anyone can help?
     
  2. jcsd
  3. Jan 7, 2017 #2

    Baluncore

    User Avatar
    Science Advisor

    I think you have gone too far. Find the delays, x, then accumulate the sums of x and of x2.
    For i = 1 to 256
    Sum_x += x(i)
    Sum_xx += x(i)2
    Next i

    The average delay is; mean_delay = Sum_x / n
    The sample standard deviation is; Ssd = √( (Sum_xx – (sum_x)2 / n ) / (n – 1) )
     
  4. Jan 8, 2017 #3
    @Baluncore: I agree with your equations, is it gonna be the same when I calculate for y and xy values?
    The average delay is; mean_delay = Sum_y / n
    The sample standard deviation is; Ssd = √( (Sum_yy – (sum_y) / n ) / (n – 1) )
     
  5. Jan 8, 2017 #4

    Baluncore

    User Avatar
    Science Advisor

    Don't forget to square the Sum_y in the Ssd equation. (sum_y)2 / n.

    The application to independent x and y axes is not a problem.
    The resulting means Mx and My make a mean vector M. Likewise, SDx and SDy make an SD vector.
    I have not thought through the signal implications of ∑(xy) and ∑(x2y2), but I see no reason why it cannot be done.

    The mean and SD equations I gave are the same as those used in HPs RPN calculators by the ∑+ and ∑– key functions. Counting the number of samples n, and the accumulation of ∑x, ∑x2, ∑y and ∑y2 can all be done for the independent x and y axes in a single pass. The method has the huge advantage of not needing to store the input data set until the mean is known.
     
  6. Jan 8, 2017 #5
    @Baluncore: thank you very much for this thread, Baluncore !
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted