Introduction
A fast-food chain wanted to launch a new menu item. To choose the best marketing strategy, they used A/B testing. They tried three different promotions in different places and tracked sales for four weeks. This helped them find the most effective way to promote their new product.
Main Challenge
Collecting and analyzing data to determine the most suitable statistical test, implementing A/B testing on control and treatment groups to identify the most effective promotion technique for the new product.
Project Background
The project focuses on implementing an A/B test using various Python data analysis and experimental design tools to draw final conclusions on the most effective promotion techniques by analyzing their impact on sales.
Industry Context
The dataset is sourced from Kaggle and pertains to the fast-food industry, specifically focusing on marketing and sales performance.

This industry is highly competitive, with companies constantly seeking effective strategies to boost sales and attract customers. The dataset provides valuable insights into various marketing campaigns and their impact on sales, offering a practical foundation for analyzing promotional strategies and optimizing marketing efforts in this sector.
Specific Challenges Faced
– Preparing the dataset and making sure It’s ready for the EDA (Exploratory data analysis)
– Determining which test fits the dataset best (parametric or non-parametric test …)
Objectives
– Implement A/B Testing: develop and execute an A/B testing framework to compare three different marketing campaigns for a new fast-food item.
– Analyze Sales Impact: utilize statistical analysis to determine which marketing campaign has the most significant effect on weekly sales.
– Ensure Data Integrity: collect and validate sales data from multiple market locations to ensure accuracy and reliability.
– Provide Actionable Insights: generate clear, actionable insights and recommendations based on the analysis to guide future marketing strategies.
Methodology
Data Collection Process
The dataset used for this project is derived from the Kaggle source: Fast Food Marketing Campaign A\B Test, originally from IBM Watson Analytics Marketing Campaign.
Tools and Technologies Used
– Python.
– Jupyter notebook.
– Python Libraries (pandas, matplotlib.pyplot , scipy.stats, seaborn, scikit_posthocs).
🏅Acknowledgment
This project leverages the work of AICHA Brihmouche, the owner of the GitHub repository CodeAlpha_AB_Testing_Analysis. The repository serves as an essential resource, offering the dataset and the notebook file that streamlines the development process.
Step-by-Step Approach
1. Setup Python environment and install necessary libraries.
2. Download and load the dataset file WA_Marketing-Campaign.csv.
3. Explore and prepare the dataset (check for null values , imputing …)
4. Perform EDA “Exploratory Data Analysis” visualizing the relationships between each promotion and the sales rate .
5. Define the hypotheses (H0/ H1) , and choose the right test to perform.
6. Analyse the metrics (p-value …) and draw final conclusions to either confirm or reject the null hypothesis .
Challenges Encountered
- Choosing the Appropriate Statistical Test: Deciding on the most suitable statistical test for comparing sales data between different marketing campaigns, given that the data distributions were not normal.
- Data Consistency: Ensuring that the sales data collected from various market locations was consistent and free from biases or errors.
How These Were Overcome
– Test Selection: Chose the Kruskal-Wallis test as a non-parametric alternative to ANOVA to handle non-normal distributions and accurately assess differences between groups.
– Data Validation: Implemented rigorous data cleaning and validation processes to ensure the accuracy and consistency of the collected sales data.
Results and Impact
- Quantifiable Outcomes
– Identified the marketing campaign with the highest impact on sales based on the analysis of weekly sales data across different locations “promotion 1“.
– Provided statistically significant evidence regarding the effectiveness of each promotional strategy.
- Key Performance Indicators
– Sales performance metrics before and after implementing each marketing campaign.
– Statistical significance of the differences in sales across the different campaigns.
- Business Impact
– Enabled the fast-food chain to make data-driven decisions about which marketing campaign is most effective, potentially increasing the return on investment for promotional efforts.
Lessons Learned
- insights Gained
– The importance of selecting the appropriate statistical test based on the distribution of the data to ensure valid results.
– The need for meticulous data collection and validation to avoid biases and inaccuracies in the analysis.
- Potential for Future Applications
– Expansion of the A/B testing framework to include additional marketing variables or other product lines.
– Use of advanced statistical methods or machine learning techniques for deeper insights and more refined analyses.
Conclusion
This project successfully applied A/B testing, utilizing the Kruskal-Wallis test to evaluate non-normal data distributions and identify the most effective promotional campaign for a fast-food chain. The analysis provided actionable insights, enabling the company to optimize its marketing strategies and maximize sales.
🌟For more in-depth case studies and resources on data-driven marketing strategies, explore more content on Around Data Science. Dive deeper into specific topics, discover cutting-edge applications, and stay updated on the latest advancements in the field. Subscribe to our newsletter to receive regular updates and be among the first to know about exciting new resources, like our first upcoming free eBook on Artificial Intelligence for All! Don’t miss out !
Welcome to a world where data reigns supreme, and together, we’ll unravel its intricate paths.




