I understand the reasoning and the explanation by Greg in the Data dedicated session 2, but can someone explain algebraically as well as with numbers as how we can get average equal to 26000?

Let’s assume,

the number of employees in Department X = m

the number of employees in Department Y = n

There are MORE THAN TWICE as many employees in Department X as in Department Y

m > 2n

m = 2n (NOT possible)

m = 2.5n (Possible)

m = 3n (Possible)

m = 4n (Possible)

To satisfy the condition, m has to be MORE THAN 2n is possible.

So, the total salary for all of the employees of X department = 25000m

And the total salary for all of the employees of y department = 35000n

(When **m = 2.5n**)

The total salary for all of the employees of the company = 25000m + 35000n = 25000(2.5n) + 35000n = 975000n

The average salary for all of the employees of the company = (975000n)/(2.5n + n) = 975000n /3.5n = 27857.1429

Similarly, If we *assume* **m = 3n**, then the average salary = (25000(3n) + 35000(n)) / (3n + n) = 110000n/4n = 27500

If m = 4n, then the average salary = (25000(4n) + 350000(n)) / (4n + n) = 135000n/5n = 27000

**Key Observation:**

The average salary is decreasing, right? Because the higher n is factored into the (conditional) expression, the lower value you get.

Therefore, it is both necessary and sufficient to find out the boundary value, and m = 2n should get you there. And when m = 2n, the average salary = 28333.3333.

So, Anything LESS THAN 28333.333 will satisfy the given condition.

*How can we get the average equal to 26000?*

Um, **Do we really need to find out the average equal to 26000**? **No**. I mean, you can, but you DON’T HAVE TO.

Assume * m = 9n*, the average will be 26000.

(I backsolved it to find this relation out lol.)

**Using numbers:**

Find the boundary,

X department -> 2 employees

Y department -> 1 employee

((2)(25000) + (1)(35000)) / (2 + 1) = 85000/3 = 28333.33

Also, when

X department -> 3 employees

Y department -> 1 employee

The average salary for all of the employees of the company = ((3)(25000) + (1)(35000)) / (3 + 1) = 110000 / 4 = 27500

This Super @ehza hank you for the explanation, makes it clear.