Consider variables $y$, $A$ and $B$ and the following relationship between them:
$$y = A + B.$$
$A$ has a uniform distribution between $[0,K]$. Distribution of $B$ is unknown, but $B$ is a random number and is not constant with $B > A$. It is also OK to assume that $B \gg A$ if that helps.
Let us say that there is a generator that generates values of $y$.
Given $N$ such samples of $y$ values, I want to calculate the following:
The mean value of $B$'s distribution (For example, if $B$ was also a uniform random number with distribution $[0,L]$, the answer will be $L/2$. But the challenge is that we don't know $B$'s distribution).
The contribution of $B$ to the value of $y$ in those $N$ samples. Approximate contribution is fine. So in each value of $y$ in the $N$ samples, how much part came from $B$.
Are there any heuristics/approximations to solve the following problem? Or any standard method?