Skip to main content
All Questions

Session Data Analysis.

Hard
Let's imagine you have a table with 1 row per session. The two fields you will be using are 'country' (country of the user) and 'session_time' (session length in seconds). 1) What is the average session time of sessions longer than 3 minutes?. 2) I want to make a histogram of session lengths using bins of 5 minutes. How do I get the data to plot it? (output: 1 column is bins of 5 minutes, 1 column is count of sessions in that bin). 3) how do I find similar countries, where similar countries is defined as countries that have within 10% of the number of sessions? (output: 1 column for country a and 1 column for country b).

You are given a dataset with one row per user session. The table contains the following columns:

  • country: The country of the user.
  • session_time: The length of the session in seconds.

Download the dataset here!

Part 1: Calculate avg. session time

Calculate the average session time for sessions that are longer than 3 minutes (180 seconds).

Part 2: Visualize data

Create a histogram of session lengths using bins of 5 minutes (300 seconds). How would you prepare the data for this histogram?

Finally, plot the histogram!

Part 3: Find similar countries

“Similar countries” are countries that have a number of sessions within 10% of each other. How would you identify such pairs of countries? The output should be a table with two columns:

  • country_a: The first country in the pair.
  • country_b: The second country in the pair.

Related courses

Course

BizOps & Strategy Interview Prep

Land your dream operations and strategy role at Google, Meta, Amazon, Uber, Microsoft, and other top companies. Learn from mock interviews, frameworks, and advice from senior candidates. Practice strategic decision-making, stakeholder management, product strategy, analytics, and behavioral interviews.

Course

Product Strategy Questions

Product strategy is fundamentally different in the AI era, and we'll tell you exactly how to approach these rounds effectively within the new rules.