# What is the minimum number of data points that could have been used to generate this graph?

An agency responsible for investigating and prosecuting residential tenancy offenses initiated 3 prosecutions during the 2016-17 financial period.

This graph shows the percentages of 5 categories of investigations during that period.

Based on the values (32.1%, 24.2%, 19.3%, 14.6%, 9.8%), what is the minimum number of investigations that could have been used as data points to determine those percentages?

The task is to see which minimal integer, when multiplied by those percentages, returns a list of integers, given the precision of your digits.

Quick answer : 1000 points is enough to generate this graph, given the number of digits you have. Simply multiplying all your percentages by 1000 will give you integers.

Remaining task is to see if an integer below 1000 that could work.

EDIT : Corrected answer. You need to go through a loop and proceed to the following steps.

• Multiply those percentages by your integer and round those values (to integers) to check which integers might correspond to these percentages.
• Divide those rounded numbers by your integer to calculate the resulting percentage.
• Compare the resulting percentage and round it to the precision you have and compare it with your expected percentage

In R, you can do it like this.

for (x in 1:1000){
test <- round(c(0.321*x, 0.242*x, 0.193*x, 0.146*x, 0.098*x), 0)
if (all(c(0.321, 0.242, 0.193, 0.146, 0.098) == round(test/x,3))){
print(x)
}
}


This script returns 471, which means that 471 is the minimal integer to satisfy this condition.