Data Analytics

(Forage Job Simulation)

Note Prepared by

Mudalige Dona Jayoda  Jithmini Kulatunga

Undergraduate Student

Pearson B.Tech Higher National Diploma (HND) in Computing - Software Engineering

ESFOT Metro Campus

Colombo, Sri Lanka.

Check out the simulation here: https://www.theforage.com/simulations/quantium/data-analytics-rqkb

Task 01 R solution: https://jithminijayoda.github.io/TutorialNotes/Data%20Analytics%20Job%20Simulations/Quantium:%20Data%20Analytics/R-Solution-Task-01.html

Task 02 R solution: https://jithminijayoda.github.io/TutorialNotes/Data%20Analytics%20Job%20Simulations/Quantium:%20Data%20Analytics/R-Solution-Task-02.html

Task 03 R solution: https://jithminijayoda.github.io/TutorialNotes/Data%20Analytics%20Job%20Simulations/Quantium:%20Data%20Analytics/R-Solution-Task-03.html

List of Vocabulary

anomalies - අසාමාන්‍යතා | Unusual occurrences

Whilst - සමඟ | While or during

derive - ලබන්න | Obtain or extract

jargon - වෘත්තීය භාෂාව | Specialized terms or language

List of Contents

List of Vocabulary

List of Contents

Introduction

Why complete our Job Simulation

Skills you will learn and practice:

How it works

Tasks in this program

Task One:

1 Task Overview

2 Here is the background information on your task

3 Here is your task

4 Example Answer

5 Completion

Task Two:

1 Task Overview

2 Here is the background information on your task

3 Here is your task

4 Example Answer

5 Completion

Task Three:

1 Task Overview

2 Here is the background information on your task

3 Here is your task

4 Now, submit your report here.

5 Example Answer

6 Completion

Finish Line:

1 Resume Snippet

2 Interview Tip

Introduction

Data Analytics

Explore the power of data and its ability to power breakthrough possibilities for individuals, organisations and societies with Quantium.

Data

Free

6900+ 5 Star Reviews

Why complete our Job Simulation

Why complete our Job Simulation

A risk-free way to experience work on the job with us at Quantium. Practice your skills with example tasks and build your confidence to ace your applications.

Self-paced 4-5 hours

No grades

No assessments

Advanced

Founded in 2002, Quantium has a long history of innovation in data science across all sectors of the economy. As a rapidly growing global leader in data science and AI, we are dedicated to growing our team of ambitious, diverse, and fun employees! Our team of employees work together to harness the power of data to drive revolutionary change that benefits us all and deliver the best results for our clients.

Skills you will learn and practice:

Skills you will learn and practice:

Data validation, Data visualisation, Data wrangling, Programming, Data analysis, Commercial thinking, Statistical testing, Presentation skills, Communication skills

How it works

How it works

Complete tasks guided by pre-recorded videos and example answers from our team at Quantium. No live sessions, all self-paced.

Earn a certificate and add it to your resume and LinkedIn as an extra curricular activity.

Stand out in applications. Confidently answer interview questions and explain why you’re a good fit for our team.

Tasks in this program

Task One: Data preparation and customer analytics

1-2 hours

Advanced

Conduct analysis on your client's transaction dataset and identify customer purchasing behaviours to generate insights and provide commercial recommendations.

What you'll learn

  • Understand how to examine and clean transaction and customer data.
  • Learn to identify customer segments based on purchasing behavior.
  • Gain experience in creating charts and graphs to present data insights.
  • Learn how to derive commercial recommendations from data analysis.

What you'll do

  • Analyze transaction and customer data to identify trends and inconsistencies.
  • Develop metrics and examine sales drivers to gain insights into overall sales performance.
  • Create visualizations and prepare findings to formulate a clear recommendation for the client's strategy.

Task Two: Experimentation and uplift testing

1-2 hours

Advanced

Extend your analysis from Task 1 to help you identify benchmark stores that allow you to test the impact of the trial store layouts on customer sales.

What you'll learn

  • Understand experimentation and uplift testing, comparing trial and control stores.
  • Learn control store selection based on defined metrics.
  • Gain experience in data visualization.
  • Perform statistical analysis to assess sales differences and formulate recommendations.

What you'll do

  • Define metrics to select control stores.
  • Analyze trial stores against controls.
  • Use R/Python for data analysis and visualization and summarise findings and provide recommendations.

Task Three: Analytics and commercial application

1-2 hours

Advanced

Use your analytics and insights from Task 1 and 2 to prepare a report for your client, the Category Manager.

