Functions (calc avg, std of respiration rates)