OLS vs Bayesian Decomposition
Overview
MixModeler supports two decomposition types based on your model's estimation method: OLS (Ordinary Least Squares) and Bayesian. Both produce the same chart format but use different coefficient estimates.
Purpose: Choose the appropriate decomposition method based on your model type and analytical needs.
Key Differences
Uses
Point estimates from OLS regression
Posterior means from MCMC samples
Coefficients
Single deterministic value
Average of posterior distribution
Uncertainty
Standard errors
Credible intervals (not shown in chart)
Calculation
Instant
Based on MCMC samples
Priors
None
Can incorporate prior information
Both produce identical chart formats - the difference is which coefficients are used to calculate contributions.
How Each Works
OLS Decomposition
Calculation:
Contribution = β_OLS × Variable Value
Where β_OLS is the coefficient from OLS regressionExample:
- TV coefficient from OLS: 2.5 
- TV spend in Week 1: $10,000 
- TV contribution: 2.5 × $10,000 = $25,000 
Characteristics:
- Single point estimate 
- Deterministic result 
- Fast calculation 
- Standard approach 
Bayesian Decomposition
Calculation:
Contribution = E[β|Data] × Variable Value
Where E[β|Data] is the posterior mean from Bayesian inferenceExample:
- TV posterior mean: 2.3 (average of MCMC samples) 
- TV spend in Week 1: $10,000 
- TV contribution: 2.3 × $10,000 = $23,000 
Characteristics:
- Posterior mean estimate 
- Based on probability distribution 
- Incorporates uncertainty 
- Can use prior information 
When to Use OLS Decomposition
Default Choice:
- Standard MMM analysis 
- Most common approach 
- Well-understood methodology 
Best When:
- Sufficient data (50+ observations) 
- Clear relationships in data 
- No strong prior information 
- Speed matters 
- Stakeholders prefer simplicity 
Advantages:
- Fast and straightforward 
- Easy to explain 
- Widely accepted 
- No need to explain priors 
When to Use Bayesian Decomposition
Special Situations:
- Limited data available 
- High noise in data 
- Want to incorporate prior knowledge 
- Need uncertainty quantification 
Best When:
- Sample size is small 
- Weak signals in data 
- Have industry benchmarks to use as priors 
- Hierarchical or regional models 
- Conservative estimates preferred 
Advantages:
- Handles small samples better 
- Can use prior information 
- Provides uncertainty measures 
- More stable with limited data 
Selecting Decomposition Type
In Decomposition Page:
Toggle Between:
- OLS Mode (📊 icon) 
- Bayesian Mode (🎯 icon) 
Indicator Shows:
- Current selection 
- Icon and label 
- Model type compatibility 
Prerequisites:
- OLS: Model must be fitted with OLS 
- Bayesian: Bayesian inference must be run 
Comparing Results
Run Both to Compare:
- Fit model with both OLS and Bayesian 
- Run OLS decomposition 
- Run Bayesian decomposition 
- Compare contributions 
What to Check:
Similar Results (Expected):
- With non-informative priors, results should be close 
- Validates model robustness 
- Proceed with confidence 
Different Results:
- Check why (priors, data, model) 
- Understand which is more appropriate 
- Consider reporting both 
Interpreting Differences
Small Differences (<10%):
- Normal variation 
- Both methods agree 
- Use either method 
Moderate Differences (10-30%):
- Priors may be influencing Bayesian 
- Check if priors are appropriate 
- Consider reporting range 
Large Differences (>30%):
- Investigate model specification 
- Review prior settings 
- Check data quality 
- May indicate instability 
Impact on Business Decisions
Decision Alignment:
- Do both methods rank channels the same? 
- Would recommendations change? 
- Which is more credible for your situation? 
If Decisions Differ:
- Bayesian often more conservative 
- OLS may show extreme values 
- Consider business context 
- Use sensitivity analysis 
If Decisions Align:
- Robust findings 
- High confidence 
- Proceed with either 
Technical Notes
Contribution Calculation:
OLS:
For each time period:
Group Contribution = Σ (β_OLS_i × X_i)
Where i = variables in the groupBayesian:
For each time period:
Group Contribution = Σ (E[β_i|Data] × X_i)
Where i = variables in the groupBoth Sum to Predicted:
- Total contributions = Predicted KPI 
- Maintains consistency 
- Validates calculations 
Reporting Considerations
For OLS:
- "Decomposition based on OLS regression" 
- "Point estimate contributions" 
- Standard and straightforward 
For Bayesian:
- "Decomposition using Bayesian posterior means" 
- "Incorporating prior information" (if used) 
- "Conservative estimates" 
Presenting Both:
- "Range of estimates" 
- "Sensitivity analysis" 
- "OLS and Bayesian comparison" 
Common Questions
Q: Which is more accurate?
A: Neither is universally more accurate. OLS is unbiased with sufficient data. Bayesian can be better with limited data or when priors are informative.
Q: Do I need to run both?
A: No. Choose based on your model type. Running both is optional for validation.
Q: Can results be very different?
A: With good data and non-informative priors, results are usually similar. Large differences suggest checking model specification.
Q: Which should I present to stakeholders?
A: OLS is typically simpler to explain. Use Bayesian if you need to explain uncertainty or used strong priors.
Q: Does one give better ROI estimates?
A: ROI calculation is the same (contribution/spend). The contribution values may differ slightly, affecting ROI slightly.
Best Practices
Start with OLS:
- Default choice 
- Establish baseline 
- Build understanding 
Add Bayesian If:
- OLS results seem unstable 
- Want uncertainty quantification 
- Have reliable priors 
- Data is limited 
Document Choice:
- State which method used 
- Explain why 
- Note any differences if both run 
Validate:
- Check if results make business sense 
- Compare to known campaign effects 
- Verify against other data sources 
Summary
Choose Based On:
Use OLS When:
- Standard analysis 
- Sufficient data 
- No strong priors 
- Stakeholder preference 
Use Bayesian When:
- Limited data 
- Informative priors available 
- Uncertainty matters 
- Hierarchical models 
Both Are Valid:
- Neither is "better" universally 
- Context determines appropriateness 
- Results often similar with good data 
- Use what fits your situation best 
Last updated