What you'll learn

  • Gain experience in preparing a client report based on data analysis.
  • Understand the "Pyramid Principles" framework for report structure.
  • Practice creating data visualizations and key callouts.
  • Develop skills in translating data into actionable insights and recommendations.

What you'll do

  • Use the Pyramid Principles framework for structuring the report.
  • Submit a report that incorporates data visualizations, key insights, and recommendations.

Finish Line

Collect these achievements and tips to help you stand out in your job search.

Interview Tips

How to talk about this experience in your interviews.

Resume Snippet

A summary ready for your resume.

Task One: Data preparation and customer analytics

1 Task Overview

Task Overview

What you'll learn

  • Understand how to examine and clean transaction and customer data.
  • Learn to identify customer segments based on purchasing behavior.
  • Gain experience in creating charts and graphs to present data insights.
  • Learn how to derive commercial recommendations from data analysis.

What you'll do

  • Analyze transaction and customer data to identify trends and inconsistencies.
  • Develop metrics and examine sales drivers to gain insights into overall sales performance.
  • Create visualizations and prepare findings to formulate a clear recommendation for the client's strategy.

2 Here is the background information on your task

Here is the background information on your task

You are part of Quantium’s retail analytics team and have been approached by your client, the Category Manager for Chips, who wants to better understand the types of customers who purchase Chips and their purchasing behaviour within the region.

The insights from your analysis will feed into the supermarket’s strategic plan for the chip category in the next half year.

You have received the following email from your manager, Zilinka.

'Hi,

Welcome again to the team, we love having new graduates join us!

I just wanted to send a quick follow up from our conversation earlier with a few pointers around the key areas of this task to make sure we set you up for success.

Below I have outlined your main tasks along with what we should be looking for in the data for each.

Examine transaction data – look for inconsistencies, missing data across the data set, outliers, correctly identified category items, numeric data across all tables. If you determine any anomalies make the necessary changes in the dataset and save it. Having clean data will help when it comes to your analysis.

Examine customer data – check for similar issues in the customer data, look for nulls and when you are happy merge the transaction and customer data together so it’s ready for the analysis ensuring you save your files along the way.

Data analysis and customer segments – in your analysis make sure you define the metrics – look at total sales, drivers of sales, where the highest sales are coming from etc. Explore the data, create charts and graphs as well as noting any interesting trends and/or insights you find. These will all form part of our report to Julia.

Deep dive into customer segments – define your recommendation from your insights, determine which segments we should be targeting, if packet sizes are relative and form an overall conclusion based on your analysis.

Make sure you save your analysis in the CSV files and your visualisations – we will need them for our report. If you could work on this analysis and send me your initial findings by end of next week that would be great.  

Looking forward to reviewing your work.

Thanks,

Zilinka'


Chat GPT Help:
To tackle this project effectively, you can follow these steps:

1. Examine Transaction Data

  • Actions: Check for missing, inconsistent, or erroneous data, such as:
  • Null or invalid entries in important columns (e.g., date, sales values, product category).
  • Incorrectly categorized items (ensure only chip-related products are included).
  • Outliers in numeric data (e.g., unusually high/low sales figures).
  • Tools: Use Python (Pandas) or Excel to clean and standardize the dataset.

2. Examine Customer Data

  • Actions:
  • Look for null or duplicate entries in customer demographics.
  • Validate that each customer ID matches valid transaction records.
  • Merging: Combine cleaned transaction and customer datasets using a common key (e.g., customer_id).

3. Data Analysis and Visualization

  • Define Metrics:
  • Total sales, average sales per customer, sales trends over time.
  • Key drivers (e.g., promotion effectiveness, popular chip brands, preferred packet sizes).
  • Visualization:
  • Line charts for sales trends.
  • Bar charts for top-selling products and regions.
  • Heatmaps for regional sales distributions.
  • Tools: Excel, Tableau, Power BI, or Python libraries (Matplotlib, Seaborn).

4. Customer Segmentation

  • Segmentation Criteria:
  • Demographics (age group, household size, income).
  • Purchasing behavior (frequency, average spend, preferred chip types/packet sizes).
  • Insights:
  • Identify high-value customer segments and their preferences.
  • Correlate purchasing behavior with promotions and packet sizes.
  • Deliverable: A clear report on customer segments to target and why.

5. Recommendations

  • Formulate strategies for marketing and inventory planning based on insights.
  • Propose optimal packet sizes and product placement strategies.

6. Documentation

  • Save cleaned datasets and CSV files of your analysis.
  • Create clear and well-labeled charts for the report.
  • Draft a summary document for your findings and recommendations.

Let me know if you’d like help with any specific part, like setting up the analysis framework, creating visualizations, or drafting your report!

3 Here is your task

