How to quantify asymmetry of a signal?

I'm looking for a suitable measure in order to quantify the asymmetry of a signal. I've read this: Detect signals degree of imbalance and this: How to measure the agreement between to curves? but I can't see how they apply to my case.

So this is the part of the signal that I am interested in: The red line shows the original signal and the black line shows the right part of the signal mirrored about the time=0 axis. What I need to do is find a way to quantify the asymmetry of the red line, i.e. a measure of its difference from the black line.

What I have tried doing is taking the square root of the sum of the squares (SRSS) of the differences of each point. That is:

$$SRSS = \sqrt{\sum\limits_i (y_{black,i} - y_{red,i})^2}$$

Unfortunately, this measure is affected by the number of points that I take for each curve. So for example if the resolution is half, SRSS will decrease even if I'm comparing the same lines.

Is there any other measures of asymmetry that you can suggest? Ideally, they should be a single number and not be affected greatly by the resolution of the lines.

• "Unfortunately, this measure is affected by the number of points that I take for each curve." What if you divide the total by the number of samples in the sum? – pichenettes Apr 29 '14 at 11:47
• You want to measure the skewness; see the link for several measures. – Emre Apr 29 '14 at 22:12

Assuming you're looking for symmetry around $x=0$, you can decompose any function into a symmetric and an antisymmetric part:

$$f(x) = \frac{1}{2}\left(f(x)+f(-x)\right) + \frac{1}{2}\left( f(x) - f(-x) \right)$$

Calling $f_+(x):=\frac{1}{2}\left( f(x) + f(-x) \right)$ and $f_-(x):=\frac{1}{2}\left( f(x) - f(-x) \right)$ you can easily verify that $f_+$ is symmetric while $f_-$ is antisymmetric.

Now you can measure symmetry by taking any suitable norm on your functions. For example the symmetry of $f(x)$ can be measured as

$$S[f]:=\frac{||f_+||}{||f_+||+||f_-||}$$

which ranges from $0$ (fully antisymmetric) to $1$ (fully symmetric).

A possible useful norm on functions is defined as

$$||f|| = \sqrt{\int_\mathbb{R} f(x)^2 dx}$$

which can be discretised to

$$||f|| = \sqrt{ \sum_i f(x_i)^2 \frac{x(i+1)-x(i-1)}{2} }$$

• Thank you. The norm that you have suggested doesn't really work for me as it gives me imaginary values and hence distorts the symmetry measure. I have used this code in MATLAB to implement your suggestion (the commented out part is the norm you have suggested and doesn't work for me). – Mitsarien Apr 30 '14 at 13:08
• MATLAB code of how I implemented @Jazzmaniac 's suggestion f_plus = 0.5 * (f + flip(f)); f_minus = 0.5 * (f - flip(f)); f_plus_norm = 0; f_minus_norm = 0; for k = 2:length(f)-1; f_plus_norm = norm(f_plus); %f_plus_norm + (f_plus(k)^2 * (f_plus(k+1)-f_plus(k-1))*0.5); f_minus_norm = norm(f_minus); %f_minus_norm + (f_minus(k)^2 * (f_minus(k+1)-f_minus(k-1))*0.5); end f_plus_norm = sqrt(f_plus_norm); f_minus_norm = sqrt(f_minus_norm); m = f_plus_norm / (f_plus_norm + f_minus_norm);` – Mitsarien Apr 30 '14 at 13:17
• @Demetris, the norm should always give non-negative (i.e. real) results. I think you have made an error in your implementation: x(i+1)-x(i-1) is not the function value difference but the x-position difference! – Jazzmaniac Apr 30 '14 at 14:49

You could compute the odd part of the signal. If the point of symmetry is the index $n=0$ (as in your example), then the odd part of the signal is

$$y_o(n)=\frac12(y(n)-y(-n))$$

You could use the normalized sum of squares of $y_o(n)$ as a measure of asymmetry:

$$m=\frac{1}{(2N+1)Y^2_0}\sum_{n=-N}^{N}y_o^2(n)$$

where $Y_0=\max\{|y_o(n)|\}$. With this definition the measure $m$ is independent of the number of data points and it is also independent of scaling.