MCMC produces a stream of random numbers for each quantity in the statistical model. A simple way to calculate the median is to store the chain of random numbers in an array sort them and find the value at the half way point of the sorted array. This takes up lots of staorage. Is there a better way? Some sort of trade off between storage and getting an approximate value of the median? Regards Andrew Thomas %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%