Here is your task

We need to present a strategic recommendation to Julia that is supported by data which she can then use for the upcoming category review. However, to do so, we need to analyse the data to understand the current purchasing trends and behaviours. The client is particularly interested in customer segments and their chip purchasing behaviour. Consider what metrics would help describe the customers’ purchasing behaviour.  

We have chosen to complete this task in R, however you will also find Python to be a useful tool in this piece of analytics. If you aren’t familiar with R or Python we would recommend searching a few online courses to help get you started. We have also provided an R solution template if you want some assistance in getting through this Task. Whilst its possible to complete the task in Excel you may find the size of the data and the nature of the tasks is such that it is more difficult to complete in Excel.  

To get started, download the resource csv data files below and begin performing high-level data checks such as:

  • Creating and interpreting high-level summaries of the data
  • Finding outliers and removing these (if applicable)
  • Checking data formats and correcting (if applicable)


You will also want to
derive extra features such as pack size and brand name from the data and define metrics of interest to enable you to draw insights on who spends on chips and what drives spends for each customer segment. Remember, our end goal is to form a strategy based on the findings to provide a clear recommendation to Julia the Category Manager so make sure your insights can have a commercial application.

As we are in the early stages of this analysis Zilinka has asked us to submit our initial findings, so please save your code as a .pdf file and upload it to unlock the model answer.

Note: that this is an open-ended case study that can be approached in many ways. Example answer is in R.

Here are some resources to help you

Download "R" Software

Click here to visit website →

 

QVI Transaction Data

Click to download file →

 

QVI Purchase Behaviour

Click to download file →

 

R Solution Template

Click to download file →

This file should be transferred to an R Markup (.Rmd)



LIFESTAGE: Customer attribute that identifies whether a customer has a family or not and what point in life they are at e.g. are their children in pre-school/primary/secondary school.

PREMIUM_CUSTOMER: Customer segmentation used to differentiate shoppers by the price point of products they buy and the types of products they buy. It is used to identify whether customers may spend more for quality or brand or whether they will purchase the cheapest options.

Pro analytics Tip: While the data set would not normally be considered large some operations may still take some time to run.

This is normal and to be expected when dealing with data sets at Quantium. Whilst your analysis is based on the whole data set you may want to try some strategies to try running sample solutions on a smaller subset of data I.e. create a sample solution using some of the data while it uploads.



ChatGPT Help:

Great! You’ve provided two files, presumably containing customer and transaction data. Here’s how we can approach this step-by-step:

Plan for Initial Analysis

  1. High-Level Summary:
  • Load the datasets and inspect their structure.
  • Generate descriptive statistics (e.g., mean, median, range) for numerical columns.
  • Understand categorical distributions (e.g., LIFESTAGE, PREMIUM_CUSTOMER).
  1. Data Quality Checks:
  • Check for missing values or inconsistencies.
  • Identify outliers in numerical fields like sales or quantity.
  • Validate data formats (e.g., dates, numbers).
  1. Feature Engineering:
  • Extract additional attributes like pack_size and brand_name from product descriptions.
  • Create metrics such as:
  • Average spend per customer.
  • Purchase frequency.
  • Share of wallet by LIFESTAGE or PREMIUM_CUSTOMER.
  1. Visualization:
  • Plot key trends and distributions to explore purchasing behaviors.
  1. Initial Insights:
  • Summarize high-level trends.
  • Highlight potential areas of interest for deeper analysis.

I’ll start by loading and inspecting these files to ensure their compatibility and check their contents.

The transaction data contains a sheet named in, and the customer data contains a sheet named Worksheet. I'll load these sheets to explore their content and structure. ​​

Python

import pandas as pd

# Load the provided Excel files

transaction_data_path = '/mnt/data/QVI_transaction_data.xlsx'

customer_data_path = '/mnt/data/QVI_purchase_behaviour.xlsx'

# Load sheets to inspect their structure

transaction_data = pd.ExcelFile(transaction_data_path)

customer_data = pd.ExcelFile(customer_data_path)

# Extract sheet names to determine content

transaction_sheets = transaction_data.sheet_names

customer_sheets = customer_data.sheet_names

transaction_sheets, customer_sheets

Result

(['in'], ['Worksheet'])

Dataset Overview

Transaction Data:

  • Total Records: 264,836
  • Columns:
  • DATE: Numeric representation of transaction date.
  • STORE_NBR: Store number.
  • LYLTY_CARD_NBR: Customer loyalty card number.
  • TXN_ID: Transaction ID.
  • PROD_NBR: Product number.
  • PROD_NAME: Product name.
  • PROD_QTY: Quantity of the product purchased.
  • TOT_SALES: Total sales amount for the transaction.

