Skip to content
Prev 246424 / 398502 Next

Cost-benefit/value for money analysis

Graham Smith <myotistwo <at> gmail.com> writes:
Perhaps you can specify your question more precisely, or differently.
The way I interpret it, if there are no interactions in price
(e.g. you get a discount for buying more than one book at a time)
or in value (e.g. you learn more from one book having read another),
then you get the best value/price ratio by taking only the book with
the highest value/price.  (If you take no books at all, your value/price
ratio is undefined.)  The algebra below shows that combining a lower
value/price book with a higher one always lowers your overall value/price
ratio.

  If you redefine your problem, you might find the combn() or
expand.grid() functions, along with various versions of apply(), to
be useful.  If you have too large a search space you might take a look
at the simulated annealing (SANN) option of optim().

===================
if a1/b1 > a2/b2   (1)

and a1, b1, a2, b2 > 0

show

a1/b1 > (a1+a2)/(b1+b2)  (2)

i.e.

a1/b1 - (a1+a2)/(b1+b2) > 0

or 
(a1(b1+b2)-(a1+a2)b1)/(b1+b2) =
  (a1*b2-a2*b1)/(b1+b2) > 0

the numerator is (a1*b2-a2*b1):

  (1) implies that a1*b2>a2*b1
so the numerator is positive

qed