xcov sample covariance / dividing by N?
조회 수: 4 (최근 30일)
이전 댓글 표시
Dear matlab community,
I looked into using xcov to calculate auto-covariances of a Tx1 time series vector. Using xcov in the first instance, it seemed as if this function would not devide by T as opposed to what the general formula for sample autocovariance would suggest:
?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/452313/image.png)
Can someone confirm whether I need to devide by T to get a vector of sample auto-covariances? If I do not devide by T, the covariances seem to explode, as more and more terms are added. It is also not clear from the documentation of xcov.
Best
Marcel
댓글 수: 0
답변 (1개)
Pratyush Roy
2020년 12월 29일
Hi,
xcov in MATLAB computes raw covariances with no normalization. Hence after obtaining the results, one can divide by T to obtain the results suggested by the formula in the question.
Hope this helps!
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!