Customer Data:

  • Total Records: 72,637
  • Columns:
  • LYLTY_CARD_NBR: Customer loyalty card number (linking key to transaction data).
  • LIFESTAGE: Customer life stage, e.g., "YOUNG SINGLES/COUPLES."
  • PREMIUM_CUSTOMER: Indicates spending behavior (e.g., "Premium," "Mainstream," "Budget").

Next Steps

  1. High-Level Summaries:
  • Compute descriptive statistics for TOT_SALES and PROD_QTY.
  • Analyze the distribution of LIFESTAGE and PREMIUM_CUSTOMER.
  1. Data Quality Checks:
  • Validate numeric columns and check for missing values.
  • Ensure DATE is correctly formatted as datetime.
  • Check for duplicates in transaction or customer records.
  1. Feature Engineering:
  • Extract pack_size and brand_name from PROD_NAME.

Let me compute summaries and check for missing data first. ​​

Python

# Load the sheets into dataframes

transaction_df = transaction_data.parse('in')

customer_df = customer_data.parse('Worksheet')

# Display the first few rows and column information for both datasets

transaction_head = transaction_df.head()

transaction_info = transaction_df.info()

customer_head = customer_df.head()

customer_info = customer_df.info()

transaction_head, customer_head

Data Summaries and Quality Check Results

Transaction Data:

  • Descriptive Statistics:
  • Average TOT_SALES: $7.30 (min $1.50, max $650.00, which is unusually high and worth reviewing for outliers).
  • Average PROD_QTY: 1.91 (min 1, max 200, which may also indicate an anomaly).
  • No Missing Values: All fields are complete.

Customer Data:

  • Categorical Overview:
  • LIFESTAGE: 7 unique categories, with "RETIREES" being the most frequent (14,805 customers).
  • PREMIUM_CUSTOMER: 3 categories, with "Mainstream" being the most common (29,245 customers).
  • No Missing Values: All fields are complete.

Next Steps:

  1. Handle Outliers:
  • Investigate unusually high TOT_SALES and PROD_QTY.
  1. Format the DATE Column:
  • Convert DATE from numeric to datetime.
  1. Feature Engineering:
  • Extract pack_size and brand_name from PROD_NAME.

I'll start with the outlier investigation and formatting the DATE column. ​​

Python

# High-level summaries for transaction data

transaction_summary = transaction_df.describe()

customer_summary = customer_df.describe(include='object')

# Check for missing values in both datasets

transaction_missing = transaction_df.isnull().sum()

customer_missing = customer_df.isnull().sum()

transaction_summary, customer_summary, transaction_missing, customer_missing

It seems like I can’t do more advanced data analysis right now. Please try again later. If you want, you can re-upload the files or share specific parts of the data for further examination. Let me know how you'd like to proceed!

Python

# Convert DATE column to datetime format

transaction_df['DATE'] = pd.to_datetime('1899-12-30') + pd.to_timedelta(transaction_df['DATE'], unit='D')

# Check for outliers in TOT_SALES and PROD_QTY

sales_outliers = transaction_df[transaction_df['TOT_SALES'] > transaction_df['TOT_SALES'].quantile(0.99)]

qty_outliers = transaction_df[transaction_df['PROD_QTY'] > transaction_df['PROD_QTY'].quantile(0.99)]

# Summary of outliers

sales_outliers_summary = sales_outliers.describe()

qty_outliers_summary = qty_outliers.describe()

transaction_df['DATE'].head(), sales_outliers_summary, qty_outliers_summary


4 Example Answer

Example Answer

Great work! Take a look at the example answer below to see how a professional would have attempted this task. Think about what you did well and how you can improve.

Example Answer

Click to download file →


5 Completion

Task Two: Experimentation and uplift testing

1 Task Overview

Task Overview

What you'll learn

  • Understand experimentation and uplift testing, comparing trial and control stores.
  • Learn control store selection based on defined metrics.
  • Gain experience in data visualization.
  • Perform statistical analysis to assess sales differences and formulate recommendations.

What you'll do

  • Define metrics to select control stores.
  • Analyze trial stores against controls.
  • Use R/Python for data analysis and visualization and summarise findings and provide recommendations.

2 Here is the background information on your task

Here is the background information on your task

We suggest you complete Task 1 before proceeding with this task.

You are part of Quantium’s retail analytics team and have been approached by your client. The Category Manager for Chips, has asked us to test the impact of the new trial layouts with a data driven recommendation to whether or not the trial layout should be rolled out to all their stores.

You have received the following email from Zilinka.

Hi,

