To compute percentile, you first need to arrange the data given in ascending order.
This is how the data look like once we arrange them in ascending order.
15 23 25 29 31 35 37 42 54
Question 5 - Value of 25th percentile.
n = 9
p = 0.25
n * p = 9 * 0.25 = 2.25.
Since 2.25 isn't an integer, we take the smallest integer greater than 2.25 which is 3. So the 3rd observation in the ordered set is the value we are looking for - 25.
Question 6 - 75th percentile
n * p = 9 * 0.75 = 6.75.
As above, we take the smallest integer greater than 6.75, which is 7. 7th observation is 37.
Question 7
IQR = Q3 - Q1
37 - 25 = 12