• Portfolio project
  • Synthetic dataset
  • Marketing Analytics

Marketing mix modelling and budget allocation analysis

A portfolio marketing mix model that estimates each channel's contribution to revenue from two years of weekly data and tests how a fixed budget could be reallocated.

Project type
Portfolio project
Dataset
Synthetic dataset
Dataset provenance
A synthetic weekly e-commerce marketing dataset (January 2023 to December 2024) created for modelling and budget-optimisation practice.
Client status
Demonstration analysis; does not represent a PA Data Analytics client.
MONTHLY REVENUEModel-fittedActual$0.6M$1.0M2023-01: actual $780,659, model-fitted $777,9402023-02: actual $756,909, model-fitted $756,3382023-03: actual $724,723, model-fitted $728,0512023-04: actual $705,401, model-fitted $705,1562023-05: actual $945,021, model-fitted $952,0832023-06: actual $752,169, model-fitted $730,9202023-07: actual $873,979, model-fitted $891,5472023-08: actual $791,576, model-fitted $790,1582023-09: actual $729,243, model-fitted $724,5182023-10: actual $894,399, model-fitted $913,6452023-11: actual $933,780, model-fitted $924,6182023-12: actual $948,259, model-fitted $952,0402024-01: actual $846,935, model-fitted $858,9172024-02: actual $794,305, model-fitted $805,7142024-03: actual $766,408, model-fitted $763,6472024-04: actual $948,479, model-fitted $936,6722024-05: actual $789,934, model-fitted $797,6692024-06: actual $787,235, model-fitted $784,7892024-07: actual $928,345, model-fitted $942,9262024-08: actual $826,781, model-fitted $803,0612024-09: actual $963,461, model-fitted $963,2772024-10: actual $752,190, model-fitted $763,5462024-11: actual $978,515, model-fitted $975,4352024-12: actual $1,004,106, model-fitted $980,147Jan 2023Jan 2024Dec 2024Portfolio project · Synthetic dataset · R² 0.957 in-sample
Chart drawn from the project's own outputs · Synthetic dataset · portfolio project.
View the data behind this chart
MonthActual revenueModel-fitted revenue
2023-01$780,659$777,940
2023-02$756,909$756,338
2023-03$724,723$728,051
2023-04$705,401$705,156
2023-05$945,021$952,083
2023-06$752,169$730,920
2023-07$873,979$891,547
2023-08$791,576$790,158
2023-09$729,243$724,518
2023-10$894,399$913,645
2023-11$933,780$924,618
2023-12$948,259$952,040
2024-01$846,935$858,917
2024-02$794,305$805,714
2024-03$766,408$763,647
2024-04$948,479$936,672
2024-05$789,934$797,669
2024-06$787,235$784,789
2024-07$928,345$942,926
2024-08$826,781$803,061
2024-09$963,461$963,277
2024-10$752,190$763,546
2024-11$978,515$975,435
2024-12$1,004,106$980,147

01Business question

When most of a marketing budget goes to one channel, is that because the channel earns it, or because of habit? In this dataset, Paid Search received 54% of paid spend (about $10,281 a week) and Email 4.5% (about $855 a week). This project asks whether each channel's estimated contribution to revenue supports that split.

02Dataset & context

Dataset: Synthetic / Demonstration Dataset. This portfolio analysis uses a synthetic weekly marketing dataset covering 104 weeks from January 2023 to December 2024. The dataset contains weekly revenue and marketing spend across four paid channels (about $19,049 a week in total) and was created for modelling and budget-optimisation practice. It does not represent a PA Data Analytics client.

03Approach

Marketing mix modelling works from aggregated weekly data rather than user-level tracking. It estimates how much revenue each channel contributes, allowing for delayed and diminishing effects, and can then be used to search for a better allocation of the same total budget.

04Methodology

  • Adstock transformation to capture the carry-over effect of spend into later weeks. Decay rates are assumptions based on typical channel behaviour, not measured values.
  • Seasonality terms and event dummies, including a January indicator.
  • Saturation (Hill) curves to model diminishing returns as spend increases.
  • OLS regression with full diagnostics, and Ridge regression to handle correlated channels.
  • Channel contribution decomposition and ROAS per channel.
  • Constrained optimisation (SciPy SLSQP) holding total weekly spend constant.