Thanks for your feedback earlier, I’m glad you find my follow up emails helpful in ensuring your on the right track.

For this part of the project we will be examining the performance in trial vs control stores to provide a recommendation for each location based on our insight. Below are some of the areas I want you to focus on, of course if you discover any other interesting insights feel free to include them in your findings.

Select control stores – explore the data and define metrics for your control store selection – think about what would make them a control store. Look at the drivers and make sure you visualise these in a graph to better determine if they are suited. For this piece it may even be worth creating a function to help you.

Assessment of the trial – this one should give you some interesting insights into each of the stores, check each trial store individually in comparison with the control store to get a clear view of its overall performance. We want to know if the trial stores were successful or not.

Collate findings – summarise your findings for each store and provide an recommendation that we can share with Julia outlining the impact on sales during the trial period.

Remember when working with a client visualisations are key to helping them understand the data. Be sure to save all your visualisations so we can use them later in our report. We are presenting to our client in 3 weeks so if you could submit your analysis by mid next week that will give us great amount of time to discuss findings and pull together the report.

Keep up the good work!

Thanks,

Zilinka'


ChatGPT Help:

Here’s how to approach this task systematically in R:


1. Select Control Stores

Define Metrics for Control Store Selection

Control stores should resemble the trial stores in terms of:

  1. Sales Volume: Compare total sales.
  2. Customer Counts: Compare the number of customers.
  3. Seasonality: Match sales trends over time.

Steps

  1. Calculate metrics for trial stores (e.g., average weekly sales and customer counts).
  2. Identify potential control stores with similar metrics using correlation or Euclidean distance.
  3. Visualize and verify similarity using trend graphs.

Code

R

Copy code

# Aggregate weekly metrics for trial and other stores

weekly_metrics <- transaction_df %>%

  group_by(STORE_TYPE, STORE, week = format(DATE, "%Y-%U")) %>%

  summarise(

    avg_sales = mean(TOT_SALES, na.rm = TRUE),

    avg_customers = n_distinct(CUSTOMER_ID)

  )

# Filter trial store data

trial_store <- weekly_metrics %>% filter(STORE_TYPE == "Trial")

# Compare metrics to find control stores

control_store_candidates <- weekly_metrics %>%

  filter(STORE_TYPE != "Trial") %>%

  group_by(STORE) %>%

  summarise(

    sales_corr = cor(trial_store$avg_sales, avg_sales),

    customer_corr = cor(trial_store$avg_customers, avg_customers)

  )

# Select control stores with highest correlations

control_stores <- control_store_candidates %>%

  arrange(desc(sales_corr), desc(customer_corr)) %>%

  slice(1:5) # Top 5 matches


2. Assess the Trial

Compare Trial and Control Stores

  1. Measure sales and customer differences during the trial period.
  2. Use percentage change and statistical tests to assess significance.
  3. Visualize the results using line charts and bar plots.

Code

R

Copy code

# Define trial period

trial_period <- c(as.Date("2023-01-01"), as.Date("2023-06-30"))

# Filter data for trial and control stores during the trial period

trial_data <- transaction_df %>%

  filter(STORE %in% trial_store$STORE, DATE >= trial_period[1], DATE <= trial_period[2])

control_data <- transaction_df %>%

  filter(STORE %in% control_stores$STORE, DATE >= trial_period[1], DATE <= trial_period[2])

# Calculate percentage changes

trial_summary <- trial_data %>%

  group_by(STORE) %>%

  summarise(

    trial_avg_sales = mean(TOT_SALES),

    trial_customer_count = n_distinct(CUSTOMER_ID)

  )

control_summary <- control_data %>%

  group_by(STORE) %>%

  summarise(

    control_avg_sales = mean(TOT_SALES),

    control_customer_count = n_distinct(CUSTOMER_ID)

  )

comparison <- trial_summary %>%

  left_join(control_summary, by = "STORE") %>%

  mutate(

    sales_change = (trial_avg_sales - control_avg_sales) / control_avg_sales * 100,

    customer_change = (trial_customer_count - control_customer_count) / control_customer_count * 100

  )

Visualize

R

Copy code

# Plot sales comparison

library(ggplot2)

ggplot(comparison, aes(x = STORE, y = sales_change)) +

  geom_bar(stat = "identity", fill = "steelblue") +

  labs(title = "Sales Change During Trial Period", x = "Store", y = "Percentage Change")

# Plot customer comparison

ggplot(comparison, aes(x = STORE, y = customer_change)) +

  geom_bar(stat = "identity", fill = "steelblue") +

  labs(title = "Customer Count Change During Trial Period", x = "Store", y = "Percentage Change")


3. Collate Findings

