## Interview Question: Average Pay

Sample Question #271 (brainteaser)

I was having lunch with my financial engineering coworkers the other day when someone came up with this question:

We have just had our reviews and received our 2007 bonuses. Everyone in the lunchroom wants to know what the average bonus among the people in the room is. But, alas, no one is willing to divulge his or her own number. Can you think of a way for us to find out the average bonus?
This entry was posted in Sample Qs. Bookmark the permalink.

### 5 Responses to Interview Question: Average Pay

1. Brett says:

This is an excellent brainteaser question!

In order to find the average bonus, we need to find the sum and then divide it by the number of people. Simple enough. But how do we find the sum when no one is willing to tell his or her number?

Let’s start with one person in the room. Let’s call him Brett. Brett knows his own bonus number. He then adds an arbitrary number, which only he knows, to his bonus number. He whispers this total to the person to his left. This second person adds his or her bonus number to the total he or she received from Brett (which no one else in the room knows). He or she then whisper this new total — a running total, in fact — to the third person, who does the same thing: adding his or her bonus to the running total he or she received and whispering to the next person. The last person, after adding his or her number, whispers the running total back to Brett.

Brett then simply subtracts the secret number he added in the beginning, and voila, we now have the true total of all the bonuses.

2. Ping says:

one funny but necessary condition: number of peoples in the room>2

3. Brett says:

You’re absolutely right!  Wouldn’t work with only 2 people.

4. Unknown says:

I think the condition should be adjusted to something like "no one can know what anyone else’s bonus is even if they don’t know who it belongs to".  For otherwise, they could just write the numbers on paper and collect them in a hat, while maintaining anonymity.

5. Yanis Ps. says:

Quant Career,your solution is the first thing that came to my mind too BUT there is a slight problem with it. I explain:The last person (let’s call him Jake) knows what the total was before the subtraction AND what the real total is( the real total he knows because the average will become known to everyone). This implies that he also knows that that random number is that Brett added to his sum at the very beginning. Now here comes the problem:WHAT IF Jake goes up to the second person and asks what the number was that Brett whispered to him? Then Jake automatically knows that Brett’s real number is. Q.E.D.