Computing average cost per foot of paved road (In this example some details are changed to avoid revealing customer secrets, but I think for all intents and purposes, the actual problem I'm presenting here is equivalent to the one I'm having.)
I have in mind a particular improvement to a process, but before I propose it I want to be able to measure it's effect. I hope my idea would make it cheaper to construct paved roads in my region. So to start with, I want to find out how expensive it is to construct road today.
I have access to a listing of all roads constructed in the past few years. What I want to do is make a random sample of these roads, then contact the relevant people to find out how many feet were constructed, and at what total cost. From this, I expect to be able to compute an average dollar-cost per foot of road in my region.
This sounds simple enough. Here's my problem: I can think of two ways of doing the computation:

*

*Either I treat the roads themselves as units. Then I would compute dollars/feet for each, and then average together those numbers.

*Alternatively, I treat the feet-of-paved-roads as units. This would result in each sampled road contributes a different number of feet to the average – hypothetically, if there's a really long road that turned out to be very expensive, it would drive up the average compared to the previous method.

Either way, from what I can tell, each foot of road has an equal opportunity to end up in the sample. So the decision is mainly "do I count average foot-cost per road, or average cost per foot of road?"
On this, I have two questions:

*

*Which of these two approaches give the most correct result? I honestly cannot tell you if "foot-cost per road" or "cost per foot of road" is the more meaningful measurement. What am I missing?


*If the most meaningful measurement is "cost per foot of road" then the computation effectively becomes, for the entire sample, sum(dollars)/sum(feet) – how do I get the variance of this statistic?
Sorry if this sounds basic. I know I should know this stuff, but for some reason it escapes me and I haven't been able to figure it out the past few days. I've been looking both into Cochran's Sampling Techniques and Levy's Sampling of Populations – I know both books come close to this specific question, but they never linger on it and go deeper into it.
I'll continue my research into the sampling literature I have at home, but in the meantime if any of you happen to know the answers – please share!

I'm aware stratifying the sample would allow me to treat very long roads separately in case they practically make up a separate population cost-wise, but that ends up being the same problem: do I weigh the strata by number of roads in each, or by the total length of road in each?

First, notation. Suppose there are $N$ total roads constructed in the region, each with road length $x_i$ feet, total cost $y_i$, and cost per foot $r_i = y_i/x_i$. Let the population averages be $\mu_r = \frac{1}{N}\sum r_i$, similarly for $\mu_y$ and $\mu_x$, the total length of all roads $T_x = \sum x_i$, total cost $T_y = \sum y_i$, and the overall cost per foot $R = T_y/T_x$ ($= \mu_y/\mu_x$). We sample $n$ of these roads. $r$ will be an estimate of $R$.
For question 1, You correctly notice that the average of the costs per foot is not the same as the overall ratio, $\mu_r \ne R$. This is not an issue of one being "correct" and the other being "wrong", both are perfectly well defined values that are useful in different scenarios. Different use cases and objectives will care more about one than the other, so subject matter experience is essential here.  A lower value of $\mu_r$ indicates that most projects had lower costs, while a lower value of $R$ indicates that the region's overall costs were lower.
Personally, I think $R$ is generally more useful/applicable, but it's possible to imagine situations where either would be desirable. For example, the region's financial manager cares about the total budget spent on roads, but is willing to pay higher expenses on many small projects to save on a large highway. Or conversely, a group of landowners care about the costs on their small individual projects, but don't care about the region's total spending.
For question 2, I'll dump the formulas for Ratio Estimation from Elementary Survey Sampling, Scheaffer, Mendenhall, Ott, and Gerow, 2012, section 6.3. These formulas assume simple random sampling. The estimate of $R$ is $r$,
$$
r = \frac{\sum_{i=1}^{n}y_i}{\sum_{i=1}^{n}x_i} = \frac{\bar{y}}{\bar{x}}\\
\hat{V}[r] = \left(1- \frac{n}{N}\right)\frac{1}{\mu_x^2}\frac{s_r^2}{n} \\
s_r^2 = \frac{1}{n-1}\sum_{i=1}^{n}(y_i - r x_i)^2
$$
$\mu_x$ can be replaced by $\bar{x}$ if it's unknown, but Scheaffer et al recommend that it should be known as accurately as possible. (cv($\bar{x}$) = SD($\bar{x}$)/$\mu_x$ should be less than 0.1) An approximate 95% confidence interval for $R$ can be constructed as $r \pm 1.96*\sqrt{\hat{V}[r]}$.
A few closing thoughts, note that $r$ is a biased estimate of $R$ and the above confidence interval sometimes performs poorly. Various corrections are available, but they get more complicated. You can read more by searching for "Ratio Estimation". You will need to pay attention between resources for estimating the population ratio $R$ and estimating the population total, $T_y$, which is also commonly done with ratio estimates. The wikipedia article seems like a solid place to start.
