Please consider adding functions: Mean absolute deviation Median absolute deviation The scbi_math gem does this as a wrapper around narray.