Is it possible to calculate median value and interquatile range for a set of numbers containing a range or inequalities? I am trying to make simple median and IQR calculations that involve numbers (in  percentages) appearing in a range and inequalities in addition to whole numbers. My sample dataset looks like this:
5, 10, < 1, 10 - 20, 25, > 90
Any suggestions on how I can perform these two calculations on such a dataset?

If you can order the levels of the observations, you can determine the median, and the 1st quartile and 3rd quartile.

*

*In your sample data, the observations could be ordered, with the exception that you have to decide if "10 - 20" is greater then "10", or if they would have the same rank when ranked.


*IRQ itself, as the difference between the 1st and 3rd quartile, wouldn't necessarily make sense.


*There are different methods to determine the value of quantiles.  For example, R has 9 options ( www.rdocumentation.org/packages/stats/versions/3.6.2/topics/quantile ).  Some are more appropriate for non-continuous data.


*With discontinuous data, you may get answers that are e.g. "Between 'good' and 'very good'.  In your sample data, the median would be between "10" and "10 - 20", assuming those are two different when ranked.


*The following can be run in R (or at e.g. rdrr.io/snippets/ ).  This assumes that "10 - 20" is greater than "10".  And uses R quantile type 1, which will not return answers that straddle two levels.
.
Observed = c("5", "10", "< 1", "10 - 20", "25", "> 90")

Obs.factor = factor(Observed,
                    ordered = TRUE,
                    levels = c("< 1", "5", "10","10 - 20", "25", "> 90") )

quantile (Obs.factor, type=1, probs=0.50)

quantile (Obs.factor, type=1, probs=0.25)

quantile (Obs.factor, type=1, probs=0.75)

