Data representation and average calculation