## Distribution of sliding correlation

### Remember to vote up questions/answers you find interesting or helpful (requires 15 reputation points)

1. Suppose $w$ is a vector containing $L$ i.i.d. normally distributed samples.
2. Suppose $v$ is a vector containing $N < L$ i.i.d. normally distributed samples.
3. Suppose the elements of $w$ and $v$ are independent.

The correlation between $w$ and $v$ is now calculated using a sliding correlator (the shorter vector $v$ is slid across the larger vector $w$) using

$R(j) = \sum_{n=1}^{N} v_n w_{n+j}$

Question

What is the mean and variance of the correlation $R$ in terms of the means and variances of $w$ and $v$? (Experimental results indicate that $R$ also has a normal distribution.)

Simpler case

In the case where $v$ and $w$ have equal lengths ($L=N$) and the correlation is calculated using the inner (dot) product (no sliding) $P = \sum_{n=1}^N v_n w_n$, it can easily be shown that $P$ is normally distributed with mean

$\mu_P=\mu_v \mu_w$

and variance

$\sigma_P^2 = \sigma_v^2 \sigma_w^2 + \sigma_v^2\mu_w^2+\sigma_w^2\mu_v^2$

due to independence.

The sliding correlator however introduces correlation between the samples of $R$ and the above expressions for mean and variance no longer hold. How does one go about expressing the statistics for $R$?

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 24, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9210484027862549, "perplexity_flag": "head"}