How can you deduce data values from summary statistics? 
Here is a list of ten data values that are sorted from smallest to
largest, but five of the data values are missing.  The missing values
are represented by A, B, C, D, and E. 2     A     3     B     6     C
9     D     15     E
Using the statistics below, find the missing values for the data set.
Mean = 8     Median = 6.5     Mode = 2     Range = 16     IQR = 10
Hint:  You should not start by using the mean; save that for the end.

I know some rules, they do not seem to help me at all.  for example, I know that the IQR is the difference between the lowest and the largest numbers.
The median is the middle value (or difference between them if you have an even set of numbers).  In that case, I was able to determine that C = 7.  I can't understand how to derive the remaining missing numbers.
 A: Using R might help check a solution, but it doesn't help you benefit much from this question.
Let's find a solution systematically by exploiting the definitions.  Then we can use R to check it if we like.
The ten numbers, in order, are $2, A, 3, B, 6, C, 9, D, 15, E.$

*

*The median of ten numbers is conventionally the midpoint between the fifth highest ($C$) and fifth lowest ($6$), telling us $6.5 = (C + 6)/2,$ whence $C = 7.$  The batch of data now is known to be $$2, A, 3, B, 6, 7, 9, D, 15, E.$$


*That the mode is $2$ implies $A=2$ and that $B,C,D,$ and $E$ are distinct and differ from $3,6,9,15.$  The batch is $$2, 2, 3, B, 6, 7, 9, D, 15, E.$$
(Alternatively, A could be some number strictly between $2$ and $3,$ in which case all ten numbers must be distinct and all are modes.  This is one indication of why modes are not terribly useful descriptions of small datasets.)


*The range is the spread between the largest $E$ and smallest $2,$ telling us $16 = E - 2.$  The batch must be $$2, 2, 3, B, 6, 7, 9, D, 15, 18.$$


*The IQR has many definitions.  One is that the median has split the ten numbers into the lower half, $2,2,3,B,6,$ and the upper half, $7,9,D,15,18;$ and the quartiles are their middle values $3$ and $D.$  Assuming the IQR is the difference of these particular quartiles, we have learned $10 = D - 3,$ making the batch $$2,2,3,B,6,7,9,13,15,18.$$


*Finally, ten times the mean is the sum of all the values, whence $10(8) = 2+2+3+B+6+7+9+13+15+18 = B + 75.$  Solving for $B$ determines the batch as $$2,2,3,5,6,7,9,13,15,18.$$
If we adopt the more expansive interpretation of mode, the second $2$ in the batch can be some number $2+\alpha$ where $0\le \alpha\lt 1.$  (Anything else outside this interval would destroy the ordering of the values.)  Looking back, it appears this would not affect our subsequent deductions based on the range and the IQR.  It would cause $B$ to be reduced by $\alpha,$ leading to the (infinitely many) solutions $$2,2+\alpha,3,5-\alpha,6,7,9,13,15,18$$ (all of which are valid because the numbers remain ordered and distinct).
Alternative quartile definitions can lead to different solutions, too.  For instance, the default settings in the quantile and IQR functions in R both tell us the IQR of this solution is $8.5,$ not $8.$  If we were to use this convention, a solution would be $$2,2,3,3.5,6,7,9,14.5,15,18.$$
Here is a check of the latter solution in R.
a <- 0                                         # Can be in the interval [0, 1/2)
x <- c(2,2+4*a/3,3,3.5-a,6,7,9,14.5-a/3,15,18) # A possible solution to test
setNames(sapply(list(mean, median, \(x) names(which.max(table(x))), 
                     \(x) diff(range(x)), IQR, \(x) all (x == sort(x))), function(f) f(x)),
         c("Mean", "Median", "Mode", "Range", "IQR", "Sorted?"))

The output is
   Mean  Median    Mode   Range     IQR Sorted? 
    "8"   "6.5"     "2"    "16"    "10"  "TRUE"

A: I was able to determine the missing values of A-E through the process of elimination and formula substitution.  The first value that I tackled was the missing letter E value, which was derived by taking the difference between the Max (18) and the Min Value, which gave the range of the curve: 16.  the next letter was Calculating the Median, then the mode, etc.  then, I used R to generate the proof...
getmode <- function(v) {
  uniqv <- unique(v)
  uniqv[which.max(tabulate(match(v, uniqv)))]
}

getrange <- function(x){
  max(x) - min(x)
}

total <- c(2,     2,     3,     5,     6,     7,     9,     13,     15,     18)
q1 <- total[3]
q3 <- total[8]
getrange(total)
median(total)
mean(total)
getmode(total)
q3-q1
summary(total)

# + 2 ------

total <- c(total+2)
q1 <- total[3]
q3 <- total[8]
getrange(total)
median(total)
mean(total)
getmode(total)
q3-q1
summary(total)

# * 2 -----

total <- c(total*2)
q1 <- total[3]
q3 <- total[8]
getrange(total)
median(total)
mean(total)
getmode(total)
q3-q1
summary(total)

