Average of Differences: a1-b1, a2-b2, a3-b3, ..., an-bn

brharrii

New member
Joined
Mar 12, 2018
Messages
2
Hi All,

I'm looking for confirmation of something I suspect to be true, but I'm not positive.

I have two arrays of integers. I want to calculate the average variation between the two. Would it be correct to calculate this as the average of array 1 minus the average of array 2? Would that be equivalent to:

Average(a1-b1, a2-b2, a3-b3.... an-bn)

Thank you!
 
Hi All,

I'm looking for confirmation of something I suspect to be true, but I'm not positive.

I have two arrays of integers. I want to calculate the average variation between the two. Would it be correct to calculate this as the average of array 1 minus the average of array 2? Would that be equivalent to:

Average(a1-b1, a2-b2, a3-b3.... an-bn)

Thank you!
Yes

Average(a1-b1, a2-b2, a3-b3.... an-bn)

= [(a1-b1)+(a2-b2)+(a3-b3).... (an-bn)]/n

= [(a1)+(a2)+(a3).... (an)]/n - [(b1)+(b2)+(b3).... (bn)]/n

= Average(a) - Average(b)
 
Top