Added ratio estimation function