How to calculate standard deviation from the delay?

AI Thread Summary
To calculate the standard deviation from the delay in a signal, first determine the unit vectors using the equations x = 1*cos(delay) and y = 1*sin(delay). Accumulate the sums of x and x², as well as the sums for y and y², to find the mean and standard deviation. The average delay can be calculated as mean_delay = Sum_x / n, and the sample standard deviation as Ssd = √((Sum_xx - (Sum_x)² / n) / (n - 1)). This method allows for simultaneous calculation of means and standard deviations for independent x and y axes without needing to store the entire dataset. The approach is efficient and aligns with established statistical methods.
Nate Duong
Messages
125
Reaction score
4
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?
 
Engineering news on Phys.org
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
Baluncore said:
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 going to 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) )
 
Nate Duong said:
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
Baluncore said:
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 !
 
Thread 'Weird near-field phenomenon I get in my EM simulation'
I recently made a basic simulation of wire antennas and I am not sure if the near field in my simulation is modeled correctly. One of the things that worry me is the fact that sometimes I see in my simulation "movements" in the near field that seems to be faster than the speed of wave propagation I defined (the speed of light in the simulation). Specifically I see "nodes" of low amplitude in the E field that are quickly "emitted" from the antenna and then slow down as they approach the far...
Hello dear reader, a brief introduction: Some 4 years ago someone started developing health related issues, apparently due to exposure to RF & ELF related frequencies and/or fields (Magnetic). This is currently becoming known as EHS. (Electromagnetic hypersensitivity is a claimed sensitivity to electromagnetic fields, to which adverse symptoms are attributed.) She experiences a deep burning sensation throughout her entire body, leaving her in pain and exhausted after a pulse has occurred...
Back
Top