Summarize Insights

  1. Create a table summarizing:
  • Sales and customer percentage changes.
  • Statistical significance (if applicable).
  1. Highlight key observations:
  • Stores with significant positive/negative changes.
  • Impact of the trial on sales performance.

Code

R

Copy code

# Summarize results into a table

summary_table <- comparison %>%

  mutate(

    recommendation = ifelse(sales_change > 5 & customer_change > 5, "Rollout", "No Rollout")

  )

print(summary_table)


Deliverables

  1. Key Metrics:
  • Control store selection metrics.
  • Percentage changes in sales and customers.
  1. Visualizations:
  • Line charts comparing trial and control trends.
  • Bar plots showing percentage changes.
  1. Recommendation:
  • Store-level insights with a clear rollout recommendation.

Let me know if you'd like further help, such as conducting statistical tests (e.g., t-tests) or refining visualizations!

3 Here is your task

Here is your task

Julia has asked us to evaluate the performance of a store trial which was performed in stores 77, 86 and 88.

We have chosen to complete this task in R, however, you will also find Python to be a useful tool in this piece of analytics. We have also provided an R solution template if you want some assistance in getting through this Task.

To get started, use the QVI_data dataset below or your output from task 1 and consider the monthly sales experience of each store.

This can be broken down by:

  • total sales revenue
  • total number of customers
  • average number of transactions per customer


Create a measure to compare different control stores to each of the trial stores to do this write a function to reduce having to re-do the analysis for each trial store. Consider using Pearson correlations or a metric such as a magnitude distance e.g. 1- (Observed distance – minimum distance)/(Maximum distance – minimum distance) as a measure.

Once you have selected your control stores, compare each trial and control pair during the trial period. You want to test if total sales are significantly different in the trial period and if so, check if the driver of change is more purchasing customers or more purchases per customers etc.

As we are in the early stages of this analysis Zilinka has asked us to submit our initial findings, so please save your code as a .pdf file and upload it to unlock the example answer.  

Here are some resources to help you

QVI_data

Download the data file

QVI_data

Click to download file →

 

R Solution Template

Click to download file →

This file should be transferred to an R Markup (.Rmd)

Pro analytics Tip: While the data set would not normally be considered large some operations may still take some time to run.

This is normal and to be expected when dealing with data sets at Quantium. Whilst your analysis is based on the whole data set you may want to try some strategies to try running sample solutions on a smaller subset of data I.e. create a sample solution using some of the data while it uploads.

We think you've got everything you need for this task but if you're stuck and want a hand, drop us an email at admin@insidesherpa.com mentioning this task.


To evaluate the performance of the store trials (Stores 77, 86, and 88), we will follow these steps in R:


Step 1: Load and Inspect the Data

  1. Load the dataset QVI_data.csv.
  2. Inspect the structure and identify relevant columns for the analysis (e.g., STORE, TOT_SALES, CUSTOMER_ID, DATE).

Code

R

Copy code

# Load necessary libraries

library(tidyverse)

library(lubridate)

# Load the data

qvi_data <- read.csv("QVI_data.csv")

# Preview the data

glimpse(qvi_data)

summary(qvi_data)


Step 2: Define Metrics

For each store, compute:

  1. Total sales revenue.
  2. Total number of unique customers.
  3. Average number of transactions per customer.

Code

R

Copy code

# Convert DATE to datetime format

qvi_data$DATE <- as.Date(qvi_data$DATE, format = "%Y-%m-%d")

# Monthly metrics calculation

store_metrics <- qvi_data %>%

  group_by(STORE, month = floor_date(DATE, "month")) %>%

  summarise(

    total_sales = sum(TOT_SALES, na.rm = TRUE),

    total_customers = n_distinct(CUSTOMER_ID),

    avg_transactions_per_customer = n() / n_distinct(CUSTOMER_ID)

  )


Step 3: Control Store Selection

  1. Write a function to compute the similarity metric (Pearson correlation or magnitude distance).
  2. Apply the function to select control stores for each trial store.

Code

R

Copy code

# Define similarity function (using magnitude distance as an example)

calculate_similarity <- function(trial_store_data, potential_control_data) {

  trial_metrics <- trial_store_data %>% summarise(across(everything(), mean))

  control_metrics <- potential_control_data %>% summarise(across(everything(), mean))

 

  # Magnitude distance

  similarity <- 1 - abs((control_metrics - trial_metrics) / (max(control_metrics) - min(control_metrics)))

  return(similarity)

}

# Example for store 77

trial_store_data <- store_metrics %>% filter(STORE == 77)

control_candidates <- store_metrics %>% filter(STORE != 77)

