# How to calculate standard deviation from the delay?

• Nate Duong
In summary, the conversation is about calculating the unit vector and standard deviation of a signal using two rx channels. The spectrum density of the channels is calculated and the delays are found, which are then used to calculate the unit vector (x,y) and standard deviation. The equations for finding the mean and standard deviation are provided, and it is noted that the same method can be applied to calculate the mean and SD for independent x and y axes. The method also has the advantage of not needing to store the input data set until the mean is known.
Nate Duong
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?

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) )

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.

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 !

## 1. What is standard deviation?

Standard deviation is a measure of how spread out a set of data is from its mean or average. It tells us how much the data points deviate from the average value.

## 2. Why is standard deviation important in calculating delay?

Standard deviation is important in calculating delay because it helps us understand the variability or consistency of the delay times. A higher standard deviation means a larger spread of delay times, while a lower standard deviation means a smaller spread and more consistent delay times.

## 3. How do you calculate standard deviation from the delay?

To calculate standard deviation from the delay, you will need to first find the mean or average delay time. Then, for each delay time, subtract the mean and square the result. Next, find the sum of all the squared results and divide it by the total number of delay times. Finally, take the square root of this value to find the standard deviation.

## 4. What units is standard deviation measured in?

Standard deviation is measured in the same units as the data being analyzed. For example, if the delay times are measured in minutes, then the standard deviation will also be in minutes.

## 5. Can standard deviation be negative?

No, standard deviation cannot be negative. It is a measure of distance from the mean, so it will always be a positive value.

• Electrical Engineering
Replies
4
Views
2K
• Classical Physics
Replies
7
Views
712
• Electrical Engineering
Replies
1
Views
1K
• MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
2K
• Electrical Engineering
Replies
3
Views
2K
• Electrical Engineering
Replies
24
Views
2K
• Electrical Engineering
Replies
14
Views
2K
• Engineering and Comp Sci Homework Help
Replies
5
Views
2K
• Electrical Engineering
Replies
43
Views
5K
• Set Theory, Logic, Probability, Statistics
Replies
1
Views
1K