# The validity of dividing an average cost by an average duration?

Let's say you wanted to calculate, for example, the average (i.e. mean) cost per day for a hotel to accommodate a tourist. If only aggregate cost data is available, is dividing the average cumulative cost for one person's stay by the average person's duration of stay an acceptable method? Would using the median cost and median duration of stay be better? Worse? The same?

I know the median is less susceptible to outliers than the mean, so if both the median and the mean work the same I'd rather use the median.

$$\frac{\overline C}{\overline D}=\frac{\frac1n\sum_i C_i}{\frac1n\sum_i D_i}=\frac{\sum_i C_i}{\sum_i D_i}.$$