We have a model relationship between three random variables like this:
$$ U = C + S $$
I have a ton of measurements of realizations of $U$, as well as a ton of realizations of $C$. But the interesting thing is the density of $S$. The measurements are not paired, so I can not take the differences $U-C$.
One solution we tried was called deconvolution, which does exactly what we want, i.e. extract the density of a "noise" variable $S$. This approach brought us fine results. Alternatively, we wanted to try a parametric approach, specifically the method of moments.
My first question: Is the following algorithm correct, assuming gamma distributed $U$, $C$ and $S$? This should exactly reflect the method of moments, if I understood it correctly:
- Fit a gamma distribution to $U$ and $C$, and store the parameters $k_U$, $k_C$, $\theta_U$ and $\theta_C$, using the wikipedia notation.
- Compute the expected value and variance of $U$ and $C$, using $\mu = k\theta$ and $\sigma^2 = k\theta^2$. Denote them as $\mu_U$, $\sigma^2_U$, $\mu_C$ and $\sigma^2_C$.
- Assuming independence, compute $\mu_S = \mu_U - \mu_C$ and $\sigma^2_S = \sigma^2_U - \sigma^2_C$.
- Solve the equation system $\mu_S=k_S\theta_S$ and $\sigma_S^2 = k_S\theta_S^2$ for $\mu_S$ and $\theta_S$.
Then I have the two parameters, and thus the gamma density of $S$.
But the kernel density estimates of $U$ and $C$ are very different from the fitted gamma densities. So, I'd like to try this approach with Weibull distribution assumptions.
This leads to my second question: How would I proceed when I assume Weibull distributed $U$, $C$ and $S$? The formula for the mean and variance look very ugly over at Wikipedia. Are there analytical solutions or do I have to go R and do some numerical optimizing there?
Finally, if you are still there, my third question: Deconvolution fails as soon as $C$ and $S$ are correlated. With the method of moments, I think I can just see how the distribution of $S$ would change by assuming a correlation of, say, 0.5. I would do this by altering only the step 3. in my first question, and computing $\sigma^2_S = \sigma^2_U - \sigma^2_C - 2 Cov(U,C)$. Is that a valid approach?