Approximate scalar dot product with a vector's sum

425 Views Asked by At

I have two vectors $u$ and $v$ of size $n$. The $u$ vector is a linear increasing function. For the $v$ vector the individual elements are not known, only its sum. Is it possible to approximate the $u \cdot v$ somehow? I have noticed that in my case $u \cdot v \approx \text{mean}( u) \cdot \sum v$ but it might be coincidence for one case. Is there any theorem about that? or any other better approximation I could do?

1

There are 1 best solutions below

2
On

You are asking for the difference $\sum_{k=1}^n u_k v_k-\frac1n \sum_{k=1}^n u_k \sum_{k=1}^n v_k$, where $u_k=ak+b$ so $\frac1n \sum u_k = b+a \frac{n+1}2$.

This means $$\sum_{k=1}^n u_k v_k-\frac1n \sum_{k=1}^n u_k \sum_{k=1}^n v_k=a\sum_{k=1}^n (k-\frac{n+1}2) v_k= a\sum_{k=1}^n (k-\frac{n+1}2) \left(v_k-\frac1n\sum_{j=1}^n v_j\right).$$

This will for example be small if $v$ is close to its mean for all $k$. Using various inequalities for $\sum a_k b_k$, you can derive estimates such as $$\left|\sum_{k=1}^n u_k v_k-\frac1n \sum_{k=1}^n u_k \sum_{k=1}^n v_k\right|\le |a|\sqrt{\sum_{k=1}^n (k-\frac{n+1}2)^2} \sqrt{\sum_{k=1}^n(v_k-\frac1n\sum_{k=1}^n v_k)^2},$$ which tells you your approximation is good if the variance of $v$ is small.