Yes, you can compute median.
Note that quantile provides an approximate answer. The fractional error per quantile is epsilon=1/N, so as N increases, the error becomes smaller and the accuracy becomes higher. To achieve certain accuracy with epsilon=Ε, one can compute N=1/Ε quantiles and only use a subset N' of those at regular intervals. For example, to get deciles with only 0.1% error, one should compute 1000-tiles (quantile(1001)) and then use 0th, 100th, 200th, ..., 1000th ranks with the middle value being the median.
- quantile(<expr>, 2) computes min and max with 50% error.
- quantile(<expr>, 3) computes min, median, and max with 33% error.
- quantile(<expr>, 5) computes quartiles with 25% error.
- quantile(<expr>, 11) computes deciles with 10% error.
- quantile(<expr>, 21) computes vingtiles with 5% error.
- quantile(<expr>, 101) computes percentiles with 1% error.
--Michael Sheldon