Program to find the mean, median, and mode of numbers
It looks valid to me. Except you are not enforcing the '3 number minimum'. 


You can use x.odd? to check odd or even. 
You can total numbers with [1,2,3].inject(&amp;:+). 
The frequencies.to_a is not needed, as it's already an array after the sort_by. 
You can sort_by -b so you don't have to reverse. 


These are all just refactorings. No change in behaviour.