<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[AJ Jaiyeola]]></title><description><![CDATA[AJ Jaiyeola]]></description><link>https://blog.gtmdatascience.com</link><image><url>https://substackcdn.com/image/fetch/$s_!hfKD!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb18c625b-cfff-4816-bcf6-4cf8fe07cf14_800x800.png</url><title>AJ Jaiyeola</title><link>https://blog.gtmdatascience.com</link></image><generator>Substack</generator><lastBuildDate>Thu, 18 Jun 2026 12:55:48 GMT</lastBuildDate><atom:link href="https://blog.gtmdatascience.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[AJ Jaiyeola]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[ajjaiyeola@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[ajjaiyeola@substack.com]]></itunes:email><itunes:name><![CDATA[AJ Jaiyeola]]></itunes:name></itunes:owner><itunes:author><![CDATA[AJ Jaiyeola]]></itunes:author><googleplay:owner><![CDATA[ajjaiyeola@substack.com]]></googleplay:owner><googleplay:email><![CDATA[ajjaiyeola@substack.com]]></googleplay:email><googleplay:author><![CDATA[AJ Jaiyeola]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[The Attribution Continuum: How Shapley Divides the Credit]]></title><description><![CDATA[The Math, the Code, and the Limits]]></description><link>https://blog.gtmdatascience.com/p/the-attribution-continuum-how-shapley</link><guid isPermaLink="false">https://blog.gtmdatascience.com/p/the-attribution-continuum-how-shapley</guid><dc:creator><![CDATA[AJ Jaiyeola]]></dc:creator><pubDate>Thu, 30 Apr 2026 00:14:39 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/016f6e6f-04e3-411b-ac62-4b2908c522ba_1477x1065.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SiZR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbab283d2-da09-4dc9-9948-ec994dd28de0_2172x724.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SiZR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbab283d2-da09-4dc9-9948-ec994dd28de0_2172x724.heic 424w, https://substackcdn.com/image/fetch/$s_!SiZR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbab283d2-da09-4dc9-9948-ec994dd28de0_2172x724.heic 848w, https://substackcdn.com/image/fetch/$s_!SiZR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbab283d2-da09-4dc9-9948-ec994dd28de0_2172x724.heic 1272w, https://substackcdn.com/image/fetch/$s_!SiZR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbab283d2-da09-4dc9-9948-ec994dd28de0_2172x724.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SiZR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbab283d2-da09-4dc9-9948-ec994dd28de0_2172x724.heic" width="1456" height="485" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bab283d2-da09-4dc9-9948-ec994dd28de0_2172x724.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:485,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:299320,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://ajjaiyeola.substack.com/i/195794353?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbab283d2-da09-4dc9-9948-ec994dd28de0_2172x724.heic&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!SiZR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbab283d2-da09-4dc9-9948-ec994dd28de0_2172x724.heic 424w, https://substackcdn.com/image/fetch/$s_!SiZR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbab283d2-da09-4dc9-9948-ec994dd28de0_2172x724.heic 848w, https://substackcdn.com/image/fetch/$s_!SiZR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbab283d2-da09-4dc9-9948-ec994dd28de0_2172x724.heic 1272w, https://substackcdn.com/image/fetch/$s_!SiZR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbab283d2-da09-4dc9-9948-ec994dd28de0_2172x724.heic 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em><strong>What brought us to Shapley</strong></em></p><p>In the previous post I described attribution as a continuum, from heuristic rules at one end to causal methods at the other, and made the case that heuristics are often the right choice, particularly for teams without the data to reliably support anything more complex. I also introduced Ron Berman&#8217;s 2018 Marketing Science paper, Beyond the Last Touch, which gives us a specific reason to graduate from heuristics.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.gtmdatascience.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>Berman showed that last-touch attribution creates an incentive problem. When actors know they benefit from showing up at a specific position in the journey, they optimize for that position rather than for the business outcome. He studied this in the context of online advertising, but the intuition likely applies more broadly; when an attribution rule rewards position, people may start optimizing for the rule itself rather than the outcome it was meant to measure. Berman found that Shapley largely addresses this because it assigns credit based on each channel&#8217;s average marginal contribution across all possible combinations, making credit allocation less directly tied to any single journey position.</p><p>In this post I break down exactly how Shapley works, walk through the mechanics with a concrete example, and give you the code to run it yourself.</p><p><em><strong>How Shapley divides the credit</strong></em></p><p>Shapley values come from cooperative game theory, a branch of mathematics concerned with how to fairly divide a reward among players who contributed to it together. Think of a closed deal as the reward and each sales (and marketing) channel as a player that contributed to winning it. The question cooperative game theory asks, and the question Shapley answers, is how to divide that reward fairly.</p><p>What heuristics do is pick a rule and apply it uniformly regardless of what the data says. Shapley takes a different approach. For each channel, it looks at every possible combination of channels that appeared across your pipeline and asks: how did win rates differ when this channel was part of the mix versus when it was not?&#8221; The answer to that question, summed across all combinations and weighted proportionately, becomes that channel&#8217;s credit weight.</p><p>The formula below, developed by Lloyd Shapley in 1952, is the engine behind that calculation. It may look intimidating at first glance, but what it is doing is straightforward. I will walk through each part using a concrete example with four channels: ABM Ads, Webinar, Executive Briefing, and Sales Calls.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fqaN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86af0b4e-2bf5-4ac6-914d-18d8dc408e76_470x74.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fqaN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86af0b4e-2bf5-4ac6-914d-18d8dc408e76_470x74.png 424w, https://substackcdn.com/image/fetch/$s_!fqaN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86af0b4e-2bf5-4ac6-914d-18d8dc408e76_470x74.png 848w, https://substackcdn.com/image/fetch/$s_!fqaN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86af0b4e-2bf5-4ac6-914d-18d8dc408e76_470x74.png 1272w, https://substackcdn.com/image/fetch/$s_!fqaN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86af0b4e-2bf5-4ac6-914d-18d8dc408e76_470x74.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fqaN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86af0b4e-2bf5-4ac6-914d-18d8dc408e76_470x74.png" width="470" height="74" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/86af0b4e-2bf5-4ac6-914d-18d8dc408e76_470x74.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:74,&quot;width&quot;:470,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!fqaN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86af0b4e-2bf5-4ac6-914d-18d8dc408e76_470x74.png 424w, https://substackcdn.com/image/fetch/$s_!fqaN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86af0b4e-2bf5-4ac6-914d-18d8dc408e76_470x74.png 848w, https://substackcdn.com/image/fetch/$s_!fqaN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86af0b4e-2bf5-4ac6-914d-18d8dc408e76_470x74.png 1272w, https://substackcdn.com/image/fetch/$s_!fqaN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86af0b4e-2bf5-4ac6-914d-18d8dc408e76_470x74.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Our hypothetical dataset contains both closed-won and closed-lost opportunities. Each row is one account. Each channel is a binary column, present or absent. The outcome is 1 for closed-won, 0 for closed-lost. Because each channel is either present or absent, four channels produce 2^4 = 16 possible combinations. I will call each combination a coalition. For each coalition, we estimate the win rate among accounts that received exactly that combination of channels. Those win rates are what the formula works with.</p><p>Two things worth flagging before we work through the example. Standard Shapley treats each channel as present or absent. It does not account for frequency or the order in which channels appeared, both of which almost certainly matter in practice. I will address those limitations in future posts covering ordered Shapley and Markov chain attribution. The win rates in the example below are also illustrative. In practice they would come from your own pipeline data.</p><p><strong>Part one: the marginal contribution</strong></p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!iLXG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52bbafc1-a4f4-4fd0-8aa4-42e182c32c95_249x47.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!iLXG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52bbafc1-a4f4-4fd0-8aa4-42e182c32c95_249x47.png 424w, https://substackcdn.com/image/fetch/$s_!iLXG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52bbafc1-a4f4-4fd0-8aa4-42e182c32c95_249x47.png 848w, https://substackcdn.com/image/fetch/$s_!iLXG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52bbafc1-a4f4-4fd0-8aa4-42e182c32c95_249x47.png 1272w, https://substackcdn.com/image/fetch/$s_!iLXG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52bbafc1-a4f4-4fd0-8aa4-42e182c32c95_249x47.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!iLXG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52bbafc1-a4f4-4fd0-8aa4-42e182c32c95_249x47.png" width="157" height="29.634538152610443" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/52bbafc1-a4f4-4fd0-8aa4-42e182c32c95_249x47.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:47,&quot;width&quot;:249,&quot;resizeWidth&quot;:157,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!iLXG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52bbafc1-a4f4-4fd0-8aa4-42e182c32c95_249x47.png 424w, https://substackcdn.com/image/fetch/$s_!iLXG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52bbafc1-a4f4-4fd0-8aa4-42e182c32c95_249x47.png 848w, https://substackcdn.com/image/fetch/$s_!iLXG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52bbafc1-a4f4-4fd0-8aa4-42e182c32c95_249x47.png 1272w, https://substackcdn.com/image/fetch/$s_!iLXG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52bbafc1-a4f4-4fd0-8aa4-42e182c32c95_249x47.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>The first part of the formula measures how much the win rate changes when a channel is added to a coalition that does not already include it. For example: if accounts that received only Sales Calls had a win rate of 0.30 and accounts without any channels at all had a win rate of 0.05, the marginal contribution of Sales Calls entering an empty coalition is 0.30 - 0.05 = 0.25. Shapley repeats this calculation for every channel across every possible coalition, building up a complete picture of each channel&#8217;s contribution under every scenario. You will see this in practice shortly when we walk through a complete example.</p><p><strong>Part two: the weighting</strong></p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!I_ma!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddfbdc09-8ba4-47e8-8fd0-d8f13d167e6a_172x62.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!I_ma!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddfbdc09-8ba4-47e8-8fd0-d8f13d167e6a_172x62.png 424w, https://substackcdn.com/image/fetch/$s_!I_ma!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddfbdc09-8ba4-47e8-8fd0-d8f13d167e6a_172x62.png 848w, https://substackcdn.com/image/fetch/$s_!I_ma!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddfbdc09-8ba4-47e8-8fd0-d8f13d167e6a_172x62.png 1272w, https://substackcdn.com/image/fetch/$s_!I_ma!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddfbdc09-8ba4-47e8-8fd0-d8f13d167e6a_172x62.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!I_ma!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddfbdc09-8ba4-47e8-8fd0-d8f13d167e6a_172x62.png" width="172" height="62" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ddfbdc09-8ba4-47e8-8fd0-d8f13d167e6a_172x62.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:62,&quot;width&quot;:172,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!I_ma!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddfbdc09-8ba4-47e8-8fd0-d8f13d167e6a_172x62.png 424w, https://substackcdn.com/image/fetch/$s_!I_ma!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddfbdc09-8ba4-47e8-8fd0-d8f13d167e6a_172x62.png 848w, https://substackcdn.com/image/fetch/$s_!I_ma!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddfbdc09-8ba4-47e8-8fd0-d8f13d167e6a_172x62.png 1272w, https://substackcdn.com/image/fetch/$s_!I_ma!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fddfbdc09-8ba4-47e8-8fd0-d8f13d167e6a_172x62.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Because Shapley evaluates every possible coalition, the second part of the formula provides a principled way to average those marginal contributions together. We showed earlier that the marginal contribution of Sales Calls entering an empty coalition is 0.25. Now consider the other extreme: when Sales Calls is added to a coalition that already contains ABM, Webinar, and EBC, the win rate goes from 0.32 to 0.65, a marginal contribution of 0.33. These two observations should not necessarily carry equal weight in the final average.</p><p>The weighting formula handles this. With four channels |N| = 4, the weights by coalition size |S| are:</p><ul><li><p>|S| = 0 (no other program present): = 0!(4 - 0 - 1)! / 4! = 0!*3! / 4! = 1*6 / 24 = 1/4</p></li><li><p>|S| = 1 (one other program present): 1!*2! / 4! = 1*2 / 24 = 1/12</p></li><li><p>|S| = 2 (two other programs present): 2!*1! / 4! = 2*1 / 24 = 1/12</p></li><li><p>|S| = 3 (three other programs present): 3!*0! / 4! = 6*1 / 24 = 1/4</p></li></ul><p>Notice that size 0 and size 3 carry the same weight, and size 1 and size 2 carry the same weight. This is by design. Shapley is built around a symmetry principle; a channel entering an empty coalition and a channel entering a nearly full coalition are both extreme scenarios and are treated equally. This is one expression of why Shapley is harder to game than heuristics that explicitly reward position.</p><p><strong>Part three: the sum</strong></p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pCEZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14d869b3-6d44-4c86-aa86-12ee1d4b08c9_95x80.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pCEZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14d869b3-6d44-4c86-aa86-12ee1d4b08c9_95x80.png 424w, https://substackcdn.com/image/fetch/$s_!pCEZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14d869b3-6d44-4c86-aa86-12ee1d4b08c9_95x80.png 848w, https://substackcdn.com/image/fetch/$s_!pCEZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14d869b3-6d44-4c86-aa86-12ee1d4b08c9_95x80.png 1272w, https://substackcdn.com/image/fetch/$s_!pCEZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14d869b3-6d44-4c86-aa86-12ee1d4b08c9_95x80.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pCEZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14d869b3-6d44-4c86-aa86-12ee1d4b08c9_95x80.png" width="95" height="80" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/14d869b3-6d44-4c86-aa86-12ee1d4b08c9_95x80.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:80,&quot;width&quot;:95,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!pCEZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14d869b3-6d44-4c86-aa86-12ee1d4b08c9_95x80.png 424w, https://substackcdn.com/image/fetch/$s_!pCEZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14d869b3-6d44-4c86-aa86-12ee1d4b08c9_95x80.png 848w, https://substackcdn.com/image/fetch/$s_!pCEZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14d869b3-6d44-4c86-aa86-12ee1d4b08c9_95x80.png 1272w, https://substackcdn.com/image/fetch/$s_!pCEZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14d869b3-6d44-4c86-aa86-12ee1d4b08c9_95x80.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>The third part of the formula, is the instruction to take the product of each marginal contribution and its corresponding weight from parts one and two, and sum those products together. That sum is &#981;i&#8203;, the Shapley value for channel i.</p><p>To make this concrete, below is the full calculation for Sales Calls across all eight coalitions that do not already include it. For this example, treat v(S) and v(S + Sales) as given. In practice these come directly from your pipeline data, and the Python code later in this post shows exactly how to calculate them.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cCpM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dcf7adb-d930-4b0a-8ca9-cb29a72ff68c_660x413.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cCpM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dcf7adb-d930-4b0a-8ca9-cb29a72ff68c_660x413.png 424w, https://substackcdn.com/image/fetch/$s_!cCpM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dcf7adb-d930-4b0a-8ca9-cb29a72ff68c_660x413.png 848w, https://substackcdn.com/image/fetch/$s_!cCpM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dcf7adb-d930-4b0a-8ca9-cb29a72ff68c_660x413.png 1272w, https://substackcdn.com/image/fetch/$s_!cCpM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dcf7adb-d930-4b0a-8ca9-cb29a72ff68c_660x413.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!cCpM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dcf7adb-d930-4b0a-8ca9-cb29a72ff68c_660x413.png" width="660" height="413" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4dcf7adb-d930-4b0a-8ca9-cb29a72ff68c_660x413.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:413,&quot;width&quot;:660,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:71526,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://ajjaiyeola.substack.com/i/195794353?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dcf7adb-d930-4b0a-8ca9-cb29a72ff68c_660x413.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!cCpM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dcf7adb-d930-4b0a-8ca9-cb29a72ff68c_660x413.png 424w, https://substackcdn.com/image/fetch/$s_!cCpM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dcf7adb-d930-4b0a-8ca9-cb29a72ff68c_660x413.png 848w, https://substackcdn.com/image/fetch/$s_!cCpM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dcf7adb-d930-4b0a-8ca9-cb29a72ff68c_660x413.png 1272w, https://substackcdn.com/image/fetch/$s_!cCpM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4dcf7adb-d930-4b0a-8ca9-cb29a72ff68c_660x413.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Running the same process for ABM Ads, Webinar, and Executive Briefing produces the following:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!FbaQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F772c1ccb-29e6-46a0-9f7f-41d5a30dfa0e_644x225.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FbaQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F772c1ccb-29e6-46a0-9f7f-41d5a30dfa0e_644x225.png 424w, https://substackcdn.com/image/fetch/$s_!FbaQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F772c1ccb-29e6-46a0-9f7f-41d5a30dfa0e_644x225.png 848w, https://substackcdn.com/image/fetch/$s_!FbaQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F772c1ccb-29e6-46a0-9f7f-41d5a30dfa0e_644x225.png 1272w, https://substackcdn.com/image/fetch/$s_!FbaQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F772c1ccb-29e6-46a0-9f7f-41d5a30dfa0e_644x225.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!FbaQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F772c1ccb-29e6-46a0-9f7f-41d5a30dfa0e_644x225.png" width="644" height="225" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/772c1ccb-29e6-46a0-9f7f-41d5a30dfa0e_644x225.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:225,&quot;width&quot;:644,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:31012,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://ajjaiyeola.substack.com/i/195794353?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F772c1ccb-29e6-46a0-9f7f-41d5a30dfa0e_644x225.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!FbaQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F772c1ccb-29e6-46a0-9f7f-41d5a30dfa0e_644x225.png 424w, https://substackcdn.com/image/fetch/$s_!FbaQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F772c1ccb-29e6-46a0-9f7f-41d5a30dfa0e_644x225.png 848w, https://substackcdn.com/image/fetch/$s_!FbaQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F772c1ccb-29e6-46a0-9f7f-41d5a30dfa0e_644x225.png 1272w, https://substackcdn.com/image/fetch/$s_!FbaQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F772c1ccb-29e6-46a0-9f7f-41d5a30dfa0e_644x225.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Sales Calls earns the largest weight and Executive Briefing the second largest. Sales Calls produces the largest marginal lift across every coalition it enters, with a minimum contribution of 0.25 regardless of what other channels are present. Executive Briefing is the only other channel that contributes meaningfully on its own, adding 0.15 in win rate above the baseline before any other channel is present. ABM and Webinar earn smaller weights because their absolute marginal contributions are lower across all coalitions.</p><p>Quick reminder: these weights are a function of the win rates in this specific example. Run this on your own data and the numbers will look different. That is the point.</p><p><em><strong>Running Shapley yourself</strong></em></p><div class="file-embed-wrapper" data-component-name="FileToDOM"><div class="file-embed-container-reader"><div class="file-embed-container-top"><image class="file-embed-thumbnail-default" src="https://substackcdn.com/image/fetch/$s_!0Cy0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack.com%2Fimg%2Fattachment_icon.svg"></image><div class="file-embed-details"><div class="file-embed-details-h1">Shapley Pipeline Data</div><div class="file-embed-details-h2">31.7KB &#8729; XLSX file</div></div><a class="file-embed-button wide" href="https://ajjaiyeola.substack.com/api/v1/file/fe9056a0-fa7a-48f8-b52a-6d729249805f.xlsx"><span class="file-embed-button-text">Download</span></a></div><a class="file-embed-button narrow" href="https://ajjaiyeola.substack.com/api/v1/file/fe9056a0-fa7a-48f8-b52a-6d729249805f.xlsx"><span class="file-embed-button-text">Download</span></a></div></div><p>The dataset attached to this post contains 1,200 accounts. Each row shows which of the four channels, ABM, Webinar, Executive Briefing, and Sales Calls, touched the account during the sales cycle, and whether the relevant deal became closed won or closed lost.</p><p>The full notebook is available here: [<a href="https://colab.research.google.com/drive/1rzZHrYI1R7g0B2NFJDelzmkuJDvq5Eo8?usp=sharing">Google Colab link</a>]. A Google Colab notebook is a free, browser-based environment where you can run Python code without installing anything on your computer. You open it like a webpage, run the code one cell at a time, and see the results instantly. If you have never written Python before, do not let that stop you. AI tools like ChatGPT can explain any line of code you do not understand, help you modify it for your own data, and fix errors when they come up. Running code has never been more accessible than it is right now, and a Colab notebook is the best place to start.</p><p>Download the dataset, open the notebook, and run each cell in order from top to bottom by clicking the play button on the top left corner of each cell. After running the first cell, scroll to the bottom of that cell and click &#8220;Choose Files&#8221; to upload the dataset. The screenshot below shows exactly where to look.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!aWG9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a725326-6b4c-4cff-a6c2-ede5caf2fa0a_1372x560.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!aWG9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a725326-6b4c-4cff-a6c2-ede5caf2fa0a_1372x560.png 424w, https://substackcdn.com/image/fetch/$s_!aWG9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a725326-6b4c-4cff-a6c2-ede5caf2fa0a_1372x560.png 848w, https://substackcdn.com/image/fetch/$s_!aWG9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a725326-6b4c-4cff-a6c2-ede5caf2fa0a_1372x560.png 1272w, https://substackcdn.com/image/fetch/$s_!aWG9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a725326-6b4c-4cff-a6c2-ede5caf2fa0a_1372x560.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!aWG9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a725326-6b4c-4cff-a6c2-ede5caf2fa0a_1372x560.png" width="1372" height="560" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6a725326-6b4c-4cff-a6c2-ede5caf2fa0a_1372x560.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:560,&quot;width&quot;:1372,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:110994,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://ajjaiyeola.substack.com/i/195794353?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a725326-6b4c-4cff-a6c2-ede5caf2fa0a_1372x560.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!aWG9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a725326-6b4c-4cff-a6c2-ede5caf2fa0a_1372x560.png 424w, https://substackcdn.com/image/fetch/$s_!aWG9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a725326-6b4c-4cff-a6c2-ede5caf2fa0a_1372x560.png 848w, https://substackcdn.com/image/fetch/$s_!aWG9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a725326-6b4c-4cff-a6c2-ede5caf2fa0a_1372x560.png 1272w, https://substackcdn.com/image/fetch/$s_!aWG9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a725326-6b4c-4cff-a6c2-ede5caf2fa0a_1372x560.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The notebook walks through four steps: upload your file, define your channels, calculate win rates for each channel combination from the raw data, and run the Shapley formula. Once you have it working on the synthetic data provided, you can feel free to try it on your own data. If you want to adapt the code, whether that means adding more channels or changing the outcome definition, paste the code into ChatGPT and ask it to help you make the change.</p><p>If you want to go deeper on how sample size of each channel combinations affects the reliability of win rate estimates, OpenStax's chapter on confidence intervals for proportions is a good place to start: [<a href="https://openstax.org/books/introductory-business-statistics/pages/8-3-a-confidence-interval-for-a-population-proportion">link</a>].</p><p><em><strong>A note on computation and ordering</strong></em></p><p>The formula I implemented in the notebook works cleanly for a small number of channel categories, but it has two limitations.</p><p>The first is computational. As the number of channels grows, the number of coalitions grows exponentially. With 4 channels you have 2^4 = 16 coalitions. With 10 you have 2^10 = 1,024. With 30 you have 2^30 = over a billion. Every channel you add doubles the number of coalitions the formula needs to evaluate.</p><p>The second is that standard Shapley is order-agnostic. It treats a channel that appeared in month one the same as one that appeared in month twelve, as long as their marginal contributions are equal. In B2B enterprise that is a real limitation. SDR outreach before an executive briefing before a demo can be a meaningfully different journey than the same three channels in a different order.</p><p>Zhao, Mahboobi &amp; Bagheri tackled both limitations in their 2018 paper, Shapley Value Methods for Attribution Modeling in Online Advertising. They developed a more efficient version of the formula and an ordered variant that accounts for the sequence in which channels appeared. I will cover both in a future post.</p><p><em><strong>Why Shapley still isn&#8217;t causal</strong></em></p><p>Shapley is fair in a specific mathematical sense: every channel&#8217;s credit reflects its average marginal contribution across every possible combination of channels. That is not the same thing as causal. The formula distributes credit based on observed win rates across channel combinations, but those combinations did not occur randomly. In some companies, Enterprise Events for example get assigned primarily to large accounts that were already likely to close. In that scenario, Shapley will give Enterprise Events a large credit weight because the win rate is higher when Enterprise Events is in the coalition. Although that weight is fair under Shapley&#8217;s axioms, it is confounded by the fact that high-propensity accounts got the channel in the first place. </p><p>Shapley cannot see the difference between a channel that drove conversion and a channel that was assigned to accounts that were already going to convert. That distinction requires thinking causally about how channels get assigned to accounts, not just what the win rates look like after the fact. We will cover that in a future post.</p><p><em><strong>Where Shapley sits on the attribution ladder</strong></em></p><p>Shapley is the first stop past heuristics, but it is not the destination. Through this series I want to walk up the full attribution ladder one rung at a time. Here is how I think about it.</p><p><strong>Rung 1 (Heuristics):</strong> Last-touch, first-touch, U-shape, full-path. Cheap, fast, often the right choice early on. Covered in post 1.</p><p><strong>Rung 2 (Descriptive attribution: Standard Shapley):</strong> Fair credit allocation across channels that touched a deal, defensible under cooperative game theory axioms. Covered in this post.</p><p><strong>Rung 3 (Descriptive attribution with sequence):</strong> Adds order to the picture, since SDR outreach before a demo is a different journey than the reverse. Two foundational methods address this directly: ordered Shapley and Markov chain attribution. At the more advanced end, deep learning models like LSTMs can learn complex sequential patterns directly from journey data. It is worth noting that LSTMs and similar models are not a separate rung on the ladder. They are an estimation engine that can power methods across multiple rungs, from sequence-aware attribution at Rung 3 to causally-corrected approaches at Rung 4. We will cover the foundational methods first and return to how advanced models fit into the full picture later.</p><p><strong>Rung 4 (Causally-corrected attribution):</strong> Distinguishes channels that drove conversion from channels that were assigned to accounts already likely to convert. It corrects for selection bias in your historical data, giving you a more honest picture of past channel impact. But it is still a backward-looking measurement. It tells you what worked given the mix you ran, not what would happen if you changed it.</p><p><strong>Rung 5 (Forward-looking budget optimization):</strong> Rungs 1 through 4 are all backward-looking. Even causally-corrected attribution tells you what drove conversion given the programs you ran. It does not tell you what would happen if you shifted budget, ran one more field event, or cut a program entirely. Answering those questions requires understanding how outcomes respond at the margin as spend changes, how returns diminish as you do more of the same thing, and how some programs generate carryover effects that show up in future quarters rather than the current one. A 2018 Journal of Marketing Research paper by Peter Danaher and Harald van Heerde made this case precisely: attribution estimates are backward-looking and cannot reliably guide forward-looking allocation decisions. Tools like Meta's Robyn and Google's Meridian attempt to model these dynamics directly. Whether and how they apply in enterprise B2B contexts, where programs are discrete and infrequent rather than continuous, is something we will work through later in the series.</p><p>We have now covered rungs 1 and 2. We will cover the remaining rungs in future posts.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.gtmdatascience.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[The Attribution Continuum: When Heuristics Work and When They Don't]]></title><description><![CDATA[Why simple attribution rules are often right, and the specific moment they start doing damage.]]></description><link>https://blog.gtmdatascience.com/p/the-attribution-continuum-when-heuristics</link><guid isPermaLink="false">https://blog.gtmdatascience.com/p/the-attribution-continuum-when-heuristics</guid><dc:creator><![CDATA[AJ Jaiyeola]]></dc:creator><pubDate>Thu, 23 Apr 2026 13:55:37 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/c540958c-3608-482c-bc5e-6cf4ff9a4891_1478x1064.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CZTn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe9ac68b-54f6-4b8e-8025-c519273ae565_2172x724.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CZTn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe9ac68b-54f6-4b8e-8025-c519273ae565_2172x724.heic 424w, https://substackcdn.com/image/fetch/$s_!CZTn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe9ac68b-54f6-4b8e-8025-c519273ae565_2172x724.heic 848w, https://substackcdn.com/image/fetch/$s_!CZTn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe9ac68b-54f6-4b8e-8025-c519273ae565_2172x724.heic 1272w, https://substackcdn.com/image/fetch/$s_!CZTn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe9ac68b-54f6-4b8e-8025-c519273ae565_2172x724.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CZTn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe9ac68b-54f6-4b8e-8025-c519273ae565_2172x724.heic" width="1456" height="485" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/be9ac68b-54f6-4b8e-8025-c519273ae565_2172x724.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:485,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:337735,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://ajjaiyeola.substack.com/i/195237285?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe9ac68b-54f6-4b8e-8025-c519273ae565_2172x724.heic&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!CZTn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe9ac68b-54f6-4b8e-8025-c519273ae565_2172x724.heic 424w, https://substackcdn.com/image/fetch/$s_!CZTn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe9ac68b-54f6-4b8e-8025-c519273ae565_2172x724.heic 848w, https://substackcdn.com/image/fetch/$s_!CZTn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe9ac68b-54f6-4b8e-8025-c519273ae565_2172x724.heic 1272w, https://substackcdn.com/image/fetch/$s_!CZTn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe9ac68b-54f6-4b8e-8025-c519273ae565_2172x724.heic 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>A question many marketing leaders wrestle with is how to attribute revenue outcomes in enterprise B2B, where a single closed-won deal can reflect months of activity across marketing and sales, many touchpoints, and enough complexity to make almost any retrospective explanation sound plausible. The reason this matters is straightforward: attribution is often used, directly or indirectly, to inform budget decisions. Which programs warrant more investment? Which motions are actually changing revenue outcomes? The trouble is that teams often use a method that describes the journey and then treat it as if it proved causal impact. Over time, that tends to steer money and attention toward what is easiest to measure rather than what is actually moving the business.</p><p>The stakes are real. In fiscal year 2025, Okta reported $2.61 billion in revenue and spent $965 million on sales and marketing, meaning roughly thirty-seven cents of every revenue dollar went back out the door to acquire and retain customers. That ratio has come down from forty-six cents the year before. Like most enterprise companies, Okta is likely looking for ways to spend its marketing dollars more efficiently. At that scale, even a small improvement in understanding which programs actually drive revenue can redirect tens of millions of dollars toward what works. A measurement approach that quietly rewards the wrong activities is a structural leak.</p><p>Attribution exists on a continuum, and different companies sit at different points on it. At the simpler end are heuristic rules: assign all the credit to the last touch before the deal closed, or to the first, or weigh a few key moments more heavily. These remain the most common approaches in B2B. A step up from heuristics, game-theoretic methods like Shapley values distribute credit across every touch based on its average marginal contribution across possible orderings. Beyond that, causal methods try to separate correlation from genuine impact, since a program that tends to get assigned to accounts already likely to close will look effective whether or not it actually is. Some implementations combine causal estimation with Shapley-style credit allocation; others handle the problem differently. Professor Walter Zhang at Wharton pointed me toward a working paper by Yunhao Huang that pushes on the sophistication narrative itself, finding in the context of online advertising auctions that simpler single-touch rules can produce better incentives than more sophisticated multi-touch ones. Whether the same holds in B2B is an open question, and later posts will get into what it might mean. There are also unique ideas about B2B journeys that I have not yet seen reflected in attribution models: for example, Purmonen and colleagues argued in 2023 that B2B journeys include both a purchase journey and a usage journey, and that the usage stage can feed back into new purchase cycles. I suspect some interesting work in attribution will happen here, if it hasn&#8217;t already. The rest of this post covers the first stop on the continuum: why heuristic approaches are still the right choice for many companies, and when they are not.</p><p>Before any of this is worth discussing, there is a more basic question. Do you actually have the data? Attribution of any kind, heuristic or otherwise, assumes you have a reliable record of who touched what account, when, and through which channel. In practice, most companies do not. Touch data lives in a marketing automation tool, a CRM, a sales engagement platform, an events system, and a handful of spreadsheets, and bringing it into one coherent view may not be straightforward. Before you can attribute anything, you need a centralized log of touches, timestamped, mapped to both contacts and their accounts, with the known gaps documented so you understand what the data can and cannot tell you. If you are not there yet, this is where your effort should go. A simple heuristic applied to clean data will usually beat a sophisticated model applied to messy data, and no amount of methodological sophistication downstream compensates for a broken pipeline upstream.</p><p>So what are these heuristic approaches, concretely? Take the deal in the image above. The diagram shows seventeen touchpoints over fourteen months, which is deliberately compressed for clarity; a real enterprise deal of this size typically involves hundreds of tracked touches across many stakeholders. The illustrated touchpoints include ABM ads, a webinar, SDR outreach, a product demo, an executive briefing, an ROI deck, and a final sales meeting at the end, among others. Last-touch attribution gives all the credit for this deal to the final sales meeting. First-touch gives all the credit to the ABM ads that initially brought the account in. Linear attribution splits the credit evenly across all seventeen touchpoints, so each one gets about six percent. U-shaped attribution weights the first touch and the last touch more heavily than the middle. W-shaped adds a third weighted touch at the moment the lead became a qualified opportunity. Full-path adds a fourth weighted milestone at the deal close. The exact splits across U-shaped, W-shaped, and full-path vary by vendor and by implementation, but the basic idea is the same: pick the moments you think matter most and weight them accordingly. Each model has its own logic for why it weights things the way it does, and each one produces a different picture of which channels and programs drove the deal, which is ultimately what leaders use to inform where budget goes.</p><p>It is easy to dismiss these models as too simple to take seriously. But simple is not the same as wrong, and for a lot of companies a heuristic is genuinely the right choice. If you are growing fast, closing deals, and the data pipeline we just talked about is not in place, building a sophisticated attribution engine is a way to waste several months. Each of these heuristics is also a reasonable fit for certain situations. Last-touch, for example, may work well for short-cycle direct-response businesses where the decision window is measured in days rather than months and the final touch really is doing most of the causal work. A rule everyone in the organization understands and agrees on has real value, even if it is crude. It gives marketing and sales a shared language for talking about what worked. It lets leaders make directional budget calls without waiting on a model that is not going to be ready for another several quarters. And it is cheap enough to maintain that you can reinvest the saved effort into the part of the stack that actually matters at your stage, which is usually building more pipeline. A lot of the companies that eventually graduate to more sophisticated attribution started here, stayed here longer than they would admit in a conference talk, and were probably right to.</p><p>So when do these models stop being the right choice? The usual answer is that they become inaccurate, but that misses what actually goes wrong. Ron Berman, in a 2018 Marketing Science paper titled &#8220;Beyond the Last Touch,&#8221; made the sharper argument. He was writing about online advertising, where publishers compete for credit on a user&#8217;s path to conversion, but the logic extends to B2B. The problem is incentives. When you reward people based on a rule, they optimize for the rule rather than the outcome. If last-touch gets the credit, reps and marketers compete to be the last touch, scheduling one more call right before close because it moves the credit, not the deal. If first-touch gets the credit, channels race to be the first recorded touch on as many accounts as possible, regardless of whether those accounts are likely to convert. The model stops describing behavior and starts shaping it, and the behavior it shapes is not the behavior you want.</p><p>The case for moving past heuristics is strongest once you have the data pipeline in place and no particular reason to stick with one. The incentive distortion is built into how heuristics work, not something that only shows up when things have visibly gone wrong. The next step is a model that splits credit across every contributor in a way that is harder to game. That turns out to be a well-studied problem. The Shapley value, originally developed by Lloyd Shapley in 1952 to fairly divide the payoff of a team among its members, has become the standard game-theoretic approach. Applied to attribution, Shapley assigns each touch its average marginal contribution across all possible orderings of the journey. The next post in this series walks through how it works and why it is the natural next stop on the continuum. It also has its own problems, which later posts will get into.</p><p>One more thing worth saying. The debate about which attribution model is &#8220;right&#8221; quietly assumes you are only picking a measurement tool. You are also picking an incentive system, because people optimize against whatever gets measured. The answer depends on what behavior you want to produce, not just what you want to measure.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blog.gtmdatascience.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blog.gtmdatascience.com/subscribe?"><span>Subscribe now</span></a></p><p></p>]]></content:encoded></item></channel></rss>