Product Manager Estimation Question: Exercise #1

If you are opening a new Walmart store, how would you decide how many cash register is needed for the store?

There are basic steps to solve this problem. They are:

  1. Ask any clarifying questions. Work with interviewer to define the scope. 
  2. Create a main equation such as a = b * c. Divide the equations into sub parts. 
  3. Think of any edge cases. 
  4. Calculate the numbers and do a sanity check.
Starting with steps:
Questions and Answers by the candidate. 
Questions and Answers by the interviewer. 

Ask clarifying questions to define the scope of the problem:
  • Do we know if this walmart is in a suburb or city? Suburb 
  • Do we know if there are any other walmarts in the neighborhood? Yes two more. 
  • Are they closer to this suburb? No. Both of them are far. 
  • Ok so in that case, many of the residents will rely on this Walmart. Yes
  • Can we assume that any person is ok with waiting at the register for 4-8 mins? Yes

Create the main equation:
Number of registers = Number of people visiting the store/time taken at each register. 

Break down the equations into simple sub-equations: 
  • Two main components are: Number of people visiting the store. 
  • Time taken at each register: 4-8 mins as clarified. 
  • So we need to focus on number of people. Basically only a certain set of people visit the store so we can say x% of entire population visit the store. 
  • Since we have no way of telling what is x but given that Walmart is popular choice of lower to upper middle class. We can safely assume that x=65-70% people visit Walmart because of their low prices. 
  • Since its a suburb whose size we don't know, we are going to estimate. 
    • US average population is 325 million. We will round it to 300 million for easier calculations. 
    • Based on some stats I know that:
      • 26% population live in urban areas
      • 51% in suburban
      • 21% in rural
    • Majority of population is living in suburban. Estimated number is 150 million live in suburban.
    • There are 50 states in USA. We can assume that each state has 50-60 suburbs and bigger ones will have 65-80 suburbs. So average is 60(round off) suburbs in each state. So total suburbs are around: 50*60= 3000 = 3k
    • So 150 million people live in 3k suburbs. And on average 50k people live in 1 suburb. 
    • Only 65%(as assumed)of 50k go to Walmart. But they go as a family. So we don't need to calculate all the people. We need to calculate the households. 
    • We can assume that each household has approximately 3 people. This brings down our number of people to 16k users. 
    • And not all the people are at the walmart at the same time. We can say at any time only 5% of people are at a walmart = 5% of 16k = 800 approximately. 
    • Now not everyone is checking out at the same time. Let's say only 30% of them are. this brings down the number to 240.
    • And not all 240 has shopping carts, they are with their families. Let's say each group has 2 people ~ 120 are in line. 
Calculate the numbers and do a sanity check:
  • Equation: Number of registers = Number of people visiting the store/time taken at each register. 
  • Sub equation: Number of registers = (x% of total population visit the store)/time taken at each register. 
  • x% of total population that visit the store and are doing a checkout during busiest times are = 120
  • Average time taken at each register = 6 minutes. 
  • So total registers = 120/6 = 20
  • Sanity check: At a walmart, I have seen 15-20 registers and our answer is 20. So this is in the ballpark number. 

Final answer is = 20 registers.

Some background: 
  • Initially I assumed 30 suburbs in each state. The count came down to 100 million people in each suburb. This is a lot. San Jose's population is 1 million. So I went back and changed the number of suburbs to 60 per state. This helped with some corrections. 
  • I assumed 30% of suburbs population is in Walmart at any given time. Again this is a huge number. So fixed it to 5%. 
  • Then assumed 50% of them are checking out at the same time so fixed it to 30% as well. 

Let me know your thoughts and let me know in comment section on how you will solve this problem. 





No comments:

Post a Comment

NoSQL

This one is reviewed but I need to delete its copy from hubpages or somewhere NoSQL Data models: key-value  Aggregate model.  key or i...