Skip to content

Data Analysis Interview Case Study

Case study is the most important round for any analytics hiring. However, a lot of people feel nervous with the mention of undergoing a case interview. There are multiple reasons for this, but the popular ones are:

  • You need to think on your feet in a situation where there is already enough pressure
  • Limited resources available to prepare for analytical case studies. Even with the amount of content available on web, there aren’t many analytical case studies which are available freely.

From an interviewer perspective, he is judging the candidate on structured thinking, problem solving and comfort level with numbers using these case studies. This article will take you through a case study. Answer to each question takes you deeper into the same problem.

Background:

I moved to Bangalore 10 months back. Bangalore is a big city with number of roads tagged as one-way. You take a wrong turn and you are late by more than 20 minutes.  Every single day I compare the time taken on different routes and choose the best among all possible combinations. This article takes you through an interesting road puzzle which took me considerable time to crack.

Process to solve: 

I have structured this in a fashion very similar to an analytics interview. You will be provided with background at start of the interview, which will be followed by questions. After you have brainstormed / solved a question, you will be presented with additional information which will progress the case further.

If you want to undergo this case in true spirit, just ask one of your friends to take the questions and information (provided in next section) and present them to you at the right time. After all the questions, I have provided asnwers which I expect. You can compare your answers to mine.

Please note that there is no right or wrong answer in many situation and a case evolves in the way the interviewer wants. If you have a different answer / approach, please feel free to post in comments and I would love to discuss them.

Problem statement :

Background : There are two alternate roads I take to hit the main road from my home. Average speed on each of the road comes out around 30 km/hr. Let’s call the two roads as road A and road B. Total distance one needs to travel on road A and road B is 1 km and 1.3 km respectively to hit the same point on the main road . Note that, before the two roads split, I see a signal (say Z)  which is common to both the roads and hence does not come in this calculation. See figure for clarifications.

Q1 : What are the possible factors, I should consider to come up with the total time taken on each road?

Q2 : Which road should one take to reach  the main road so as to minimize the time taken? And what is the difference in total time taken by the two alternate routes?

Additional information (to be provided after question 2): Recently, one of the junction (say, X) on road A got too crowded and a traffic signal was installed on the same. The traffic signal was configured for 80 seconds red and 20 seconds green. Let’s denote the seconds of signal as R1 R2 R3 … G1 G2 G3 . Here, R1 denotes 1 sec after signal switched to red.

Q3 : Does it still makes sense to take road A, or to switch to road B provided the average speed on the road A is still the same except the halt at signal?

Additional information (to be provided after question 3):  If I reach the signal at R1, I will be in the front rows to be released once the signal turns green. Whereas, if I reach the signal at R80, I might have to wait for some time even after signal turns green because the vehicles in the front rows will block me for some seconds before I start. Let’s take some realistic guesses for the wait time after signal turns green.

R1 – R 10 : 0 sec , R11-R20 : 3 sec , R21 – R60 : 10 sec, R61 – R80 : 15 sec, G1-G15 : 5 sec, G15-G20 : 0 sec

Q4 : Does it still makes sense to take road A, or to switch to road B provided the average speed on the road A is still the same except the halt at signal?

Q5: Can you think of a reason, why road A can still be a better choice for reaching junction X in minimum time?

Additional information (to be provided after question 5): The signal Z (before the two roads split) has the exact same cycle as the signal at point X i.e. 90 sec red and 20 sec green. Average speed of any vehicle vary on road A from 25km/hr (heavy traffic) to 30km/hr (light traffic). The signal X is offset from signal Z by 25 seconds. Hence, when it turns green at Z, it is R55 at signal X.

Q6 : Does it still makes sense to take road A, or to switch to road B provided the average speed on the road A is still the same except the halt at signal?

Solution  :

Background : There are two alternate roads I take to hit the main road from my home. Average speed on each of the road comes out around 30 km/hr. Let’s call the two roads as road A and road B. Total distance one needs to travel on road A and road B is 1 km and 1.3 km respectively to hit the same point on the main road . Note that, before the two roads split, I see a signal (say Z)  which is common to both the roads and hence does not come in this calculation.

Question : Which road should one take to reach  the main road so as to minimize the time taken? And what is the difference in total time taken by the two alternate routes?

Solution : 

Background : Recently, one of the junction (say, X) on road A got too crowded and a traffic signal was installed on the same. The traffic signal was configured for 80 seconds red and 20 seconds green. Let’s denote the seconds of signal as R1 R2 R3 … G1 G2 G3 . Here, R1 denotes 1sec after signal switched to red.

Question : Does it still makes sense to take road A, or to switch to road B provided the average speed on the road A is still the same except the halt at signal?

