What is the sum $\sum_{m} e^{i (U_m k + \beta_m)}$ when $U$ and $\beta$ follow different distributions

I have the following function.

$$x(k) = \sum_{m} e^{i (U_m k + \beta_m)}$$

$$i = \sqrt{-1}$$

Here, $$U_m$$ are samples drawn from a Gaussian random distribution.

$$U_m \sim \mathcal{N}(\mu, \sigma)$$ and $$\beta_i$$ are samples drawn from an uniform distribution.

$$\beta_m \sim \mathcal{U}[-\pi, +\pi]$$.

I want to find the distribution of $$x(k)$$ in terms of $$\mu$$ and $$\sigma$$. Will it depend on the number of samples $$m$$ in the sum? And how?

The solution I tried so far:

I used the expected value principles,

First I took the first term in the sum that is

$$\sum_{m} e^{i U_m k} = ( \mathbb{E}[e^{i U}] ) \times ( \mathbb{E[U]} ) N = N \mu e^{-\sigma^2 k^2 /2} e^{i \mu k}$$ where $$N$$ is the number of samples.

The same I did for the second term and it turns out to be $$0$$.

$$\sum_{m} e^{i \beta_i} = ( \mathbb{E}[e^{i \beta}] ) \times ( \mathbb{E[\beta]} ) N = 0$$

The first term suggests that the signal is decaying with $$k \sigma$$ and the second one suggests that the sum should be $$0$$. When I remove the second term from the original numerical sum and plot the function with $$k$$, I see in the simulation that the signal is indeed decaying.

However, when I add the second term, it becomes like a periodic signal. So, it doesn't hold the properties of both analysis I did. I guess I am missing something. The numerical sum I am getting is the expected one I believe as it is periodic and finite as $$k$$ increases.

============ THE SIMULATION ===============================


clear;
close all;

Mu = 7.5 .* 0.4189;
Sigma = 1 .*  0.4189;

Nt = 128;

K = 0:1:Nt-1;

x = zeros(1, Nt);

Nu = 100000;
beta = -pi + 2 * pi .* rand([1 Nu]);

U = normrnd(Mu, Sigma, [1 Nu]);

for m = 1:Nt

x(m) = [sum(exp(1j .* K(m) .* U + 1j .* beta) )];

end

figure; plot(real(x)); hold on; plot(imag(x)); grid on;


The result looks like this:

With respect to $$k$$, this sum is still a periodic signal. I can agree with this because after all, it is a sum of periodic signals.

I have used the number of points in the sum to be $$100000$$. The number of $$k$$ points is $$128$$. How can I interpret this data and find an expression for the distribution of $$x(k)$$ ?

======================= EDIT ===============================

Understanding the function inside the sum:

I deduced the distribution of $$U_m k + \beta_m$$. It looks like the following. It is a convolution of both distributions.

$$p(x) = \int_{0}^{2\pi} \frac{1}{2\pi \sqrt{2 \pi k^2 \sigma^2}} e^{-(kx - k\mu - \tau)/(2k^2\sigma^2)} d\tau$$

$$p(x) = \frac{1}{4\pi} \Big[ \operatorname{erf}\Big(\frac{k\mu-x+2\pi}{\sqrt{2}k\sigma}\Big) - \operatorname{erf}\Big(\frac{k\mu-x}{\sqrt{2}k\sigma}\Big) \Big]$$

I couldn't find something that can say something about the distribution of the cosine and sine of this function; the distribution of $$e^{i (U_m k + \beta_m)}$$

=================== EDIT 2 =========================================

I used the CDF technique to find the distribution of $$\cos((U_m k + \beta_m))$$.

$$F(y) = p(Y \leq y) = p(\cos(X) \leq y) = p(X \leq \cos^{-1}(y))$$

$$F(y) = \int_{-\infty}^{\cos^{-1}(y)} \frac{1}{4\pi} \Big[ \operatorname{erf}\Big(\frac{k\mu-x+2\pi}{\sqrt{2}k\sigma}\Big) - \operatorname{erf}\Big(\frac{k\mu-x}{\sqrt{2}k\sigma}\Big) \Big] dx$$

I have seen that the function inside the integral is $$0$$ at $$-\infty$$ so the expression becomes,

$$F(y) = \frac{\left(k \mu-\cos ^{-1}(y)\right) \text{erf}\left(\frac{k \mu-\cos ^{-1}(y)}{\sqrt{2} k \sigma}\right)+\left(-k \mu+\cos ^{-1}(y)-2 \pi \right) \text{erf}\left(\frac{k \mu-\cos ^{-1}(y)+2 \pi }{\sqrt{2} k \sigma}\right)+\sqrt{\frac{2}{\pi }} k \sigma \left(e^{-\frac{\left(\cos ^{-1}(y)-k \mu\right)^2}{2 k^2 \sigma^2}}-e^{-\frac{\left(k \mu-\cos ^{-1}(y)+2 \pi \right)^2}{2 k^2 \sigma^2}}\right)}{4 \pi }$$

Then I took the derivative in terms of $$y$$ of this expression to find the pdf of $$\cos(x)$$, that is the pdf of $$\cos(U_m k + \beta_m)$$

