The Student Room Group

Maths question need help

The question is

Ibrahim has two lists of numbers
The mean of the numbers in the first list is p
The mean of the numbers in the second list is q.


He combines the two lists into one new list of numbers

He says "the mean of the new list of numbers equal to (p+q)/2

Write down 2 conditions must be satisfied for him to be correct?
Reply 1
The 2 sets must have the same number of numbers inside them. Can't think of another condition.
Reply 2
Think of it like this:

A = {p1,...,pn} , (i.e. A is the set p1,...,pn)
B = {q1,...,qm}

We need the mean of the combined sets to be equal to (p+q)/2. That is:

(p1+...+pn + q1+...+qm) / (m+n) = [(p1+...+pn)/n + (q1+...+qm)/m] / 2

where the LHS is the mean of our combined sets, and the RHS is a rewritten version of (p+q)/2.

Making the RHS a single fraction, we get:

(p1+...+pn + q1+...+qm) / (m+n) = [m(p1+...+pn) + n(q1+...+qm)] / (2mn)

You can continue merrily along with some algebraic manipulation until you get:

m(p1+...+pn)(m-n) = n(q1+...+qm)(m-n) ,

which seems quite simple really.
So either m=n (the sizes of the sets are equal), which makes both sides 0 and hence satisfies the equation, or m is not equal to n, which means we can get the equation,

(p1+...+pn)/n = (q1+...+qm)/m

That is, the means of each set are equal.

Why go into detail for so much for results that can quite clearly be figured out with a little intuition you might ask? Well, I didn't think to use intuition, thus I started to write it down. And there was no way I was gonna delete it to do a two-liner after all that! :biggrin: