<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="/rss.xsl" type="text/xsl"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Li Tan — Essays</title><description>Essays on data, experimentation, causal inference, and AI-augmented analytics.</description><link>https://litananalytics.com/</link><language>en-us</language><copyright>Li Tan</copyright><item><title>The Hallucinations Hiding in My Pipeline</title><link>https://litananalytics.com/blog/ai-hallucinations-in-pipelines/</link><guid isPermaLink="true">https://litananalytics.com/blog/ai-hallucinations-in-pipelines/</guid><description>AI writes code that looks right. Sometimes it is. Often it is not. Your job is to catch it. The AI is only as good as you are at reviewing it.</description><pubDate>Fri, 10 Apr 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Last month I asked Claude to write a dbt model for me. The SQL looked clean. The join made sense. I shipped it.&lt;/p&gt;
&lt;p&gt;Three weeks later I found out it was silently dropping 8% of the rows. An &lt;code&gt;INNER JOIN&lt;/code&gt; where I needed a &lt;code&gt;LEFT JOIN&lt;/code&gt;. Nobody caught it. The dashboard kept looking fine because the missing 8% happened to not move the top-line number much.&lt;/p&gt;
&lt;p&gt;This is the problem with AI in data work. It does not know what it does not know. And it sounds confident either way.&lt;/p&gt;
&lt;h2&gt;Where it bites me&lt;/h2&gt;
&lt;p&gt;Two places, every week.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ETL.&lt;/strong&gt; Joins on the wrong key. Filters that look right but silently drop edge cases. Type conversions that cast a timestamp to a date and kill the timezone. Window functions that use &lt;code&gt;ORDER BY&lt;/code&gt; in a way that is &quot;correct&quot; but not what you meant. The code runs. The numbers come back. They look fine. They are not fine.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Modeling.&lt;/strong&gt; Feature engineering with leakage. &quot;Cross-validation&quot; written in a way that sees future data. A regression that drops rows with nulls without telling you. A metric computed on a different grain than the label. The model trains. The AUC is high. It will fail on real data and you will find out in production.&lt;/p&gt;
&lt;p&gt;The common thread: &lt;strong&gt;plausibility is not correctness&lt;/strong&gt;. AI has gotten very good at plausible. A wrong answer that reads well is more dangerous than a wrong answer that reads badly, because you skip the review.&lt;/p&gt;
&lt;h2&gt;Your review is the whole job now&lt;/h2&gt;
&lt;p&gt;Here is what I keep telling junior people on my team:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The AI is only as good as you are at reviewing it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;A senior person with AI ships 10x faster. A junior person with AI ships 10x the bugs. Same tool, opposite outcome. The difference is not the prompt. It is the eye.&lt;/p&gt;
&lt;p&gt;When I review AI output I do the same things I would do for any untrusted intern:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Read every line.&lt;/strong&gt; Not skim. Read. Say what it does in my own words.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Run it on a known case.&lt;/strong&gt; One I already know the answer to. Does it match?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Check row counts before and after.&lt;/strong&gt; Surprisingly often, the bug is right there.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Look for silent failures.&lt;/strong&gt; Missing keys, dropped nulls, implicit casts. These never throw. They just eat your data.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ask &quot;what did this assume&quot;.&lt;/strong&gt; AI makes assumptions. It will not tell you. You have to dig them out.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This takes time. It is the job.&lt;/p&gt;
&lt;h2&gt;The new skill&lt;/h2&gt;
&lt;p&gt;People talk about prompt engineering like it is the thing to learn. It is not. The thing to learn is faster error detection. How quickly can you spot the lie in a page of generated code? How quickly can you feel the wrongness in a plausible-looking number?&lt;/p&gt;
&lt;p&gt;That skill is not new. It is the old skill — reading code, knowing your data, having taste. The AI just raises the stakes. You now produce more code per day, which means more chances to be wrong per day.&lt;/p&gt;
&lt;p&gt;I still use AI every day. I would not go back. But I have stopped treating its output as an answer. I treat it as a first draft from an intern who is very fast, very articulate, and sometimes completely wrong. My job is the red pen.&lt;/p&gt;
&lt;p&gt;If you are not running that red pen, the AI is not helping you. It is just helping you be confidently incorrect, faster.&lt;/p&gt;
</content:encoded><category>AI</category><category>Data Engineering</category><category>Review</category><author>li.tan83033@gmail.com (Li Tan)</author></item><item><title>Beyond A/B Testing: How I Analyze Real Product Impact Without an Experiment</title><link>https://litananalytics.com/blog/beyond-ab-testing/</link><guid isPermaLink="true">https://litananalytics.com/blog/beyond-ab-testing/</guid><description>When you cannot randomize, causal inference still gets you closer to the truth. Here is my playbook.</description><pubDate>Sat, 26 Jul 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;In an ideal world, every product change would be tested with a randomized controlled trial. Reality is messier. Sometimes you cannot randomize — the feature already shipped to everyone, legal will not let you hold out a group, or the sample is too small for the test to have any power.&lt;/p&gt;
&lt;p&gt;When I am in that situation, I go to quasi-experimental methods. Here is my playbook.&lt;/p&gt;
&lt;h2&gt;The problem with observational data&lt;/h2&gt;
&lt;p&gt;The hard problem is &lt;strong&gt;confounding&lt;/strong&gt;. People who use a new feature are not the same as people who do not. Maybe they are more engaged, more tech-savvy, or signed up during a specific campaign. Comparing adopters and non-adopters tells you almost nothing about the feature itself.&lt;/p&gt;
&lt;p&gt;I see teams make this mistake a lot. They announce a &quot;win&quot; that is really just selection bias. Nobody checks.&lt;/p&gt;
&lt;h2&gt;Method 1 — Difference-in-Differences&lt;/h2&gt;
&lt;p&gt;When a feature rolls out at different times to different groups — say, by region or by platform — DiD can work well. The key assumption is &lt;strong&gt;parallel trends&lt;/strong&gt;: treated and control groups would have moved together without the treatment.&lt;/p&gt;
&lt;p&gt;Always plot the pre-trends. If they are not parallel, DiD will mislead you. As the slider above shows, even small violations produce meaningful bias in the naive comparison.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Simplified DiD
import statsmodels.formula.api as smf

