Once or twice a year, we go through an elaborate and expensive process to measure leakage in a pipe. We calculate leakage via mass balance, so that:

\begin{equation} Leak = X + Y - Z \end{equation}

Depending on how well data was collected for each variable, we select particular assumptions. For example, we might assume Z to be uniformly distributed, while X & Y are normally distributed.

The end goal is to calculate the confidence interval of the estimated leak.

After calculating $\hat{\mu}$ and $\hat{\sigma}$ for each variable, it's tempting to assume that $Leak$ is normally distributed, just because deriving the confidence interval is straight forward. I just need to calculate $t_{\alpha/2}$, and define the confidence interval as $\mu_{Leak} \pm t_{\alpha/2}\hat{\sigma}_{Leak}$. But this a pretty bad assumption, as $Leak$ is not normally distributed because $Z$ is uniformly distributed. Any clues on how to calculate this confidence interval?


I used simulation, as @soakey suggested, to generate 10k-sized samples for each historical event, and calculating the confidence interval was a matter of calculating the $(\alpha/2)^{th}$ and the $(1-\alpha/2)^{th}$ percentiles.

  • $\begingroup$ Is there anything preventing you from simulating? $\endgroup$
    – soakley
    Nov 18, 2013 at 21:39
  • 1
    $\begingroup$ Re (1): It is impossible for a uniform variate and a normal variate to have a correlation of $1$. $\endgroup$
    – whuber
    Nov 18, 2013 at 21:42
  • $\begingroup$ Thanks for your comment @whuber. You made me realize a flaw in my analysis. I thought Y and Z should have been correlated because if we close the valve affecting Y, flow will change proportionally in Z. But this is a mistake, because one of the conditions for my measurement is that no changes should be done to the state of system during data collection. I think I can safely consider them independent. $\endgroup$
    – JAponte
    Nov 18, 2013 at 23:14
  • $\begingroup$ @soakey, thanks for the idea! I can probably just simulate the three variables jointly and estimate the pdf. I will give it a try. $\endgroup$
    – JAponte
    Nov 18, 2013 at 23:18
  • $\begingroup$ You should modify your question to reflect your new understanding. [Note for future reference, however, that 'what doesn't go through Z must go through Y' would tend to imply negative, not positive correlation -- since the statement implies they must add to a constant, the present flow] $\endgroup$
    – Glen_b
    Nov 19, 2013 at 1:05


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.