WOLFRAM|DEMONSTRATIONS PROJECT

Correlation and Covariance of Random Discrete Signals

​
signal elements
random seed for x
random seed for y
plot
lines
points
x

{1,7,7,1,8}
y

{8,2,1,6,7}
x

1
N
N
∑
i=1
x
i

4.8000
y

1
N
N
∑
i=1
y
i

4.8000
xy

1
N
N
∑
i=1
x
i
y
i

18.2000

σ
x

1
N-1
N
∑
i=1
2
(
x
i
-
x
)

3.4928

σ
y

1
N-1
N
∑
i=1
2
(
y
i
-
y
)

3.1145

σ
xy

1
N-1
N
∑
i=1
(
x
i
-
x
)(
y
i
-
y
)

-6.0500

ρ


σ
xy

σ
x

σ
y

-0.5561
Correlation and covariance can be used to analyze the relationship between signals. They can give information on the characteristics of a system and how it behaves.
The expected value of a random variable
Z
is given by
E[Z]
and estimated by
z
, the average of a sampling of values
{
z
1
,
z
2
,…,
z
n
}
of
Z
. The standard deviation of
Z
is given by
σ
z
=
E
2
(Z-E[Z])

and estimated by the sample standard deviation of
{
z
1
,
z
2
,…,
z
n
}
.
The covariance
σ
xy
is a measure of the deviation between two sets of random variables.
The correlation
ρ
is the degree to which two sets of random variables depend upon each other.
Sample estimates of standard deviations, covariances, and correlations are denoted with hats (^).