How is the auto-correlation of vectors defined?
up vote
2
down vote
favorite
Suppose $v$ is an $n$-ary vector with entries from the set ${0,1}$ (i.e. a vector of ones and zeros).
A paper I am reading defines the "auto-correlation sequences" $$v*v$$ where $*$ denotes the correlation operator.
1) What is an auto-correlation sequence of a vector?
2) What is the correlation operator? (I'm assuming it can be applied to two distinct vectors too)
My first guess was that to auto-correlate a vector you try all the possible rotational permutations of the vector and measure the cosine of the angle between each permuted vector with the original. However, Mathematica's CorrelationFunction on ${1,0}$ with $lag=0$ returns 1 and with $lag=1$ returns $-frac{1}{2}$, which shoots down my theory since I would expect orthogonal vectors to have $0$ correlation. So what is Mathematica doing here?
linear-algebra statistics correlation
add a comment |
up vote
2
down vote
favorite
Suppose $v$ is an $n$-ary vector with entries from the set ${0,1}$ (i.e. a vector of ones and zeros).
A paper I am reading defines the "auto-correlation sequences" $$v*v$$ where $*$ denotes the correlation operator.
1) What is an auto-correlation sequence of a vector?
2) What is the correlation operator? (I'm assuming it can be applied to two distinct vectors too)
My first guess was that to auto-correlate a vector you try all the possible rotational permutations of the vector and measure the cosine of the angle between each permuted vector with the original. However, Mathematica's CorrelationFunction on ${1,0}$ with $lag=0$ returns 1 and with $lag=1$ returns $-frac{1}{2}$, which shoots down my theory since I would expect orthogonal vectors to have $0$ correlation. So what is Mathematica doing here?
linear-algebra statistics correlation
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
Suppose $v$ is an $n$-ary vector with entries from the set ${0,1}$ (i.e. a vector of ones and zeros).
A paper I am reading defines the "auto-correlation sequences" $$v*v$$ where $*$ denotes the correlation operator.
1) What is an auto-correlation sequence of a vector?
2) What is the correlation operator? (I'm assuming it can be applied to two distinct vectors too)
My first guess was that to auto-correlate a vector you try all the possible rotational permutations of the vector and measure the cosine of the angle between each permuted vector with the original. However, Mathematica's CorrelationFunction on ${1,0}$ with $lag=0$ returns 1 and with $lag=1$ returns $-frac{1}{2}$, which shoots down my theory since I would expect orthogonal vectors to have $0$ correlation. So what is Mathematica doing here?
linear-algebra statistics correlation
Suppose $v$ is an $n$-ary vector with entries from the set ${0,1}$ (i.e. a vector of ones and zeros).
A paper I am reading defines the "auto-correlation sequences" $$v*v$$ where $*$ denotes the correlation operator.
1) What is an auto-correlation sequence of a vector?
2) What is the correlation operator? (I'm assuming it can be applied to two distinct vectors too)
My first guess was that to auto-correlate a vector you try all the possible rotational permutations of the vector and measure the cosine of the angle between each permuted vector with the original. However, Mathematica's CorrelationFunction on ${1,0}$ with $lag=0$ returns 1 and with $lag=1$ returns $-frac{1}{2}$, which shoots down my theory since I would expect orthogonal vectors to have $0$ correlation. So what is Mathematica doing here?
linear-algebra statistics correlation
linear-algebra statistics correlation
asked Nov 15 at 16:10
Craig
621314
621314
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
3
down vote
accepted
The sample correlation of vectors $(X_1, dots, X_n)$ and
$(Y_1, dots, Y_n)$ is
$$rho_{(X,Y)} = frac{frac{1}{n-1}sum_{i=1}^n (X_i - bar X)(Y_i - bar Y) }{S_XS_Y},$$
where $bar X, bar Y$ are the respective sample means and $S_XS_Y$ are the respective sample standard deviations.
Roughly speaking, the sample autocorrelation of lag $ell$ of a vector $(X_1, dots X_n)$ is the sample correlation of the
vector $(X_1, dots, X_{n-ell})$ and and the lagged vector
$(X_ell, X_{ell + 1}, dots, X_n).$
Various refinements are used in specific applications.
Perhaps the one you are looking for is of the following
form:
$$rho_ell = frac{sum_{i=1}^{n-ell} (X_1 - bar X)(X_ell - bar X) }{(n-1)S_X^2},$$
Notice that $bar X$ and $S_X^2$ are based on the
entire sequence. Also, when $ell=0,$ we have $rho_ell = 1.$
See Wikipedia
at the last bullet under Estimation.
As I recall, this is used in the R function acf
:
set.seed(1115)
x = round(rnorm(10,200,15))-20*(1:10); x
[1] 176 169 127 99 96 92 45 70 10 12
acf(x)
acf(x, plot=F)
Autocorrelations of series ‘x’, by lag
0 1 2 3 4 5 6 7 8 9
1.000 0.625 0.299 0.138 -0.060 -0.177 -0.304 -0.363 -0.434 -0.223
Thanks! Very clear and concise.
– Craig
Nov 16 at 14:43
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
The sample correlation of vectors $(X_1, dots, X_n)$ and
$(Y_1, dots, Y_n)$ is
$$rho_{(X,Y)} = frac{frac{1}{n-1}sum_{i=1}^n (X_i - bar X)(Y_i - bar Y) }{S_XS_Y},$$
where $bar X, bar Y$ are the respective sample means and $S_XS_Y$ are the respective sample standard deviations.
Roughly speaking, the sample autocorrelation of lag $ell$ of a vector $(X_1, dots X_n)$ is the sample correlation of the
vector $(X_1, dots, X_{n-ell})$ and and the lagged vector
$(X_ell, X_{ell + 1}, dots, X_n).$
Various refinements are used in specific applications.
Perhaps the one you are looking for is of the following
form:
$$rho_ell = frac{sum_{i=1}^{n-ell} (X_1 - bar X)(X_ell - bar X) }{(n-1)S_X^2},$$
Notice that $bar X$ and $S_X^2$ are based on the
entire sequence. Also, when $ell=0,$ we have $rho_ell = 1.$
See Wikipedia
at the last bullet under Estimation.
As I recall, this is used in the R function acf
:
set.seed(1115)
x = round(rnorm(10,200,15))-20*(1:10); x
[1] 176 169 127 99 96 92 45 70 10 12
acf(x)
acf(x, plot=F)
Autocorrelations of series ‘x’, by lag
0 1 2 3 4 5 6 7 8 9
1.000 0.625 0.299 0.138 -0.060 -0.177 -0.304 -0.363 -0.434 -0.223
Thanks! Very clear and concise.
– Craig
Nov 16 at 14:43
add a comment |
up vote
3
down vote
accepted
The sample correlation of vectors $(X_1, dots, X_n)$ and
$(Y_1, dots, Y_n)$ is
$$rho_{(X,Y)} = frac{frac{1}{n-1}sum_{i=1}^n (X_i - bar X)(Y_i - bar Y) }{S_XS_Y},$$
where $bar X, bar Y$ are the respective sample means and $S_XS_Y$ are the respective sample standard deviations.
Roughly speaking, the sample autocorrelation of lag $ell$ of a vector $(X_1, dots X_n)$ is the sample correlation of the
vector $(X_1, dots, X_{n-ell})$ and and the lagged vector
$(X_ell, X_{ell + 1}, dots, X_n).$
Various refinements are used in specific applications.
Perhaps the one you are looking for is of the following
form:
$$rho_ell = frac{sum_{i=1}^{n-ell} (X_1 - bar X)(X_ell - bar X) }{(n-1)S_X^2},$$
Notice that $bar X$ and $S_X^2$ are based on the
entire sequence. Also, when $ell=0,$ we have $rho_ell = 1.$
See Wikipedia
at the last bullet under Estimation.
As I recall, this is used in the R function acf
:
set.seed(1115)
x = round(rnorm(10,200,15))-20*(1:10); x
[1] 176 169 127 99 96 92 45 70 10 12
acf(x)
acf(x, plot=F)
Autocorrelations of series ‘x’, by lag
0 1 2 3 4 5 6 7 8 9
1.000 0.625 0.299 0.138 -0.060 -0.177 -0.304 -0.363 -0.434 -0.223
Thanks! Very clear and concise.
– Craig
Nov 16 at 14:43
add a comment |
up vote
3
down vote
accepted
up vote
3
down vote
accepted
The sample correlation of vectors $(X_1, dots, X_n)$ and
$(Y_1, dots, Y_n)$ is
$$rho_{(X,Y)} = frac{frac{1}{n-1}sum_{i=1}^n (X_i - bar X)(Y_i - bar Y) }{S_XS_Y},$$
where $bar X, bar Y$ are the respective sample means and $S_XS_Y$ are the respective sample standard deviations.
Roughly speaking, the sample autocorrelation of lag $ell$ of a vector $(X_1, dots X_n)$ is the sample correlation of the
vector $(X_1, dots, X_{n-ell})$ and and the lagged vector
$(X_ell, X_{ell + 1}, dots, X_n).$
Various refinements are used in specific applications.
Perhaps the one you are looking for is of the following
form:
$$rho_ell = frac{sum_{i=1}^{n-ell} (X_1 - bar X)(X_ell - bar X) }{(n-1)S_X^2},$$
Notice that $bar X$ and $S_X^2$ are based on the
entire sequence. Also, when $ell=0,$ we have $rho_ell = 1.$
See Wikipedia
at the last bullet under Estimation.
As I recall, this is used in the R function acf
:
set.seed(1115)
x = round(rnorm(10,200,15))-20*(1:10); x
[1] 176 169 127 99 96 92 45 70 10 12
acf(x)
acf(x, plot=F)
Autocorrelations of series ‘x’, by lag
0 1 2 3 4 5 6 7 8 9
1.000 0.625 0.299 0.138 -0.060 -0.177 -0.304 -0.363 -0.434 -0.223
The sample correlation of vectors $(X_1, dots, X_n)$ and
$(Y_1, dots, Y_n)$ is
$$rho_{(X,Y)} = frac{frac{1}{n-1}sum_{i=1}^n (X_i - bar X)(Y_i - bar Y) }{S_XS_Y},$$
where $bar X, bar Y$ are the respective sample means and $S_XS_Y$ are the respective sample standard deviations.
Roughly speaking, the sample autocorrelation of lag $ell$ of a vector $(X_1, dots X_n)$ is the sample correlation of the
vector $(X_1, dots, X_{n-ell})$ and and the lagged vector
$(X_ell, X_{ell + 1}, dots, X_n).$
Various refinements are used in specific applications.
Perhaps the one you are looking for is of the following
form:
$$rho_ell = frac{sum_{i=1}^{n-ell} (X_1 - bar X)(X_ell - bar X) }{(n-1)S_X^2},$$
Notice that $bar X$ and $S_X^2$ are based on the
entire sequence. Also, when $ell=0,$ we have $rho_ell = 1.$
See Wikipedia
at the last bullet under Estimation.
As I recall, this is used in the R function acf
:
set.seed(1115)
x = round(rnorm(10,200,15))-20*(1:10); x
[1] 176 169 127 99 96 92 45 70 10 12
acf(x)
acf(x, plot=F)
Autocorrelations of series ‘x’, by lag
0 1 2 3 4 5 6 7 8 9
1.000 0.625 0.299 0.138 -0.060 -0.177 -0.304 -0.363 -0.434 -0.223
edited Nov 16 at 6:14
answered Nov 16 at 5:51
BruceET
34.8k71440
34.8k71440
Thanks! Very clear and concise.
– Craig
Nov 16 at 14:43
add a comment |
Thanks! Very clear and concise.
– Craig
Nov 16 at 14:43
Thanks! Very clear and concise.
– Craig
Nov 16 at 14:43
Thanks! Very clear and concise.
– Craig
Nov 16 at 14:43
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2999886%2fhow-is-the-auto-correlation-of-vectors-defined%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown