I am working on a problem where we have a noisy measured signal, which is stored as an $N$-dimensional vector $\mathbf{Y},$ and a set of $n\_s$ simulated noise-free signals $\{\mathbf{X}\_i\}\_{i=1}^{n\_s}.$ Our goal is to identify which of the simulated signals $\mathbf{X}\_i$ best matches $\mathbf{Y},$ which we define as the simulated signal with the highest normalized dot product $\mathbf{Y}$:

$$\rho\_i = \frac{\mathbf{Y} \cdot \mathbf{X}\_i}{\|\mathbf{Y}\| \|\mathbf{X}\|}$$

where $\rho\_i$ is sometimes called the cosine similarity score, and is constrained to have values between $-1$ and $1.$ The question I want to ask is: if each element of $\mathbf{Y}$ has a Gaussian distribution with standard deviation $\sigma$, then is there an analytical expression for the distribution of $\rho\_i?$ Specifically, I would like to be able to get expressions for the mean and variance of $\rho\_i.$

To simplify the investigation, I am considering a situation where we have a single noise free signal $\mathbf{X}$, and a noise-corrupted version of this: $\mathbf{Y}=\mathbf{X} + \boldsymbol{\eta}$, where each element of $\boldsymbol{\eta}$, $\eta\_j \sim \mathcal{N}(0,\sigma)$ (all elements of $\boldsymbol{\eta}$ have the same standard deviation). Clearly the un-normalized dot product $\mathbf{Y} \cdot \mathbf{X}$ should follow a normal distribution, but as soon as I start including the normalization terms it becomes much more complicated, and I am really not sure how to proceed.

I have looked to see if anybody has posted any similar questions, [and this was the closest I could find](https://stats.stackexchange.com/questions/93723/cosine-similarity-between-a-clean-signal-and-its-noisy-version). However, while this question also concerns the distribution of the cosine similarity score, they appear to consider a rather special case where $\mathbf{X}$ has only one non-zero element, and furthermore it appears that the question was never completely answered.

**Numerical simulations**

In order to empirically check what the PDFs should look like, I have done a computer simulation where I take a noise-free signal and generate $10,\!000$ noise realizations of that signal (by adding Gaussian noise) and look at the histograms of the normalized dot product values between each noisy signal and the noiseless signal. In the histogram below I repeated this for three different noise levels. As one might expect, at higher noise levels the expected value of $\rho$ is reduced, while the variance increases. The distributions do look somewhat symmetrical, so it may be possible to approximate them as Gaussian under certain circumstances.

[![Empirical distribution of the normalized dot product between a noisy and noise-free version of the same signal, with three different noise levels. At each noise level I generated <span class=](https://i.stack.imgur.com/83ozb.png)$10,\!000$ noise realizations and computed the normalized dot product between each noisy signal and the noise free signal" />](https://i.stack.imgur.com/83ozb.png)