Do you know if there is a library that supports these statistical operations or a way to do it in java?
There are no library methods in java to achieve this. Please read this similar topic
Mean, Median, Mode, Range - Java