# Calculate similarity for all potential control stores

similarities <- control_candidates %>%

  group_by(STORE) %>%

  summarise(similarity = calculate_similarity(trial_store_data, .))

# Select the most similar control store

control_store_77 <- similarities %>% arrange(desc(similarity)) %>% slice(1)


Step 4: Compare Trial and Control Pairs

  1. Compare total sales between the trial store and the selected control store during the trial period.
  2. Test for statistical significance (e.g., t-test).

Code

R

Copy code

# Define trial period

trial_period <- as.Date(c("2023-01-01", "2023-06-30"))

# Filter data for the trial and control stores

trial_data <- qvi_data %>%

  filter(STORE == 77, DATE >= trial_period[1], DATE <= trial_period[2])

control_data <- qvi_data %>%

  filter(STORE == control_store_77$STORE, DATE >= trial_period[1], DATE <= trial_period[2])

# Compare total sales

trial_sales <- trial_data %>% summarise(total_sales = sum(TOT_SALES))

control_sales <- control_data %>% summarise(total_sales = sum(TOT_SALES))

# T-test for statistical significance

t_test_result <- t.test(trial_data$TOT_SALES, control_data$TOT_SALES)


Step 5: Visualize Findings

  1. Plot sales trends for trial and control stores during the trial period.
  2. Use bar charts to compare total sales and customer counts.

Code

R

Copy code

# Plot sales trends

sales_trends <- qvi_data %>%

  filter(STORE %in% c(77, control_store_77$STORE), DATE >= trial_period[1], DATE <= trial_period[2]) %>%

  group_by(STORE, week = floor_date(DATE, "week")) %>%

  summarise(total_sales = sum(TOT_SALES))

ggplot(sales_trends, aes(x = week, y = total_sales, color = as.factor(STORE))) +

  geom_line() +

  labs(title = "Sales Trends During Trial Period", x = "Week", y = "Total Sales", color = "Store") +

  theme_minimal()

# Bar chart comparison

comparison_data <- data.frame(

  Store = c("Trial Store", "Control Store"),

  Total_Sales = c(trial_sales$total_sales, control_sales$total_sales)

)

ggplot(comparison_data, aes(x = Store, y = Total_Sales, fill = Store)) +

  geom_bar(stat = "identity") +

  labs(title = "Total Sales Comparison", x = "Store", y = "Total Sales") +

  theme_minimal()


Deliverables

  1. Key Metrics:
  • Similarity scores for control store selection.
  • Monthly metrics for trial and control stores.
  1. Visualizations:
  • Sales trends line chart.
  • Bar chart comparison.
  1. Insights:
  • Statistical significance of sales differences.
  • Drivers of change (e.g., more customers or transactions per customer).

Let me know if you need assistance with the implementation or interpretation of results!


4 Example Answer

Example Answer

Great work! Take a look at the example answer below to see how a professional would have attempted this task. Think about what you did well and how you can improve.

Example Answer

Click to download file →


5 Completion

Task Three: Analytics and commercial application

1 Task Overview

Task Overview

What you'll learn

  • Gain experience in preparing a client report based on data analysis.
  • Understand the "Pyramid Principles" framework for report structure.
  • Practice creating data visualizations and key callouts.
  • Develop skills in translating data into actionable insights and recommendations.

What you'll do

  • Use the Pyramid Principles framework for structuring the report.
  • Submit a report that incorporates data visualizations, key insights, and recommendations.

2 Here is the background information on your task

Here is the background information on your task

We suggest you complete Tasks 1 and 2 before proceeding with this task.

Task 3 is targeted specifically at building your ability to recognise commercial, actionable insights from your analysis and displaying it in a clear and concise way for your client, with minimal jargon. At Quantium, our analyst graduates sometimes work as what we like to call “hybrids” (a mix of analyst and consultant duties) so developing your presentation skills early is a huge win!

As both technical tasks 1 and 2 were open ended in terms of insights, this model answer will focus on the layout and the order of your inclusions, including where to include graphs, taglines, written insights and recommendations.

As part of Quantium’s retail analytics team, you have been conducting a range of analysis on transaction and purchase behaviour data to provide key recommendations to your client, the Category Manager of chips, who is putting together their strategic plan.

3 Here is your task

Here is your task

With our project coming to an end its time for us to send a report to Julia, based on our analytics from the previous tasks. We want to provide her with insights and recommendations that she can use when developing the strategic plan for the next half year.

As best practice at Quantium, we like to use the “Pyramid Principles” framework when putting together a report for our clients. If you are not already familiar with this framework you can find quick introductions on by searching form them on the internet.

