# [R] Confidence Intervals for Arbitrary Functions

From: Jeff Newmiller <jdnewmil_at_dcn.davis.ca.us>
Date: Sun 17 Jul 2005 - 03:47:51 EST

I have measurements of physical processes, and mathematical models of those processes that I want to feed the measurements into. A simple case is using measurements of electric power entering and leaving a power conversion device, sampled at regular intervals, and summed to estimate energy in and out, and dividing the energy out by the energy in to get an estimate of efficiency. I know that power efficiency varies with power level, but for this calculation I am interested in the quantifying the "overall" efficiency rather than the instantaneous efficiency.

If the energy quantities are treated as a normally-distributed random variable (per measurement uncertainty), is there a package that simplifies the determination of the probability distribution function for the quotient of these values? Or, in the general sense, if I have a function that computes a measure of interest, are such tools general enough to handle this? (The goal being to determine a confidence interval for the computed quantity.)

As an attempt to understand the issues, I have used SQL to generate discrete sampled normal distributions, and then computed new abscissa values using a function such as division and computing the joint probability as the ordinate, and then re-partitioned the result into new bins using GROUP BY. This is general enough to handle non-normal distributions as well, though I don't know how to quantify the numerical stability/accuracy of this computational procedure. However, this is pretty tedious... it seems like R ought to have some straightforward solution to this problem, but I don't seem to know what search terms to use.

```Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil@dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...