Solution : Let’s assume I come to the signal at a random time. Hence, probability of getting to the signal at R1 R2 R3 …or G1 G2 G3 are all equal. Hence, the expected time taken at the signal is :

Background : Till this point, the solution will look good in books. Lets spice the problem up by ground realities. If I reach the signal at R1, I will be in the front rows to be released once the signal turns green. Whereas, if I reach the signal at R80, I might have to wait for some time even after signal turns green because the vehicles in the front rows will block me for some seconds before I start. Let’s take some realistic guesses for the wait time after signal turns green.

R1 – R 10 : 0 sec , R11-R20 : 3 sec , R21 – R60 : 10 sec, R61 – R80 : 15 sec, G1-G15 : 5 sec, G15-G20 : 0 sec

Question : Does it still makes sense to take road A, or to switch to road B provided the average speed on the road A is still the same except the halt at signal?

Solution :.

Background : Even after making such logical calculation, I noted that in 30 different events, I was commuting more than 25 sec faster on road A compared to road B every single time. I did not change my average velocity on either of the roads. It could have been acceptable in case I found x number of event where A wins and 30 – x where B wins. But A winning every single time was fishy. I was struggling for last 10 days to figure out a valid cause. It struck me today and following is what I figured out:

The signal Z ( before the two roads split), which I initially though had nothing to do with the calculation was actually the game changer. Here is how it played a role.  This signal had the exact same cycle as the signal at point X i.e. 90 sec red and 20 sec green. Whenever, the two lights have the same cycle, the incidence on signal X is no longer random.

Question : Does it still makes sense to take road A, or to switch to road B provided the average speed on the road A is still the same except the halt at signal?

Solution : 

End Notes

Did you find the article useful? Share with us any other problem statements you can think of. Do let us know your thoughts about this article in the box below.

In one of the upcoming articles, we will share how an interviewer judges an analyst during a case study.

If you like what you just read & want to continue your analytics learning, subscribe to our emails or like our facebook page.

Applying for positions in analytics? Interviewers typically look for the following skills for entry – mid level positions in analytics (3-4 years of experience):

  • Knowledge of analytical tools like SAS for data processing
  • A good understanding of statistical concepts and algorithms

For non-fresher positions, recruiters look to see if you have an awareness of issues that you are likely to face when dealing with business data and business problems.

Here are 5 tips to help you crack an analytics interview, specifically for entry to mid-level open positions:

1. Allocate most time in your preparation process for reviewing your knowledge of the analytical tools specified :

Be very proficient with the analytics tool specified: Most often for junior level positions, the most important criteria in an interview tends to be expertise with an analytical tool (like SAS or R). The emphasis tends to be around data processing and preparation. Spend time reviewing concepts of data import and manipulation, especially how to read non-standard data (mixed data formats, multiple input file types etc), how to join multiple datasets efficiently, how to conditionally select columns, rows or observations in data, and finally, how to do heavy duty processing, typically macros or SQL

2. If you have prior experience with analytics or data related processing or analysis, review the business process end to end as part of your interview preparation:

If you have prior work experience related to analytics or data, interviewers will certainly spend time asking you to explain the business process and the responsibilities of your specific role. They are looking for you to have a broad understanding of the end to end business process, and where your particular role fits in. It is important for you to show that you understand the source of your data, how it is processed, and how it is ultimately used.

3. Be prepared with at least two business case studies:

Interviewers will want to assess your knowledge of business analytics, not just the tool proficiency. Spend time reviewing analytics projects you have worked on if you have prior analytics experience or training. Be prepared to tell them what the business problem was, what were the data processing steps, what was the algorithm used for creating the models and why, and how were the model results implemented?  You may be asked about challenges you faced at any of these stages, so do review issues and challenges in you past projects and how they were resolved.

 4. Review statistical concepts:

Since analytical algorithms are based on statistical concepts, you will need to be prepared to answer questions related to fundamental statistical concepts, like hypothesis testing outcomes and rejection criteria,   model validation measures, and statistical assumptions that need to hold for implementing different types of algorithms. A quick review of statistical concepts is a must as part of the interview preparation process.

5. Communicate effectively:

All the preparation in the world is not enough if you do not communicate effectively. Mentally practice answering mock questions. Focus on questions related to past experience and business process, with full answers so that you are not thinking too much on the fly at the actual interview. Of course you cannot anticipate every question, but if you spend time articulating answers to some questions, you will be better prepared with coherent answers.

Interested in a career in Data Science?

To learn more about Jigsaw’s Data Science with SAS Course – click here.

To learn more about Jigsaw’s Data Science with R Course – click here.

To learn more about Jigsaw’s Big Data Course – click here.


Share with: