Can grouped data be discrete? Context
A frequency distribution is shown below
Class interval | 1-20 | 21-40 | 41-60|
frequency      |  5   |  10   |   9  |
Use interpolation to find an estimate for the interquartile range.
My Working
In order to answer this question I must first calculate the upper and lower quartiles.
In order to do that, I need to know if the data is continuous or discrete (formula for $Q_1,Q_2,Q_3$).
Question
How can I tell if the data is discrete or continuous since the only information provided is 'Class interval' ?
Therefore I am asking whether it is possible for grouped data to be discrete - or is it always continuous?
REF: Statistics and Mechanics AS book
 A: This is an attempt to find the IQR by simulation instead of
interpolation. So I am not saying I got the same answer you're
expected to get.
I simulated a million datasets with integer values at random, but
so that each dataset has the same intervals and frequencies as in your table.
I used R to apply its definition of quartiles (hence of IQRs) to find the
IQR of each of the million datasets, and averaged the million answers.
As you can see, I got IQR = 23.3. Maybe your answer from interpolation will be nearly the same.
set.seed(2020)
iqr = replicate(10^6, IQR(c(sample( 1:20,  5, rep=T),
                            sample(21:40, 10, rep=T),
                            sample(41:60,  9, rep=T))) )
mean(iqr)
[1] 23.31511


The first sample of the million:
set.seed(2020)
x = c(sample( 1:20,  5, rep=T),
      sample(21:40, 10, rep=T),
      sample(41:60,  9, rep=T))
x
 [1] 13  8 13 10  3 22 23 28 21 33 36 35 37 29 29
[16] 51 60 54 51 46 44 42 57 59

summary(x)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
   3.00   21.75   34.00   33.50   47.25   60.00 

IQR(x)
[1] 25.5