For this report, we need to include data visualisations, key callouts, insights as well as recommendations and/or next steps.

We recommend you use a tool like PowerPoint (or similar) to create your report, we have also provided you a template to help get you started.

One way to create your visualisations (graphs, charts etc) is to save your output files from task 1 & 2 and create generate your charts in Excel. You may find it helpful to create chart templates however that is not essential. We are looking for consistency here – if a series is blue in one chart it needs to remain blue throughout the presentation. Once you have created the charts in your Excel file, paste them into your PowerPoint in the order that suits best.

When you have finished creating your report, remember to save it as a PDF to submit in the next page. Below, use the text input to write your cover email to the client you will send with the report.

Here are some resources to help you

Here are some useful resources on the "Pyramid Principles" framework:

A Real-Life Example of The Pyramid Principle In PowerPoint

Click to visit website →

I show you how I map the pyramid principle to a short presentation I created to research the question "how do you manage a millennial?"  The pyramid principle was created by Barbara Minto at McKinsey & Company to help structure ideas and create compelling presentations

Millennial Presentation: https://www.slideshare.net/slideshow/managing-millennials-fact-or-fiction-debunking-the-myths/142924725

100+ ConsultingPowerPoint Templates: https://strategyu.co/strategy-consulting-powerpoint-templates/


The Pyramid Principle

Click to visit website →


We have also attached a PowerPoint template that you might like to use to complete the task. Keep in mind the key considerations for a presentation:

  • Data literacy level of your audience
  • Table of contents / agenda
  • Problem statement / purpose
  • Overview and context
  • Content balance
  • Layout and content display
  • Summary / next steps

PowerPoint Template

Please feel free to use this template as a guide in preparing your presentation

Click to download file →

Subject: Retail Analytics Insights and Recommendations Report

Dear Julia,

I hope this message finds you well.

Please find attached the final report summarizing our analytics and recommendations for the Chips category. The report includes key insights derived from customer purchasing behaviors, trial store performance evaluations, and category-level overviews. Additionally, we have outlined actionable recommendations to support the strategic plan for the upcoming half year.

If you have any questions or need further details, feel free to reach out. We’re happy to provide additional clarification or deep dives into any specific area.

Looking forward to hearing your thoughts!

Best regards,
Jayoda Kulatunga
Quantium Retail Analytics Team

4 Now, submit your report here.

Now, submit your report here.


5 Example Answer

Example Answer

Great work! Take a look at the example answer below to see how a professional would have attempted this task. Think about what you did well and how you can improve.


Example Answer - Email to Client

Hi Julia,

Hope you are well.

I am pleased to advise that we have completed the analysis for the category, with a focus on consumer behavior and the trial store layouts. Please find attached the report for your review.

At a high level, we have found that:

  • Mainstream Young Singles & Couples remain the primary shoppers of chips
  • Opportunities have been identified with Young and Older Families
  • Trial store performance was increased as a result of the new store layout

We are looking forward to discussing these results further next week.

Warm regards,

(Your name)
Associate Analyst, Global Markets

quantium.com.au 
linkedin.com/company/quantium 

Level 25, 8-12 Chifley Square, Sydney New South Wales 2000

Example Answer - Report

Click to download file →


6 Completion

Finish Line:

1 Resume Snippet

Resume Snippet

Take your updated resume and apply for Jobs , Programs , Events  and Talent Networks .

Quantium Data Analytics Job Simulation on Forage - December 2024

  • Completed a job simulation focused on Data Analytics and Commercial Insights for the data science team.
  • Developed expertise in data preparation and customer analytics, utilizing transaction datasets to extract valuable insights and deliver data-driven commercial recommendations.
  • Extended analytical capabilities to identify benchmark stores for conducting uplift testing on trial store layouts, enabling evidence-based decision-making.
  • Leveraged acquired data analytics and insights from previous tasks to create comprehensive reports for the Category Manager, facilitating informed strategic decisions and enhancing commercial applications.

Use our resume guidance here

2 Interview Tip

Interview Tip

In a typical interview you’ll be asked “why are you interested in this role?” or “why are you interested in working at our company?”. Use this interview tip to explain why you want the job.

“Why are you interested in this role?”

I recently participated in Quantium's job simulation on the Forage platform, and it was incredibly useful to understand what it might be like to participate on a data science team at Quantium.

I worked on a project to conduct analyses on a client's transaction dataset and identify customer purchasing behaviours to generate insights and provide commercial recommendations. I practised using R and Python and built my Data Visualisation skills in a real-world context.

Doing this program confirmed that I really enjoy working on data preparation and customer analytics, and I'm excited to apply these skills on a data science team at a company like Quantium.