05Modelling & analysis

The model explained most of the week-to-week variation in the dataset's revenue (R² = 0.957). This is an in-sample fit and is not a measure of forecast accuracy.

Out-of-sample performance: 5-fold cross-validated R² = 0.761 (± 0.144). Standard k-fold validation is not chronological, so a time-series validation would be a stricter test. The model's budget recommendations should therefore be treated as directional.

Model output: in this dataset, Email had a modelled ROAS of 44.10x on a relatively small budget, compared with 3.00x for Paid Search. A high modelled ROAS on a small budget does not necessarily mean returns will stay at the same level as spend increases. The budget-reallocation analysis therefore uses saturation curves and allocation constraints rather than simply shifting spend towards the channel with the highest ROAS. Paid Search's effect was also not statistically significant in the OLS model (p = 0.107), so its ROAS estimate is less certain than the others.

Dataset finding: the model estimated an average January effect of approximately −$14,760 per week (p < 0.0001), applied across the January weeks of both years in the dataset.

06Results within the dataset

Model projection. Applying the optimised allocation to the same weekly budget, the model projects weekly revenue rising from about $104,474 to $113,346 (+$8,871, or 8.5%), roughly $461,310 a year, with no increase in total spend. This is a projection from the model on synthetic data, not a result achieved by any business.

07What this analysis demonstrates

How marketing mix modelling can test whether a budget split matches each channel's estimated contribution, how saturation changes the answer compared with ranking channels by ROAS, and how a recurring seasonal pattern such as a January dip can be quantified. It also shows why in-sample fit should be reported alongside out-of-sample performance.

08How a business could use this analysis

  • Check whether the current budget split is supported by evidence.
  • Move budget in stages and measure the effect, rather than applying a model's allocation all at once.
  • Validate channel effects and adstock assumptions with incrementality or geo tests.
  • Plan around predictable seasonal dips, for example by shifting to retention activity.

09Related service

This project demonstrates methods used in our marketing analytics services.

10Apply this to your data

If you are facing a similar question, we can look at what your data can support and what a useful answer would look like.

More case studies

SHARE OF REVENUE CREDITShapleyLast ClickPaid SearchPaid Search: 35.6% of credit under Last ClickPaid Search: 41.9% of credit under Shapley35.6%41.9%DirectDirect: 8.4% of credit under Last ClickDirect: 51.9% of credit under Shapley8.4%51.9%EmailEmail: 18.9% of credit under Last ClickEmail: 0.0% of credit under Shapley18.9%0%Paid SocialPaid Social: 15.0% of credit under Last ClickPaid Social: 6.2% of credit under Shapley15%6.2%InfluencerInfluencer: 7.6% of credit under Last ClickInfluencer: 0.0% of credit under Shapley7.6%0%Portfolio project · Synthetic dataset
  • Portfolio project
  • Synthetic dataset
  • Marketing Analytics

Comparing five attribution models to understand channel contribution

A portfolio analysis that builds five attribution models on the same customer journeys, to show how much a channel's credit depends on the model chosen.

Synthetic dataset: 11,292 touchpoints · 3,500 customers · 5 models

Read the attribution case study
USERS AT EACH FUNNEL STEPProduct viewProduct view: 61,252 users61,252Add to cartAdd to cart: 12,545 users12,545Begin checkoutBegin checkout: 9,715 users9,715Shipping infoShipping info: 9,714 users9,714Payment infoPayment info: 5,751 users5,751PurchasePurchase: 4,419 users4,41920.5% of viewersadded to cart40.8% drop-offat payment stepPortfolio project · Public GA4 sample dataset
  • Portfolio project
  • Public dataset
  • Marketing Analytics

E-commerce funnel and commercial performance analysis (GA4)

A portfolio analysis of Google's public GA4 sample e-commerce data that locates funnel drop-offs and compares performance by device and traffic source.

Public dataset: 270,154 users · 354,970 sessions · $362,165 revenue

Read the e-commerce funnel case study

Let's turn your data into your next decision.

Tell us what you are trying to understand: marketing performance, customer retention, forecasting or reporting. We will reply with practical next steps.

Prefer email? [email protected]