model = smf.ols(&quot;outcome ~ treated * post + C(group) + C(time)&quot;, data=df)
results = model.fit()
# The treated:post coefficient is your treatment effect
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Method 2 — Synthetic control&lt;/h2&gt;
&lt;p&gt;When you have one treated unit and many possible controls, synthetic control builds a weighted mix of the controls that best matches the treated unit before the intervention. Then you measure the gap after.&lt;/p&gt;
&lt;p&gt;I use this a lot for geo experiments. It handles the noise of real markets better than a simple comparison.&lt;/p&gt;
&lt;h2&gt;Method 3 — Regression discontinuity&lt;/h2&gt;
&lt;p&gt;If treatment is assigned by a threshold (e.g., users above some engagement score get the feature), RD uses the jump at the threshold. Users just above and just below the cutoff are nearly identical, so you get local randomization for free.&lt;/p&gt;
&lt;p&gt;This one is underused. A lot of product features have natural cutoffs that nobody exploits.&lt;/p&gt;
&lt;h2&gt;When to use what&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Method&lt;/th&gt;
&lt;th&gt;Best when&lt;/th&gt;
&lt;th&gt;Key assumption&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;DiD&lt;/td&gt;
&lt;td&gt;Staggered rollout&lt;/td&gt;
&lt;td&gt;Parallel trends&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Synthetic Control&lt;/td&gt;
&lt;td&gt;Single treated unit&lt;/td&gt;
&lt;td&gt;Pre-treatment fit&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RD&lt;/td&gt;
&lt;td&gt;Assignment cutoff&lt;/td&gt;
&lt;td&gt;Continuity at cutoff&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2&gt;Which method fits your case?&lt;/h2&gt;
&lt;p&gt;Answer a few questions below and I&apos;ll point you at the one that fits.&lt;/p&gt;
&lt;h2&gt;Bottom line&lt;/h2&gt;
&lt;p&gt;No method is perfect. The best you can do is combine several and see if they tell a consistent story. When they disagree, that is usually where the interesting learning happens — it means you are missing something about the underlying dynamics, and the disagreement is a hint about what.&lt;/p&gt;
</content:encoded><category>Causal Inference</category><category>Experimentation</category><category>Product Analytics</category><author>li.tan83033@gmail.com (Li Tan)</author></item><item><title>From Insights to Actions</title><link>https://litananalytics.com/blog/from-insights-to-actions/</link><guid isPermaLink="true">https://litananalytics.com/blog/from-insights-to-actions/</guid><description>The hardest part of analytics is not finding the insight. It is getting someone to act on it.</description><pubDate>Wed, 21 May 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;The hardest part of analytics is not finding the insight. It is getting someone to act on it.&lt;/p&gt;
&lt;h2&gt;The dead-slide problem&lt;/h2&gt;
&lt;p&gt;Every analyst has been here. You spend two weeks on a careful analysis. You present. Everyone nods. Nothing changes.&lt;/p&gt;
&lt;p&gt;I have watched this happen many times. Including with my own work. Here is why it keeps happening.&lt;/p&gt;
&lt;h3&gt;The insight has no context&lt;/h3&gt;
&lt;p&gt;&quot;Retention dropped 5%.&quot; OK. So what?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Is that normal for this season?&lt;/li&gt;
&lt;li&gt;How does it compare to competitors?&lt;/li&gt;
&lt;li&gt;What is it in dollars?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Data does not speak. You have to frame it in something the audience actually cares about — revenue, cost, a strategic goal.&lt;/p&gt;
&lt;h3&gt;There is no owner&lt;/h3&gt;
&lt;p&gt;&quot;Someone should look into this.&quot; This is where insights go to die.&lt;/p&gt;
&lt;p&gt;If there is no specific person accountable for doing something, nothing happens. End every analysis with a recommendation and a named owner. Even when it feels awkward to point at someone, do it.&lt;/p&gt;
&lt;h3&gt;Too many findings&lt;/h3&gt;
&lt;p&gt;Twenty bullet points dilute everything. Execs have limited bandwidth. They cannot act on all of it.&lt;/p&gt;
&lt;p&gt;Pick the 1–3 that matter most. Lead with those. Put the rest in the appendix if you have to keep it.&lt;/p&gt;
&lt;h2&gt;ARIA&lt;/h2&gt;
&lt;p&gt;I use a short checklist before I present any insight.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;A&lt;/strong&gt;ctionable — can someone actually do something about it?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;R&lt;/strong&gt;elevant — does it connect to a current priority?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;I&lt;/strong&gt;mpactful — is the number big enough to matter?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A&lt;/strong&gt;ssigned — is there an owner and a timeline?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If it fails any of these, it is not ready.&lt;/p&gt;
&lt;h2&gt;Playing the long game&lt;/h2&gt;
&lt;p&gt;Driving action is not about one great analysis. It is about credibility that accumulates:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Start small. Prove value on quick wins before tackling big questions.&lt;/li&gt;
&lt;li&gt;Follow up. Did the recommendation actually get implemented? What happened?&lt;/li&gt;
&lt;li&gt;Be honest about uncertainty. People trust analysts who admit what they do not know.&lt;/li&gt;
&lt;li&gt;Learn the business. The best analysts understand operations, not just data.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The goal is not to be right. The goal is to make the business better. Sometimes that means accepting — a &quot;good enough&quot; analysis that actually changes behavior is worth more than a perfect one that gets ignored.&lt;/p&gt;
</content:encoded><category>Strategy</category><category>Communication</category><category>Leadership</category><author>li.tan83033@gmail.com (Li Tan)</author></item><item><title>A Few Thoughts on DMA Tests</title><link>https://litananalytics.com/blog/dma-tests/</link><guid isPermaLink="true">https://litananalytics.com/blog/dma-tests/</guid><description>Geo tests are one of the most powerful tools for measuring marketing lift. They are also easy to get wrong. Some notes from the field.</description><pubDate>Wed, 21 May 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;DMA tests — experiments at the Designated Market Area level — are one of the most powerful tools for measuring marketing incrementality. They are also easy to screw up. Here are the lessons I paid for.&lt;/p&gt;
&lt;h2&gt;Why DMA tests&lt;/h2&gt;
&lt;p&gt;User-level attribution is narrow. It misses a lot: word of mouth, cross-device conversions, brand effects that show up weeks later.&lt;/p&gt;
&lt;p&gt;DMA tests catch more of the full picture. You treat whole markets, not cookies, so you pick up:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Brand lift that takes weeks to show&lt;/li&gt;
&lt;li&gt;Cross-device conversions&lt;/li&gt;
&lt;li&gt;Social and word-of-mouth spillover&lt;/li&gt;
&lt;li&gt;The full funnel from awareness to purchase&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is why I keep going back to them, even though they are a pain.&lt;/p&gt;
&lt;h2&gt;Common ways to mess this up&lt;/h2&gt;
&lt;h3&gt;Not enough markets&lt;/h3&gt;
&lt;p&gt;Power in geo tests comes from the number of geo units, not total users. With 20 DMAs you need a huge effect to see anything.&lt;/p&gt;
&lt;p&gt;Rule of thumb: at least 50 markets. Ideally 100. I know this limits the channels you can test. Underpowered tests are worse than no test — you get a non-answer you then defend.&lt;/p&gt;
&lt;h3&gt;Spillover between markets&lt;/h3&gt;
&lt;p&gt;People travel. Digital ads ignore borders. If your &quot;holdout&quot; market is leaking treatment, your estimate shrinks toward zero.&lt;/p&gt;
&lt;p&gt;What I do: buffer zones, exclude border DMAs, or model the spillover explicitly. I have learned to be paranoid.&lt;/p&gt;
&lt;h3&gt;Ignoring seasonality&lt;/h3&gt;
&lt;p&gt;A November test tells you little about February. Marketing effects move with the calendar.&lt;/p&gt;
&lt;p&gt;Run long enough to cover a cycle. Or use methods that handle seasonality directly.&lt;/p&gt;
&lt;h2&gt;Why I prefer synthetic control&lt;/h2&gt;
&lt;p&gt;Simple treatment-vs-control comparisons work sometimes. But markets are heterogeneous and trends differ by region, so the comparison is usually noisy.&lt;/p&gt;
&lt;p&gt;Synthetic control builds a weighted mix of untreated markets that best matches the treated market &lt;em&gt;before&lt;/em&gt; the campaign. Then you measure the gap after.&lt;/p&gt;
&lt;p&gt;It handles:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Different baselines across markets&lt;/li&gt;
&lt;li&gt;Region-specific trends&lt;/li&gt;
&lt;li&gt;Noisy outcomes&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I get much cleaner reads from synthetic control than from naive DiD for geo tests.&lt;/p&gt;
&lt;h2&gt;What I would tell a new analyst&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;More markets beats more users per market.&lt;/li&gt;
&lt;li&gt;Design for spillover from day one. Not as an afterthought.&lt;/li&gt;
&lt;li&gt;Pre-register the analysis. Stops you from p-hacking yourself later.&lt;/li&gt;
&lt;li&gt;Try synthetic control before DiD.&lt;/li&gt;
&lt;li&gt;Run a power calculation. Every time.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If you skip the power calc, you are setting yourself up for an inconclusive result you will then have to explain.&lt;/p&gt;
</content:encoded><category>Geo Experiments</category><category>Marketing Analytics</category><category>Incrementality</category><author>li.tan83033@gmail.com (Li Tan)</author></item><item><title>Is AI Ready to Replace Marketing Data Analysts?</title><link>https://litananalytics.com/blog/ai-replace-analysts/</link><guid isPermaLink="true">https://litananalytics.com/blog/ai-replace-analysts/</guid><description>Every week another headline says yes. I use AI every day. Here is my honest take.</description><pubDate>Tue, 20 May 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Every week there is a new headline about AI replacing analysts. I use AI tools every day. My own output has maybe doubled because of them. So here is my honest take.&lt;/p&gt;
&lt;h2&gt;What AI is actually good at&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Summarizing data.&lt;/strong&gt; Give it a CSV, it can tell you the trends, the outliers, the patterns — faster than I can eyeball them. I use this a lot in the first hour of any new project.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Writing code.&lt;/strong&gt; SQL, Python, viz — 30–40% faster for routine stuff, sometimes more. I have stopped writing boilerplate by hand. It was never the interesting part anyway.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Drafting writing.&lt;/strong&gt; Methodology docs, reports, slide outlines. If you can prompt well, you get a decent first draft. You still need to edit. But the blank page problem is gone.&lt;/p&gt;
&lt;h2&gt;What AI is still bad at&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Causal reasoning.&lt;/strong&gt; It will find correlations all day. Ask it &lt;em&gt;why&lt;/em&gt; a metric moved, or &lt;em&gt;what would have happened if we had not launched the feature&lt;/em&gt; — it gives you something that sounds right. Usually it is wrong in a subtle way you have to know the domain to see.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Business context.&lt;/strong&gt; AI does not know your CEO just pivoted last month. It does not know marketing and sales are not talking to each other. It does not know the reason the old metric was replaced was political, not analytical. Context matters a lot, and there is no prompt that fixes this.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Problems that are actually new.&lt;/strong&gt; If the problem is something that was not common in the training data, AI guesses. And the guess sounds confident. This is the category I worry about most.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Stakeholder work.&lt;/strong&gt; Convincing a skeptical VP. Pushing back on a bad decision. Reading the room. Still human work. Probably always will be.&lt;/p&gt;
&lt;h2&gt;What I actually think&lt;/h2&gt;
&lt;p&gt;AI will not replace analysts. But analysts who use AI will replace those who do not. That line is a cliché now. It is also true.&lt;/p&gt;
&lt;p&gt;The winning split:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;AI does the speed, the scale, the routine, the first draft&lt;/li&gt;
&lt;li&gt;You do the judgment, the strategy, the relationships, the novel problems&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The job title stays the same. The actual work shifts upward — better questions, better designs, more time on change management and less on pulling data.&lt;/p&gt;
&lt;h2&gt;My advice&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Learn the tools deeply. Not just prompts — know what they can and cannot do.&lt;/li&gt;
&lt;li&gt;Double down on judgment. That is the thing that does not get replaced.&lt;/li&gt;
&lt;li&gt;Build relationships. Your value is going to come more and more from influence, not output.&lt;/li&gt;
&lt;li&gt;Stay curious. The ground is moving fast.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I have bet my career on this being right. Still betting.&lt;/p&gt;
</content:encoded><category>AI</category><category>Marketing Analytics</category><category>Career</category><author>li.tan83033@gmail.com (Li Tan)</author></item><item><title>Between MTA and LTA</title><link>https://litananalytics.com/blog/mta-vs-lta/</link><guid isPermaLink="true">https://litananalytics.com/blog/mta-vs-lta/</guid><description>The attribution debate never ends. Here is how I think about it.</description><pubDate>Mon, 19 May 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;The attribution debate never ends. Here is how I think about it.&lt;/p&gt;
&lt;h2&gt;The core problem&lt;/h2&gt;
&lt;p&gt;A user sees a Facebook ad, clicks a Google ad, reads a blog post, then converts. Who gets credit?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Last-Touch (LTA).&lt;/strong&gt; Google gets 100%.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;First-Touch (FTA).&lt;/strong&gt; Facebook gets 100%.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Multi-Touch (MTA).&lt;/strong&gt; Some weighted split.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;None of these is &quot;correct.&quot; They are all models with different assumptions.&lt;/p&gt;
&lt;h2&gt;Why LTA sticks around&lt;/h2&gt;
&lt;p&gt;LTA gets called simplistic a lot. It has real advantages too:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Simple. Easy to explain, easy to build.&lt;/li&gt;
&lt;li&gt;Actionable. Clear signal for what to optimize.&lt;/li&gt;
&lt;li&gt;Conservative. Tends to favor the lower-funnel, high-intent channels.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For businesses with short consideration cycles, LTA is usually enough. I have seen teams make this too complicated when LTA would have done the job.&lt;/p&gt;
&lt;h2&gt;When MTA helps&lt;/h2&gt;
&lt;p&gt;MTA is more useful when:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The consideration cycle is long (B2B, big-ticket consumer).&lt;/li&gt;
&lt;li&gt;You invest heavily upper-funnel (brand, content).&lt;/li&gt;
&lt;li&gt;Customer journeys are complex — multiple devices, channels, touchpoints.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;MTA tries to credit each touchpoint based on its contribution to the conversion.&lt;/p&gt;
&lt;h2&gt;The dirty secret&lt;/h2&gt;
&lt;p&gt;Here is the thing: &lt;strong&gt;MTA does not measure incrementality.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;MTA answers: &quot;what touchpoints appeared in the journeys that converted?&quot;&lt;/p&gt;
&lt;p&gt;It does not answer: &quot;what would have happened without those touchpoints?&quot;&lt;/p&gt;
&lt;p&gt;A user who was going to convert anyway still has touchpoints. MTA credits them regardless. That is why I always want to calibrate MTA with an actual experiment.&lt;/p&gt;
&lt;h2&gt;A better framework&lt;/h2&gt;
&lt;p&gt;Instead of arguing about attribution models, ask:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;What decision am I making?&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Reallocating budget across channels → you need incrementality testing.&lt;/li&gt;
&lt;li&gt;Optimizing within a channel → platform attribution is probably fine.&lt;/li&gt;
&lt;li&gt;Understanding journeys → path analysis.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;How accurate do I need it?&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Directionally correct → LTA is often enough.&lt;/li&gt;
&lt;li&gt;Precise → you need experiments.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;What can I actually test?&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Run holdout experiments where you can.&lt;/li&gt;
&lt;li&gt;Use geo tests for channels that cannot be randomized at the user level.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Where I land&lt;/h2&gt;
&lt;p&gt;Attribution models are good for monitoring and directional optimization. For budget allocation, they should be calibrated against experimental evidence.&lt;/p&gt;
&lt;p&gt;The best measurement stack I have seen is a combination:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Attribution for day-to-day monitoring&lt;/li&gt;
&lt;li&gt;Incrementality tests for calibration&lt;/li&gt;
&lt;li&gt;MMM for overall budget allocation&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;No single method gives you truth. Triangulating across methods gets you closer.&lt;/p&gt;
&lt;h2&gt;See it for yourself&lt;/h2&gt;
&lt;p&gt;Build a customer journey below and watch how five different attribution models split a single conversion. Same data, radically different stories — which is exactly why debating models without defining the decision is a waste of breath.&lt;/p&gt;
</content:encoded><category>Attribution</category><category>Marketing Analytics</category><category>Measurement</category><author>li.tan83033@gmail.com (Li Tan)</author></item><item><title>Quick Walkthrough on Anomaly Detection</title><link>https://litananalytics.com/blog/anomaly-detection/</link><guid isPermaLink="true">https://litananalytics.com/blog/anomaly-detection/</guid><description>People think anomaly detection is fancy. Most of the time, it is not.</description><pubDate>Mon, 19 May 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Anomaly detection sounds fancy. In my work, 80% of it is simple stuff. A z-score, a rolling window, done.&lt;/p&gt;
&lt;h2&gt;The problem&lt;/h2&gt;
&lt;p&gt;You have a metric. Revenue, signups, errors, whatever. You want to know when something is off. Not just &quot;number went up&quot; — number went up &lt;em&gt;more than it should have&lt;/em&gt;.&lt;/p&gt;
&lt;h2&gt;Method 1 — Simple z-score&lt;/h2&gt;
&lt;p&gt;Compare today to the historical mean and std:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;z_score = (current_value - historical_mean) / historical_std
is_anomaly = abs(z_score) &amp;gt; 3
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Use it for: stable metrics, no strong seasonality.&lt;/p&gt;
&lt;p&gt;Does not handle: trends, weekly patterns.&lt;/p&gt;
&lt;h2&gt;Method 2 — Rolling stats&lt;/h2&gt;
&lt;p&gt;Let the baseline move with the data:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;rolling_mean = df[&quot;metric&quot;].rolling(window=28).mean()
rolling_std = df[&quot;metric&quot;].rolling(window=28).std()
z_score = (df[&quot;metric&quot;] - rolling_mean) / rolling_std
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Use it for: metrics with gradual drift.&lt;/p&gt;
&lt;p&gt;Still bad at: seasonality.&lt;/p&gt;
&lt;h2&gt;Method 3 — Decompose the series&lt;/h2&gt;
&lt;p&gt;Split into trend, seasonal, residual. Flag the residual.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;from statsmodels.tsa.seasonal import seasonal_decompose

