How to calculate standard deviation from the delay?

  • #1
126
3
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?
 

Answers and Replies

  • #2
Baluncore
Science Advisor
8,489
3,203
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) )
 
  • Like
Likes Nate Duong, jim hardy and dlgoff
  • #3
126
3
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) )
@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) )
 
  • #4
Baluncore
Science Advisor
8,489
3,203
The sample standard deviation is; Ssd = √( (Sum_yy – (sum_y) / n ) / (n – 1) )
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.
 
  • Like
Likes Nate Duong
  • #5
126
3
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.
@Baluncore: thank you very much for this thread, Baluncore !
 

Related Threads on How to calculate standard deviation from the delay?

  • Last Post
Replies
4
Views
1K
  • Last Post
Replies
3
Views
665
Replies
1
Views
4K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
1
Views
2K
Replies
2
Views
1K
Replies
2
Views
926
Replies
20
Views
2K
Replies
7
Views
3K
Top