First add up the numbers in the ratio, and you will get a total of nine, divide 27 by nine and you end up with three. This means that each part of the ratio is worth three, so when multiplied out there would be six balls in the first group, nine in the second, and twelve in the third.