result = seasonal_decompose(df[&quot;metric&quot;], period=7)
residuals = result.resid
# z-score on the residuals
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Use it for: clear weekly or monthly patterns.&lt;/p&gt;
&lt;h2&gt;Method 4 — Prophet&lt;/h2&gt;
&lt;p&gt;Prophet gives you intervals out of the box:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;from prophet import Prophet

model = Prophet(interval_width=0.99)
model.fit(df)
forecast = model.predict(df)
# Anything outside yhat_upper/yhat_lower is a candidate anomaly
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Use it for: messy seasonality, holidays.&lt;/p&gt;
&lt;h2&gt;What actually matters&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Start simple.&lt;/strong&gt; Z-scores solve more problems than people want to admit. I start there every time.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tune the threshold.&lt;/strong&gt; 3-sigma is a default, not a rule. If you hate false positives, move it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Handle missing data.&lt;/strong&gt; Detectors hate gaps. Fill them on purpose, not by accident.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Alert fatigue is real.&lt;/strong&gt; Better to miss a few than cry wolf every day. I learned this the hard way.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Check before you alert.&lt;/strong&gt; Most &quot;anomalies&quot; have boring explanations.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;The meta-problem&lt;/h2&gt;
&lt;p&gt;The hard part of anomaly detection is not the math. It is knowing what counts as an anomaly you would actually act on.&lt;/p&gt;
&lt;p&gt;Work backwards: &quot;If we saw this alert, what would we do?&quot; If the answer is nothing, do not build the alert.&lt;/p&gt;
</content:encoded><category>Anomaly Detection</category><category>Data Science</category><category>Monitoring</category><author>li.tan83033@gmail.com (Li Tan)</author></item><item><title>A Brief Intro to Building MMM with Agencies</title><link>https://litananalytics.com/blog/mmm-agencies/</link><guid isPermaLink="true">https://litananalytics.com/blog/mmm-agencies/</guid><description>How to work with an agency on Marketing Mix Modeling without losing control of the methodology.</description><pubDate>Sun, 18 May 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Building MMM with an external agency is a common path. The relationship needs care though, or the model ends up serving someone else&apos;s needs. I have been on both sides of this. Here is what I learned.&lt;/p&gt;
&lt;h2&gt;Why use an agency&lt;/h2&gt;
&lt;p&gt;Agencies bring:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Specialized skills and tools&lt;/li&gt;
&lt;li&gt;Benchmarks across clients&lt;/li&gt;
&lt;li&gt;Extra bandwidth when your team is stretched&lt;/li&gt;
&lt;li&gt;Political cover for findings nobody wants to hear&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Those are real reasons.&lt;/p&gt;
&lt;h2&gt;Red flags&lt;/h2&gt;
&lt;h3&gt;Black box methodology&lt;/h3&gt;
&lt;p&gt;If the agency cannot explain the model spec, the coefficients, and how they validated it — walk away. You need to understand what is driving the results.&lt;/p&gt;
&lt;p&gt;I once inherited a model nobody internally understood. When the numbers stopped matching reality, we had nothing to debug with. It was painful and slow.&lt;/p&gt;
&lt;h3&gt;Too much precision&lt;/h3&gt;
&lt;p&gt;MMM has wide confidence intervals. Always. If an agency tells you &quot;TV drove exactly $4.2M in incremental revenue&quot; with no uncertainty bounds, they are selling. Be skeptical.&lt;/p&gt;
&lt;h3&gt;Optimizing for the CMO&apos;s mood&lt;/h3&gt;
&lt;p&gt;Some agencies tune the model until it shows what the client wants to see. Insist on pre-registered specs. If they push back hard, that tells you something.&lt;/p&gt;
&lt;h2&gt;What to ask for&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Full model documentation — functional forms, priors, variable transforms&lt;/li&gt;
&lt;li&gt;Holdout validation — out-of-sample accuracy, not just in-sample fit&lt;/li&gt;
&lt;li&gt;Sensitivity analysis across reasonable parameter ranges&lt;/li&gt;
&lt;li&gt;Raw output files, not just a polished deck&lt;/li&gt;
&lt;li&gt;Access to the code, if they will give it&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;How to make the relationship work&lt;/h2&gt;
&lt;p&gt;The best agency engagements feel like partnerships. You share business context. You explain why a particular result would be surprising. You push back when something does not make sense.&lt;/p&gt;
&lt;p&gt;Your job is not to accept deliverables. It is to understand the model well enough to defend or critique what it implies.&lt;/p&gt;
&lt;p&gt;The agencies I have had the best results with welcomed the pushback. The ones who got defensive about it — I did not work with them again.&lt;/p&gt;
</content:encoded><category>MMM</category><category>Marketing Analytics</category><category>Agencies</category><author>li.tan83033@gmail.com (Li Tan)</author></item><item><title>Experience Reporting to VPs and Above</title><link>https://litananalytics.com/blog/reporting-to-vps/</link><guid isPermaLink="true">https://litananalytics.com/blog/reporting-to-vps/</guid><description>Early in my career I made every mistake possible presenting to execs. Here is what I learned the painful way.</description><pubDate>Sun, 18 May 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Early in my career I made every mistake possible when presenting to execs. Here is what I learned the painful way.&lt;/p&gt;
&lt;h2&gt;Mistake 1 — Starting with the method&lt;/h2&gt;
&lt;p&gt;I used to open with data sources, model spec, validation approach. Carefully.&lt;/p&gt;
&lt;p&gt;Execs do not care. At least not yet. They want to know: &lt;strong&gt;what should we do, and why?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Fix: lead with the recommendation. Method goes in the appendix or in the follow-up question.&lt;/p&gt;
&lt;h2&gt;Mistake 2 — Too much precision&lt;/h2&gt;
&lt;p&gt;&quot;Revenue will increase by 3.7%, 95% CI [2.1%, 5.3%].&quot;&lt;/p&gt;
&lt;p&gt;What they hear: &quot;probably 2–5%.&quot;&lt;/p&gt;
&lt;p&gt;Fix: round. Use ranges when you are unsure. Focus on the decision, not the decimals.&lt;/p&gt;
&lt;h2&gt;Mistake 3 — Answering too literally&lt;/h2&gt;
&lt;p&gt;VP: &quot;What caused the Q3 drop?&quot;&lt;/p&gt;
&lt;p&gt;Me, before: 20 minutes on every contributing factor.&lt;/p&gt;
&lt;p&gt;Me, now: &quot;Three things. Seasonality, a product bug we fixed in October, and more competition. The product bug was 60% of it.&quot;&lt;/p&gt;
&lt;p&gt;Fix: give the headline first. Offer to go deeper if they want it.&lt;/p&gt;
&lt;h2&gt;Mistake 4 — Not knowing the business context&lt;/h2&gt;
&lt;p&gt;I once presented a &quot;technically perfect&quot; analysis that recommended something the CEO had publicly rejected two months earlier. That meeting was awkward.&lt;/p&gt;
&lt;p&gt;Fix: before any exec presentation, talk to their team. Know what they are focused on, worried about, and have already decided.&lt;/p&gt;
&lt;h2&gt;What actually works&lt;/h2&gt;
&lt;h3&gt;Pyramid principle&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Situation.&lt;/strong&gt; One sentence of context.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Complication.&lt;/strong&gt; The problem or question.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Resolution.&lt;/strong&gt; Your recommendation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Support.&lt;/strong&gt; 2–3 key points.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Everything else is backup material.&lt;/p&gt;
&lt;h3&gt;Anticipate their questions&lt;/h3&gt;
&lt;p&gt;Execs will ask:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&quot;What is the business impact?&quot;&lt;/li&gt;
&lt;li&gt;&quot;How sure are you?&quot;&lt;/li&gt;
&lt;li&gt;&quot;What could go wrong?&quot;&lt;/li&gt;
&lt;li&gt;&quot;What do we do next?&quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Have sharp answers ready. If you do not, you are not ready to present.&lt;/p&gt;
&lt;h3&gt;Make the decision easy&lt;/h3&gt;
&lt;p&gt;Do not present five options and ask them to choose. Present a recommendation with clear reasoning. They will push back if they disagree. That is fine.&lt;/p&gt;
&lt;h3&gt;Respect the time&lt;/h3&gt;
&lt;p&gt;If you get 30 minutes, plan 15 for presentation and 15 for discussion. Execs want to engage, not just listen.&lt;/p&gt;
&lt;h2&gt;The real lesson&lt;/h2&gt;
&lt;p&gt;Technical excellence is the entry ticket. At senior levels, your value comes from:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Asking the right questions.&lt;/li&gt;
&lt;li&gt;Communicating clearly.&lt;/li&gt;
&lt;li&gt;Building trust over time.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The best analysts I know spend as much time on communication as on analysis. I wish someone had told me this earlier.&lt;/p&gt;
</content:encoded><category>Communication</category><category>Leadership</category><category>Career</category><author>li.tan83033@gmail.com (Li Tan)</author></item><item><title>Is Marketing an Art or Science?</title><link>https://litananalytics.com/blog/marketing-art-science/</link><guid isPermaLink="true">https://litananalytics.com/blog/marketing-art-science/</guid><description>I get asked this at every conference. Here is my honest answer.</description><pubDate>Thu, 15 May 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&quot;Is marketing an art or a science?&quot; I get asked this at every conference.&lt;/p&gt;
&lt;p&gt;My answer: both. The ratio depends on what you are measuring.&lt;/p&gt;
&lt;h2&gt;The art side&lt;/h2&gt;
&lt;p&gt;Some parts of marketing are really creative:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Brand building.&lt;/strong&gt; You cannot A/B test your way to emotional resonance.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Storytelling.&lt;/strong&gt; A good narrative comes from human insight, not an algorithm.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cultural timing.&lt;/strong&gt; Knowing when to say something is instinct.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Creative execution.&lt;/strong&gt; The gap between &quot;fine&quot; and &quot;iconic.&quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The best marketers I know have instincts data cannot replicate.&lt;/p&gt;
&lt;h2&gt;The science side&lt;/h2&gt;
&lt;p&gt;Other parts are measurable:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Media buying.&lt;/strong&gt; Bids, targeting, frequency caps.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CRO.&lt;/strong&gt; Test, measure, iterate.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Channel allocation.&lt;/strong&gt; Compare ROI across touchpoints.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pricing.&lt;/strong&gt; Run an experiment, get elasticity.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here, rigor beats intuition. Discipline wins.&lt;/p&gt;
&lt;h2&gt;The messy middle&lt;/h2&gt;
&lt;p&gt;Most marketing lives in between:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A great creative idea &lt;em&gt;and&lt;/em&gt; smart media placement.&lt;/li&gt;
&lt;li&gt;Emotional brand messaging &lt;em&gt;and&lt;/em&gt; a conversion-optimized landing page.&lt;/li&gt;
&lt;li&gt;Intuitive campaign timing &lt;em&gt;and&lt;/em&gt; a rigorous post-mortem.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The best marketing orgs do not choose. They integrate.&lt;/p&gt;
&lt;h2&gt;What this means for measurement&lt;/h2&gt;
&lt;p&gt;Here is the important part: &lt;strong&gt;you cannot measure art the same way you measure science&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;If you try to prove brand ROI with the same rigor as performance marketing, you get:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Underinvestment in brand, because it is harder to measure&lt;/li&gt;
&lt;li&gt;Overfitting on short-term metrics&lt;/li&gt;
&lt;li&gt;Creative that is &quot;data-driven&quot; and forgettable&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Instead:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Measure what you can measure rigorously&lt;/li&gt;
&lt;li&gt;Use proxies and judgment for what you cannot&lt;/li&gt;
&lt;li&gt;Do not let measurability decide strategy — this is where a lot of data teams go wrong&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;How I think about the mix&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Activity&lt;/th&gt;
&lt;th&gt;Mix&lt;/th&gt;
&lt;th&gt;How to measure&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;Brand campaigns&lt;/td&gt;
&lt;td&gt;70/30 art&lt;/td&gt;
&lt;td&gt;Brand tracking, long-term lift&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Content marketing&lt;/td&gt;
&lt;td&gt;60/40 art&lt;/td&gt;
&lt;td&gt;Engagement, assisted conversions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Performance marketing&lt;/td&gt;
&lt;td&gt;30/70 science&lt;/td&gt;
&lt;td&gt;Direct attribution, ROAS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pricing, offers&lt;/td&gt;
&lt;td&gt;20/80 science&lt;/td&gt;
&lt;td&gt;A/B testing, elasticity&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2&gt;Bottom line&lt;/h2&gt;
&lt;p&gt;Art vs. science is a false choice. Good marketing needs both.&lt;/p&gt;
&lt;p&gt;The analyst&apos;s job is not to kill art with data. It is to help the org make better bets — by being clear about what we know, what we do not, and what we are guessing.&lt;/p&gt;
&lt;p&gt;Sometimes that means rigorous experiments. Sometimes it means trusting a talented marketer&apos;s instincts. Knowing when to do which is the actual skill.&lt;/p&gt;
</content:encoded><category>Marketing</category><category>Philosophy</category><category>Strategy</category><author>li.tan83033@gmail.com (Li Tan)</author></item></channel></rss>