$$g(y) = \frac{\frac{\text{erf}\left(\frac{k \mu-\cos ^{-1}(y)}{\sqrt{2} k \sigma}\right)}{\sqrt{1-y^2}}-\frac{\text{erf}\left(\frac{k \mu-\cos ^{-1}(y)+2 \pi }{\sqrt{2} k \sigma}\right)}{\sqrt{1-y^2}}+\sqrt{\frac{2}{\pi }} k \sigma \left(\frac{\left(k \mu-\cos ^{-1}(y)+2 \pi \right) e^{-\frac{\left(k \mu-\cos ^{-1}(y)+2 \pi \right)^2}{2 k^2 \sigma^2}}}{k^2 \sigma^2 \sqrt{1-y^2}}+\frac{\left(\cos ^{-1}(y)-k \mu\right) e^{-\frac{\left(\cos ^{-1}(y)-k \mu\right)^2}{2 k^2 \sigma^2}}}{k^2 \sigma^2 \sqrt{1-y^2}}\right)+\frac{\sqrt{\frac{2}{\pi }} \left(k \sigma-\cos ^{-1}(y)\right) e^{-\frac{\left(k \mu-\cos ^{-1}(y)\right)^2}{2 k^2 \sigma^2}}}{k \sigma \sqrt{1-y^2}}+\frac{\sqrt{\frac{2}{\pi }} \left(-k \mu+\cos ^{-1}(y)-2 \pi \right) e^{-\frac{\left(k \mu-\cos ^{-1}(y)+2 \pi \right)^2}{2 k^2 \sigma^2}}}{k \sigma \sqrt{1-y^2}}}{4 \pi }$$

$$-1< y < 1$$

It looks like a cosine inverse distribution. Numerically also the distribution of $$\cos(U_m k + \beta_m)$$ looked like a cosine inverse one.

The $$g(y)$$ can be simplified to:

$$g(y) = \frac{\text{erf}\left(\frac{k \mu-\cos ^{-1}(y)}{\sqrt{2} k \sigma}\right)-\text{erf}\left(\frac{k \mu-\cos ^{-1}(y)+2 \pi }{\sqrt{2} k \sigma}\right)}{4 \pi \sqrt{1-y^2}}$$

Now, how should I approach the sum? The sum (or the moments of the sum when $$k$$ samples are taken for x(k) ) at the end should be a function of $$\mu$$, $$\sigma$$ and $$k$$ and the number of samples $$m$$ ? I do not see the number of samples in the analysis yet as I have not considered the sum. How should I go about it? If I calculate the expectation and the variance of this final expression, I also do not see how to have the variable $$m$$ in it. I just do

$$E[g[y]] = \int_{-1}^{+1} y g(y) dy$$ and $$Var[g[y]] = \int_{-1}^{+1} [y - E[g[y]]]^2 g[y] dy$$

The expressions I found on mathematica are huge for the cosine term.

• You ask an unanswerable question. You can find the distribution of $x(k)$, or you can find some finite number of moments of the distribution of $x(k)$, but because $x(k)$ is a function of random variables, it is, itself, a random variable. Please edit your question so that it's clear that you're looking for something that exists. Jul 26, 2022 at 15:16
• I am updating the question. I also realized that I can only expect a distribution of x(k). Thank you! Jul 26, 2022 at 15:24
• @TimWescott I am new to statistics so my formulation of the problem can be a bit problematic. Is it good now? Jul 26, 2022 at 15:29
• I don't have time for a full treatment right now, but this is really a problem in statistics. Search on "distribution of a function of random variables", then see if you can find the pdf of $e^{i (U_m k + \beta_m)}$. If you know that, then the summation can be dealt with separately. It's not trivial -- I learned the method in a 4th-year statistics course. So if you're new to statistics, don't be discouraged if it's hard to wrap your brain around. Jul 26, 2022 at 16:19
• After a lot of research and and after I did some mathematics, I do have a pdf expression for $U_m k + \beta_m$. However, I didn't find anything that explains how the distribution of cosine or sine of this looks like. I am updating the question with the distribution I found for $U_m k + \beta_m$. Jul 26, 2022 at 17:58

Will it depend on the number of samples m in the sum? And how?

Yes.

If $$m=1$$ you have a complex exponential. The distribution of the magnitude will be $$\delta(1)$$ and the distributions of real and imaginary part will both be that of a sine wave.

If $$m$$ is large you'll end up with a bandpass noise signal. The distribution will depend somewhat on $$\sigma$$. If it's large enough you have a broad band noise signal and the distribution will be Gaussian. The individual exponentials are mostly uncorrelated and the Central Limit Theorem kicks in. So the mean would be $$\mu_x = 0$$ and I'm guessing the standard deviation would be close to $$\sigma_x = \sqrt{m}$$

If $$\sigma$$ is small, you have a narrow band noise signal and the distribution will be somewhere between these two extreme cases.

• Thank you for the answer! Indeed, from the simulations, I see that $\sigma_x$ somewhat in the order of $\sqrt{m}$. However, I want to know how the $\sigma$ affects $\sigma_x$ mathematically. I also had another doubt. In my real example, I may have only a few samples in the $k$ axis for $x(k)$ like only 5 or 10. Is it still good to approximate the distribution of $x$ as normal? Considering that the $m$ at each $k$ instant is super large?. In other words, if I somehow know the distribution of $e^{i (U_m k + \beta_m)}$ and find the expectation and variance of this distribution will it be ok? Jul 26, 2022 at 23:50
• I have posted the distribution I found for $U_m k + \beta_m$ as a function of $k$, $\mu$ and $\sigma$. With the CDF technique, I also found an expression for the distribution of the real and imaginary parts of $e^{i (U_m k + \beta_m)}$. I will update it soon. Jul 26, 2022 at 23:55
• I have edited the question with new expressions and some more questions. Jul 27, 2022 at 13:14