<?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[Pranjal Rawat, PhD]]></title><description><![CDATA[Pranjal Rawat, PhD]]></description><link>https://pranjalrawat42.substack.com</link><image><url>https://substackcdn.com/image/fetch/$s_!UPbR!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b378f04-6761-4a18-9217-4af2668afe0e_730x730.png</url><title>Pranjal Rawat, PhD</title><link>https://pranjalrawat42.substack.com</link></image><generator>Substack</generator><lastBuildDate>Fri, 26 Jun 2026 07:23:33 GMT</lastBuildDate><atom:link href="https://pranjalrawat42.substack.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Pranjal Rawat]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[pranjalrawat42@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[pranjalrawat42@substack.com]]></itunes:email><itunes:name><![CDATA[Pranjal Rawat, PhD]]></itunes:name></itunes:owner><itunes:author><![CDATA[Pranjal Rawat, PhD]]></itunes:author><googleplay:owner><![CDATA[pranjalrawat42@substack.com]]></googleplay:owner><googleplay:email><![CDATA[pranjalrawat42@substack.com]]></googleplay:email><googleplay:author><![CDATA[Pranjal Rawat, PhD]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Remembering Dimitri Bertsekas]]></title><description><![CDATA[On what true scholarship looks like]]></description><link>https://pranjalrawat42.substack.com/p/remembering-dimitri-bertsekas</link><guid isPermaLink="false">https://pranjalrawat42.substack.com/p/remembering-dimitri-bertsekas</guid><dc:creator><![CDATA[Pranjal Rawat, PhD]]></dc:creator><pubDate>Fri, 05 Jun 2026 10:50:02 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!UPbR!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b378f04-6761-4a18-9217-4af2668afe0e_730x730.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In this post, I write a bit about Dimitri Bertsekas at Arizona who recently passed away. He is well known in engineering and control circles, but I&#8217;d like to point out that he&#8217;s also been influential in dynamic economics too. </p><p>He taught my advisor John Rust in the 1980s, who passed on that influnce to me and he also had a direct influence of my research when I was reading his paper in the 2020s. How is this even possible? <br><br>His work is building on the work of classical dynamic programming (DP), which defines the optimal way to deal with sequential problem i.e. problems that involve thinking about the future state of the world. </p><p>Dynamic programming offers us a way to solve the problem if we have a perfect model of how the world evolves in a sequence. Prof Bertsekas&#8217;s work was about expanding the domain to cases where we do not have a perfect model of the environment and which must be learnt as we go. </p><p>This is called Model Predictive Control (MPC). We model the world, then make a prediction about where it will go if we take certain actions and then we do &#8220;Control&#8221; which is taking actions that give us the best possible world. </p><p>MPC is used widely in various industries from chemical plants to oil refineries, from data cooling centers to autonomous vehicles. It can be applied to advertising budget management, finance and other areas too. </p><p>Bertesekas also contributed to Reinforcement Learning (RL) which is mainly focused on learning without a model of the world and simply through trial and error. He was able to show that landmark progress in RL (e.g. AlphaZero) are deeply connected to MPC, and both are connected to DP. </p><p>Bertesekas was able to give us this powerful connection: </p><p>MPC = RL = DP</p><p>This is the closest we are to a grand and unified theory of solving dynamic problems from finance, economics to engineering. This essentially unifies <em><strong>planning</strong></em> and <em><strong>learning</strong></em> as fundamental solution methods to dynamic problems. He also taught a generation of students from 1980s right up to 2025, and that is 55 years of creating and motivating minds. </p><p>That is a hallmark of a true scholar and truely exceptional mind, and I want to take time to cherish this. I&#8217;m so glad that I educated myself enough to be able to see the value of this work.</p><p>Physics shows us that there is deep beauty in the universe, and now we see that there is a beauty to &#8220;solutions&#8221; to dynamic problems as well, they all follow the same &#8220;rhyme and rhythms&#8221;.  </p><p>As we continue to work on problems that involve learning and planning, we cherish the work of Dimitri Bertsekas.  </p>]]></content:encoded></item><item><title><![CDATA[Sharing some experiences on the Hiring of PhD Candidates]]></title><description><![CDATA[Recruiting is hard!]]></description><link>https://pranjalrawat42.substack.com/p/sharing-some-experiences-on-the-hiring</link><guid isPermaLink="false">https://pranjalrawat42.substack.com/p/sharing-some-experiences-on-the-hiring</guid><dc:creator><![CDATA[Pranjal Rawat, PhD]]></dc:creator><pubDate>Wed, 20 May 2026 18:28:27 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!UPbR!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b378f04-6761-4a18-9217-4af2668afe0e_730x730.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Recently I got a chance to be on the recruiting side after a long time being on the other side. It was a bit eye opening to be a recruiter for a PhD Internship. Here is what I thought candidates could be doing to make it easier for me (the recruiter): </p><ol><li><p>A one page ATS/AI friendly resume in standard format</p></li><li><p>Respond to openings quickly</p></li><li><p>full_name_resume please, and mention the role you are applying to. </p></li><li><p>In this transaction the following information was <em><strong>critical</strong></em>: </p><ol><li><p>The resume, linkedin and email</p></li><li><p>Role information &#8212; what does this job actually entail and what could it lead to?</p></li><li><p>Comp range &#8212; hourly wage, hours per week, total weeks</p></li><li><p>Logistics: start date range, working hours, location/relocation, if remote and long distance then timezones and overlap hours </p></li><li><p>Interview &amp; followup availability, competing offers</p></li><li><p>Visa situation</p></li></ol></li><li><p>Anything less than &#8220;hell yes&#8221; is likely a &#8220;hell no&#8221;.</p></li><li><p>Show me <em><strong>verifiable evidence</strong></em> (public or private): </p><ol><li><p>Show don&#8217;t tell. Github, LinkedIn, working paper, website, blog, whatever. Add links wherever you can. </p></li><li><p>Show me enthusiasm, promptness and decisiveness. </p></li><li><p>Show me something that I can trust and I know is <em><strong>not hard to game</strong></em>.</p></li></ol></li></ol><p>As the recruiter here is what I paid most attention to: </p><ul><li><p>Your education, school and its rank [hard to game]</p></li><li><p>Your work experiences (formal employments) [hard to game]</p></li><li><p>Everything was game-able and not verifiable from my end. </p></li></ul><p>Form the hiring side, there were things that I noticed I could do to make the candidates life a bit easier too: </p><ul><li><p>Be upfront and communicate / collect the <em><strong>critical information</strong></em> (see above). Candidates want that information too, so better to share it early. </p></li><li><p>Humans are not machines, they take time to respond and often forget. This cuts both ways&#8212;attention is limited and things are often in a flux&#8212; so timely, gentle reminders are helpful. </p></li><li><p>Don&#8217;t overpromise and manage expectations; usually there are many equally good candidates but just 1 role. In this economy, especially for students, in most roles that are not highly specialized, supply is just much lower than demand. </p></li><li><p>Be quick about it: stringing someone along for a long time is really bad.</p></li><li><p>Don&#8217;t use AI to write emails. Even if it takes a bit longer, and your email is shorter/not perfect; its better to write a personalized and heartfelt 2 liner than pages of flawless AI generated content. People want to see a human response. </p></li><li><p>After weeding out the obvious misfits, having one short phone call or zoom interview is greatly helpful. Just a lot of context is brought up regarding the critical information. </p></li><li><p>Collect information on what the hiring manager is actually looking for &#8212; often my own domain expertise does not match with theirs, so while I can prune out bad candidates using rules of thumb I actually do not have the ability to find that gem amongst candidates (all who on paper look equally good). So I think having a nuanced checklist of what verifiable signals (not mere keywords on a resume) the hiring manager is looking for.</p></li></ul><p><strong>On internationals with visa restrictions: </strong></p><ul><li><p>Someone without visa restrictions is certainly much more preferable because there is no extra layer of hassle (this is very obvious!). International students face a lot more difficulty and will have to go the extra mile to find out the exact procedure that will allow them to work (the process). Unless its a big firm, a lot of firms don&#8217;t even know the procedure to hire internationals. </p></li><li><p>However, paradoxically, someone with visa restrictions also looks like someone who would care enough to dedicate themselves to the job entirely. Not having those restrictions, actually might make someone seem more &#8220;distracted&#8221;. </p></li></ul><p><strong>On bias. </strong></p><p>During this process I was very conscious about my own biases and presuppositions. All of us have biases and there is a lot of information that hiring decisions should <em>not</em> be made on: name, age, race, gender, caste, marital status, ethnicity, location, education, accent, rank of school, visa situation and so on. One is also worried that when AI systems will inherit this bias (since its trained on data with a lot of bias) and that could lead to algorithmic bias. </p><p>Bias exists for many reasons: statistical discrimination (using stereotypes as a way to save time), taste &amp; preference (I just don&#8217;t like X), racism/hate, etc. and I&#8217;m not here to open that can of worms, but in general hiring should purge that information which could lead to bias. One useful I thing I did was to strip all such data and store the information in docs/.md files as candidate A, candidate B, etc. And I think that is better for both humans and AI systems, when evaluating candidates. I think as hiring &amp; recruiting becomes more automated, we need a lot more research into both detecting and mitigating AI (and human) bias. </p><p><strong>Some more thoughts on what excited candidates vs what the work actually was: </strong></p><p>I think a lot of candidates think working in industry is sexy and they will get to work on cutting edge stuff because academia tells about so many clever things (in isolation). In reality, the actual industry work, if seen in isolation, is actually quite dry and dull. A lot of emails, data moving here and there, simple analysis, automation, etc. The process of building <em><strong>something real</strong></em> has many parts, and each of them might be boring if seen in isolation, but <em><strong>putting them together</strong></em> is actually quite exciting (because the final product is real and has force/materiality in the world)&#8212;so candidates should be excited about &#8220;the whole, final project&#8221; rather than narrower technical parts (a model, a tool or a pipeline). </p><p><strong>On some other concerns I had about candidates: </strong></p><ul><li><p><em><strong>Did they seem to be having too much on their plate?</strong></em> If they were participating in 10 different projects then would they pay attention to this role. </p></li><li><p>They all seemed technically sharp and diligent and would work when given perfect instructions from a senior expert, but often work is scrappy and there is not guidelines/manual and <em><strong>nobody to oversee you</strong></em> and so what I wanted to see with grad students was <em><strong>evidence that you could work without perfect instructions and without understanding the full context (can you keep chugging along?). </strong></em></p></li></ul><p>Hopefully these will be helpful to those on the other side. </p>]]></content:encoded></item><item><title><![CDATA[Software for Economic Modelling]]></title><description><![CDATA[Not very novel, but still very valuable]]></description><link>https://pranjalrawat42.substack.com/p/software-for-economic-modelling</link><guid isPermaLink="false">https://pranjalrawat42.substack.com/p/software-for-economic-modelling</guid><dc:creator><![CDATA[Pranjal Rawat, PhD]]></dc:creator><pubDate>Thu, 02 Apr 2026 21:20:42 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!UPbR!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b378f04-6761-4a18-9217-4af2668afe0e_730x730.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>During my PhD, I had the good fortune to work on and build some software for economic and statistical modelling. With the help of claude/codex, I was able to build these out faster. All of them are still quite early, and have some rough edges. They all use state of the art programming tools (Rust, JAX, PyTorch, etc.), draw from large bodies of well-established literatures and there is extensive documentation about how to use them. </p><ol><li><p><a href="https://econirl.readthedocs.io/en/latest/#">EconIRL</a>: This is suite of models and methods to analyze and understand sequential choices. These types of choices typically arise when there is something that &#8220;accumulates&#8221; over time. Consider the owner of durable asset e.g. a truck who must decide what is the best time to replace it (lest it break down on-route). Or consider, a taxi driver that is planning their route through a busy city, going from point A to point B; trading off traffic, time and quality of the road. Or consider, a user of a music app, deciding to skip or play the next song in a playlist. These models help us understand how exactly the user values now vs then, and what preferences drive his decision making at each step. If we can understand these we can then design routes, playlists or better pricing for durables. </p></li><li><p><a href="https://prefgraph.readthedocs.io/en/latest/index.html#">PrefGraph</a>: This is software that helps us detect &#8220;inconsistency&#8221; or &#8220;irrationality&#8221; in choices. For instance a common way that humans are inconsistent is when their choices change in the presence of &#8220;decoy&#8221; options which is an obviously bad option but presented to make other options look good. Another area where we might want to test for consistency is in AI agents or LLM responses. Ideally, we&#8217;d want our agents to be coherent and consistent, especially when they are to shop or reason for us. Note, that consistency is not the same as being right or wrong. Furthermore, often consistency can fail for other reasons such as changing preferences, a failure to a pay close attention to all options or simply making a &#8216;hand-trembling&#8217; mistake. This software makes use of advanced graphical techniques developed in Operations Research. </p></li><li><p><a href="https://deep-inference.readthedocs.io/en/latest/index.html#">DeepInference</a>: This is a more statistical package that takes traditional statistical models such as the good old linear regression: Y = a + b T + error and makes it into Y = a(X) + b(X) T + error, so the slope and intercepts are now functions of X, which could be potentially very high dimensional and dense objects (e.g. image, text, sequences, graphs and so on). Well, in a world where such high dim. objects are first class citizens, we need to be able to work directly on them when studying empirical relationships in the data. And while it is easy to estimate such models, it is not so easy to run hypothesis tests such as H0: E[b(X)] = 0. We have to rely on statistical tools like influence functions to achieve that. </p></li></ol><p>These packages make it clear that the main thrust of my PhD was to explore how computational machinery from machine learning could be used in service of economic and statistical modelling. And after 5 years, I have come to the conclusion that integration of machine and deep learning methods in economics is not only easy but is a natural direction if we want to model and work with dense objects (which are abundant in the social world). </p><p>Furthermore, I think a lot of interesting methodology remains buried in economics or econometrics papers or in arcane codebases, and it takes a significant effort and thinking to make these methods available to the public. However, I think there is value to this: the best validation of a method or tool is its widespread adoption and building open source software is the only way to do this. </p><p>The Bayesians learned this the hard way, but now with software like Stan we are able to run Bayesian workflows at ease. Similarily, if CS researchers had not come up with StableBaselines or the many benchmarks for robotics like MujoCo, it would be really hard to do research in the area of reinforcement learning where frameworks are very brittle and breakdown without careful hyper-parameter tuning. </p><p>Economics today does not emphasis clean, reproducible code and we do not really teach for this nor reward this in the publication process. But this is a vital aspect of making sure our work is not only reproduced and tested, but also that it is made available for others to build on, which in turn allows us to build on what they create using our work (a positive feedback loop). </p><p></p><p></p><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[I got my PhD, now what? ]]></title><description><![CDATA[How to keep doing research when nobody's paying you to]]></description><link>https://pranjalrawat42.substack.com/p/i-got-my-phd-now-what</link><guid isPermaLink="false">https://pranjalrawat42.substack.com/p/i-got-my-phd-now-what</guid><dc:creator><![CDATA[Pranjal Rawat, PhD]]></dc:creator><pubDate>Mon, 16 Mar 2026 00:33:10 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!UPbR!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b378f04-6761-4a18-9217-4af2668afe0e_730x730.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In a month I will get my PhD degree (hopefully) and then continue onto the next phase of my journey of working at a large tech firm on marketplace and pricing problems. At this juncture, I wonder how can one continue to do some research in a nonacademic setting, where nobody is paying you for it or expecting you to do it? Without a formal structure that Assistant Professors or Research Scientists have, it&#8217;s easy to stop doing research entirely. Here I consider four strategies that might facilitate research in a nonacademic setting. </p><p>The first is to work on problems at scale and spend less time on smaller, toy problems. The last 5 years were spent on small or medium scale, toy problems on which perfect solutions could be crafted and deep insights be gained. The real world is however much messier and does not permit such liberties. Everything takes much longer to run, requires going through more people, and dealing with all sorts of organizational and other resource constraints and barriers. However, solving problems at scale has impact that no toy solution can ever hope to have. In this way, my research activity can be more sustainable and my time spent on research can be more justified. This is the hardest strategy to follow as everyone, even me, loves to play with toys and one can really do a lot of interesting and clever things with toys. Working at scale can be sometimes boring, hard, and painful. But ultimately, it must be done. </p><p>The second is to keep learning more statistics (yes, pure stats!). For most people, their statistics journey ends at high school or undergrad. But unfortunately, this rabbit hole is very deep and never really stops paying rewards. From experimentation design, to uncertainty quantification to sensitivity analysis, learning more statistics has always helped sharpen thinking and enriched the discussion. Some people think statistics is &#8220;elementary&#8221; or &#8220;boring&#8221; or &#8220;oh, it&#8217;s just standard errors&#8221;. I think statistical concepts can be applied almost everywhere to improve analysis and rigor. As AI takes over more of the programming tasks, I think the one real differentiator between two scientists will be how much statistical depth one has. Statistics is also a great portal into algorithmic work and machine learning; each time we define a particular loss function to optimize for we are pushing in properties (convergence, uniqueness, instability, robustness) into the solution or decision rule or algorithm. And therefore understanding statistics really deeply is the best way to design better algorithms and systems. </p><p>Thirdly, it is imperative to work in teams as much as possible. Working alone is only helpful for geniuses or newbies. The context of the problem is often too spread across the organization for it to be possible for one person to &#8220;go it alone&#8221;. Working in teams forces you to pay attention to the final decision that will be taken from your analysis or algorithm, it keeps you focused on the relevant problems, not be distracted and more motivated. Working in teams keeps you updated with the latest know-how. Of course, the team ought to be smart, hardworking and inspiring. But working in teams solves half the problems that researchers face automatically, that it does not make sense any more to work on a problem alone. Working in teams gives you access to networks, people and advice that you can keep well beyond your time there. </p><p>And lastly, given the paucity of research time, one needs to work on one problem at a time and take it to completion. One of the problems I have faced is that nearly everything seems interesting and starting new things is easier than finishing old ones. Over my PhD, I have dabbled in too many topics to master any one. Real mastery is simply going to take more investment in one problem at a time. It takes time to absorb the problem properly, and properly appreciate both the problem structure and its proposed solutions. Monotony can be a real issue, so one can break the problem space up and work on different aspects of the problem, but it&#8217;s still better to work on one problem at a time. Some folks can manage 20 projects concurrently, but I&#8217;d spread myself too thin. Like most PhDs, I also find it easier to start projects than finish them (this is a very common issue in grad school), and the hardest part of the research project is in the final delivery, the &#8220;last-mile&#8221; so to speak. It is absolutely painful to finish, and the mind is screaming and kicking as one crosses the finish line.</p><p>With these 4 strategies, I hope I can still continue to do interesting work in a sustainable way. Of course, there is no way to compete with researchers who are paid to do only research. But competing with them was never the goal, the goal was always to solve problems and not accumulate publications. <em>Why should the fish climb a mountain, when it has whole ocean to swim in? </em>Industry careers are also long and give one unique advantages. First, is access to real, rich data and a means to experiment. Second, is compute and resources (Claude, GPUs, etc.). Third, is vital and deep context regarding real world problems. Fourth, is access to diverse domain experts from various backgrounds and a team who one can collaborate with. These advantages can be used to do impactful work, albeit at a slower pace, whose benefits could spill beyond the business setting (again, hopefully).</p><p>To recap, the mantra/heuristic I propose is: </p><ul><li><p>work on problems at scale</p></li><li><p>study more statistics</p></li><li><p>always work in teams</p></li><li><p>take one project at a time to completion</p></li></ul><p>These are neither particularly novel nor universally perfect, but they make sense for some folks. These guidelines maybe hard to follow, especially as this post has not elaborated on: a) how to differentiate toy vs problems at scale?, b) how to find a good team?, c) what statistics to focus on?, and d) how to commit to one problem only?. I do not know the answers to these, as these are things I will try to figure out in the coming months and years. </p><p>The long term vision is to help build and improve autonomous, intelligent economic systems and platforms that continually adapt, learn, experiment, and respect and facilitate the autonomy of humans and AI agents that populate it, especially regarding their incentives and motivations and cognitive limitations. Why does this matter? It matters because scarcity is a fact of life (time, money, attention, resources) and intelligent, non-coercive, economic systems help guide this allocation in a sustainable way. This knowledge/work is valuable because we do not know any society that cannot benefit from a better allocation of resources. </p><p></p><p></p><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[How food is delivered]]></title><description><![CDATA[It's about the perfect match!]]></description><link>https://pranjalrawat42.substack.com/p/how-food-is-delivered</link><guid isPermaLink="false">https://pranjalrawat42.substack.com/p/how-food-is-delivered</guid><dc:creator><![CDATA[Pranjal Rawat, PhD]]></dc:creator><pubDate>Fri, 07 Nov 2025 22:38:10 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!YUwJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb155d81c-78f3-419f-9af6-e0dd1eac6243_444x462.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><a href="https://github.com/rawatpranjal/meituan">Code</a></p><p>DoorDash, UberEats, GrubHub, Grab, Meituan, Zomato, Swiggy. These apps have been an important part of our lives. From late night binging, to last minute parties, to gifts send to loved ones, to groceries and more&#8212; on-demand food delivery has been a cornerstone of the conveniences we have come to expect as routine. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!YUwJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb155d81c-78f3-419f-9af6-e0dd1eac6243_444x462.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YUwJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb155d81c-78f3-419f-9af6-e0dd1eac6243_444x462.png 424w, https://substackcdn.com/image/fetch/$s_!YUwJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb155d81c-78f3-419f-9af6-e0dd1eac6243_444x462.png 848w, https://substackcdn.com/image/fetch/$s_!YUwJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb155d81c-78f3-419f-9af6-e0dd1eac6243_444x462.png 1272w, https://substackcdn.com/image/fetch/$s_!YUwJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb155d81c-78f3-419f-9af6-e0dd1eac6243_444x462.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!YUwJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb155d81c-78f3-419f-9af6-e0dd1eac6243_444x462.png" width="444" height="462" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b155d81c-78f3-419f-9af6-e0dd1eac6243_444x462.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:462,&quot;width&quot;:444,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:105525,&quot;alt&quot;:&quot;Food Location Tracker UI | Figma&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Food Location Tracker UI | Figma" title="Food Location Tracker UI | Figma" srcset="https://substackcdn.com/image/fetch/$s_!YUwJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb155d81c-78f3-419f-9af6-e0dd1eac6243_444x462.png 424w, https://substackcdn.com/image/fetch/$s_!YUwJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb155d81c-78f3-419f-9af6-e0dd1eac6243_444x462.png 848w, https://substackcdn.com/image/fetch/$s_!YUwJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb155d81c-78f3-419f-9af6-e0dd1eac6243_444x462.png 1272w, https://substackcdn.com/image/fetch/$s_!YUwJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb155d81c-78f3-419f-9af6-e0dd1eac6243_444x462.png 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>In this post, I&#8217;m going to peel back some layers on food delivery. We want to explore <em>how</em> it works. This article is just an <em>introduction</em> to this field of study&#8212;a touristy take of sorts&#8212;by no means am I qualified or experienced to talk authoritatively on these topics. </p><h4>The Food Delivery Problem</h4><p>Food delivery is complicated. Firstly, there are three distinct players in the market. Restaurants, who pay commission fees to platform, and want to deliver food in time. Couriers, who get paid a piecemeal wage for each order, and want to maximize earnings per hour. Eaters, who make orders at restaurants hoping to get it in time and want to get their food delivered quickly and cheaply.</p><p>Information about food orders arrives in real time, and is not known in advance and highly uncertain. Demand fluctuates. Orders must also be served within a very short time window, lest they get stale. There is no central depot (pickup point). Each restaurant is effectively a depot. Couriers are gig workers, so they choose their hours, may choose to reject order offers, and may also not follow the recommended route or order!</p><p>Unlike ride share, which is typically one-to-one matching between driver and rider, in food delivery we can <em>bundle</em> multiple orders at a single restaurant to a single courier, and drop them in multiple <em>legs</em>. We can also bundle multiple orders <em>across nearby restaurants</em> to a single courier aka &#8220;<em>batched pickup</em>&#8221;. One could also send a courier to a restaurant even before an order is ready i.e. an &#8220;anticipated&#8221; pickup.</p><p>Due to these factors food delivery is a hard logistics problem. The responsibility of the delivery platform is to coordinate the activity of all three (courier, customer, restaurant). First, they a) retrieve and serve search results for products, and then b) set <em>prices</em> (delivery fee, courier wage, commission fee) and lastly, c) dynamically <em>match</em> orders to couriers as they arrive. While not having any real control over the actions of the players, the platform seeks to be <em>reliable</em>, <em>efficient</em>, and <em>profitable</em> and with <em>high throughput</em>.</p><h4><strong>Demand-Supply Simulation</strong></h4><p>We create simple simulation where orders come in from customers for restaurants across a few hours of operation. We abstract away from the search problem and the pricing problem and focus on the matching problem. </p><p>Orders are allowed to arrive, accumulate&#8212; there is fundamentally more orders than couriers and this builds up. At fixed intervals of 5 minutes, a matching <em>scan</em> goes out. It picks up idle couriers and orders that are <em>ready</em> to be sent out, and then immediately matches them. Couriers are well behaved and follow the assignments and routes. They go to the restaurants, pick up their orders, and deliver them to their customers <em>on the shortest path</em>. There is a small amount of service time at pickup and drop-off.</p><p>The two distinctions are important: <em>travel time</em> and <em>tour time</em> are important. Travel time is simply the time taken from point A to point B. For example, it can tell us the time the courier will take to get to the restaurant. Tour time is the <em>shortest</em> time taken from origin, to sweep through a whole set of locations. For example, it can tell us the fastest way a courier at the restaurant can drop off many orders to all its customers. </p><h4><strong>Nearest Courier Matching</strong></h4><p>The simplest matching is to, in each batch, match the <em>oldest order that is ready</em> at a restaurant to the courier <em>nearest</em> to it. This &#8220;greedy&#8221; solution may seem silly, but may not be too far from the traditional approach to food delivery where each restaurant had its own couriers (who were usually nearby). </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KahR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106de118-eeb3-4f63-9269-5608a305e139_1920x1440.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KahR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106de118-eeb3-4f63-9269-5608a305e139_1920x1440.gif 424w, https://substackcdn.com/image/fetch/$s_!KahR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106de118-eeb3-4f63-9269-5608a305e139_1920x1440.gif 848w, https://substackcdn.com/image/fetch/$s_!KahR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106de118-eeb3-4f63-9269-5608a305e139_1920x1440.gif 1272w, https://substackcdn.com/image/fetch/$s_!KahR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106de118-eeb3-4f63-9269-5608a305e139_1920x1440.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KahR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106de118-eeb3-4f63-9269-5608a305e139_1920x1440.gif" width="1456" height="1092" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/106de118-eeb3-4f63-9269-5608a305e139_1920x1440.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1092,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:420166,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://pranjalrawat42.substack.com/i/177772459?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106de118-eeb3-4f63-9269-5608a305e139_1920x1440.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!KahR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106de118-eeb3-4f63-9269-5608a305e139_1920x1440.gif 424w, https://substackcdn.com/image/fetch/$s_!KahR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106de118-eeb3-4f63-9269-5608a305e139_1920x1440.gif 848w, https://substackcdn.com/image/fetch/$s_!KahR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106de118-eeb3-4f63-9269-5608a305e139_1920x1440.gif 1272w, https://substackcdn.com/image/fetch/$s_!KahR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F106de118-eeb3-4f63-9269-5608a305e139_1920x1440.gif 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 graph above shows new assignments that happen every 5 minutes (not older ones). Orders are blue dots, restaurants are red squares and couriers are black triangles. The courier path is given by the dotted line and the GIF is a run through of 1 hour of simulation. </p><p>The problem with this method is that while pickups are quick, the drop offs might be absurdly long. This approach can exhaust couriers too early, leaving the platform vulnerable when demand picks up. </p><h4><strong>Bipartite Matching </strong></h4><p>A more &#8220;intelligent&#8221; matching is the bipartite or one-to-one matching, we essentially match exactly <em>one order to one courier</em> in a way so as to <em>minimize total travel time</em>. We can also call this, a &#8220;shortest delivery time&#8221; matching. </p><p>The objective to be first maximize total orders matched and then minimize the total time on all deliveries (courier &#8212;&gt; pickup, pickup &#8212;&gt; drop-off) and service time, and the constraints just reiterate that a) one courier cannot be matched to more than one order and b) one order cannot be matched to more than one courier. This is solved every 5 minutes. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jSWI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79750c34-2099-4fec-9950-139716609d4e_1920x1440.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jSWI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79750c34-2099-4fec-9950-139716609d4e_1920x1440.gif 424w, https://substackcdn.com/image/fetch/$s_!jSWI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79750c34-2099-4fec-9950-139716609d4e_1920x1440.gif 848w, https://substackcdn.com/image/fetch/$s_!jSWI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79750c34-2099-4fec-9950-139716609d4e_1920x1440.gif 1272w, https://substackcdn.com/image/fetch/$s_!jSWI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79750c34-2099-4fec-9950-139716609d4e_1920x1440.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jSWI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79750c34-2099-4fec-9950-139716609d4e_1920x1440.gif" width="1456" height="1092" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/79750c34-2099-4fec-9950-139716609d4e_1920x1440.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1092,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:386232,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://pranjalrawat42.substack.com/i/177772459?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79750c34-2099-4fec-9950-139716609d4e_1920x1440.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!jSWI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79750c34-2099-4fec-9950-139716609d4e_1920x1440.gif 424w, https://substackcdn.com/image/fetch/$s_!jSWI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79750c34-2099-4fec-9950-139716609d4e_1920x1440.gif 848w, https://substackcdn.com/image/fetch/$s_!jSWI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79750c34-2099-4fec-9950-139716609d4e_1920x1440.gif 1272w, https://substackcdn.com/image/fetch/$s_!jSWI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79750c34-2099-4fec-9950-139716609d4e_1920x1440.gif 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 main advantage of this method is that unlike the greedy solution, it does not send couriers on very long drop offs. It is trying to reduce both pickup and drop off time together. The algorithm is very fast (essentially linear programming). Customers who are luckily to get their orders matched will see very short delivery times, since a dedicated courier is assigned to their order. However, the biggest limitation is that couriers simply matched to just one order, and this might be inefficient. </p><h4><strong>Single-Pickup Bundling</strong></h4><p>In this solution, for the same restaurant i.e a single pickup, if there are multiple orders, we can assign all of them (up to a certain cap) to a single courier.  We simple bundle the orders and assign bundles to couriers via a <em>set packing</em> assignment. Couriers can pick up to 3 orders per restaurant and drop them off to their customers via a shortest path. Since orders can perish once ready, so we enforce checks to prevent food from becoming cold when bundled and taken on a multi-leg journey. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!brQ6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db5fd44-5734-453a-83a9-f43e210ee6d5_1920x1440.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!brQ6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db5fd44-5734-453a-83a9-f43e210ee6d5_1920x1440.gif 424w, https://substackcdn.com/image/fetch/$s_!brQ6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db5fd44-5734-453a-83a9-f43e210ee6d5_1920x1440.gif 848w, https://substackcdn.com/image/fetch/$s_!brQ6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db5fd44-5734-453a-83a9-f43e210ee6d5_1920x1440.gif 1272w, https://substackcdn.com/image/fetch/$s_!brQ6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db5fd44-5734-453a-83a9-f43e210ee6d5_1920x1440.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!brQ6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db5fd44-5734-453a-83a9-f43e210ee6d5_1920x1440.gif" width="1456" height="1092" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5db5fd44-5734-453a-83a9-f43e210ee6d5_1920x1440.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1092,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:420234,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://pranjalrawat42.substack.com/i/177772459?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db5fd44-5734-453a-83a9-f43e210ee6d5_1920x1440.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!brQ6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db5fd44-5734-453a-83a9-f43e210ee6d5_1920x1440.gif 424w, https://substackcdn.com/image/fetch/$s_!brQ6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db5fd44-5734-453a-83a9-f43e210ee6d5_1920x1440.gif 848w, https://substackcdn.com/image/fetch/$s_!brQ6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db5fd44-5734-453a-83a9-f43e210ee6d5_1920x1440.gif 1272w, https://substackcdn.com/image/fetch/$s_!brQ6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db5fd44-5734-453a-83a9-f43e210ee6d5_1920x1440.gif 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 objective function here is not to minimize delivery time but rather to maximize the total throughput or fulfillment (no. of orders matched). This allows a maximum of 3 times the throughput of the one-to-one matching. Delivery times are slower, since couriers are double or even triple booked, but we are able to serve much more demand. Sometimes couriers in the graph look &#8220;free&#8221; but they are working on prior assignments. </p><h4><strong>Batched Pickups / Network Bundling</strong></h4><p>An more interesting form of bundling will allow a courier to pickup from multiple restaurants. Here we allow couriers to pick up more than 1 order from across 2 restaurants. This is the &#8220;Double Dash&#8221; feature in DoorDash. The objective is to maximize orders matched, subject to the constraints that couriers can only carry up to 3 orders (that are ready to go) and orders can come from at most 2 nearby restaurants. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zz3C!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe620b397-c59a-4d3c-98b5-59889cc30c86_1920x1440.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zz3C!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe620b397-c59a-4d3c-98b5-59889cc30c86_1920x1440.gif 424w, https://substackcdn.com/image/fetch/$s_!zz3C!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe620b397-c59a-4d3c-98b5-59889cc30c86_1920x1440.gif 848w, https://substackcdn.com/image/fetch/$s_!zz3C!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe620b397-c59a-4d3c-98b5-59889cc30c86_1920x1440.gif 1272w, https://substackcdn.com/image/fetch/$s_!zz3C!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe620b397-c59a-4d3c-98b5-59889cc30c86_1920x1440.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zz3C!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe620b397-c59a-4d3c-98b5-59889cc30c86_1920x1440.gif" width="1456" height="1092" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e620b397-c59a-4d3c-98b5-59889cc30c86_1920x1440.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1092,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:424642,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://pranjalrawat42.substack.com/i/177772459?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe620b397-c59a-4d3c-98b5-59889cc30c86_1920x1440.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zz3C!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe620b397-c59a-4d3c-98b5-59889cc30c86_1920x1440.gif 424w, https://substackcdn.com/image/fetch/$s_!zz3C!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe620b397-c59a-4d3c-98b5-59889cc30c86_1920x1440.gif 848w, https://substackcdn.com/image/fetch/$s_!zz3C!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe620b397-c59a-4d3c-98b5-59889cc30c86_1920x1440.gif 1272w, https://substackcdn.com/image/fetch/$s_!zz3C!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe620b397-c59a-4d3c-98b5-59889cc30c86_1920x1440.gif 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></p><p>This allows us to do better than simple bundling which is tied to one restaurant. </p><h4><strong>Anticipated Pickups</strong></h4><p>So far we have waited for orders to be <em>ready</em> before matching them. However, typically we know about orders a little earlier than when they are prepared. Thus one way to improve the simpler bundling solution is to simply dispatch couriers to the restaurants even before the food gets ready and have them wait for 3 full orders to be ready. </p><p>In effect we are using a &#8216;forward-looking&#8217; anticipatory window to maximize orders matches but consider orders that are <em>ready now</em> but, up to 3 orders, that will be <em>ready in the future</em> (e.g. next 10 minutes). This enables <em>anticipated</em> pickups. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Lb1g!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66b4f142-60fd-41d3-adf0-5f352d102dda_1920x1440.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Lb1g!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66b4f142-60fd-41d3-adf0-5f352d102dda_1920x1440.gif 424w, https://substackcdn.com/image/fetch/$s_!Lb1g!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66b4f142-60fd-41d3-adf0-5f352d102dda_1920x1440.gif 848w, https://substackcdn.com/image/fetch/$s_!Lb1g!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66b4f142-60fd-41d3-adf0-5f352d102dda_1920x1440.gif 1272w, https://substackcdn.com/image/fetch/$s_!Lb1g!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66b4f142-60fd-41d3-adf0-5f352d102dda_1920x1440.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Lb1g!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66b4f142-60fd-41d3-adf0-5f352d102dda_1920x1440.gif" width="1456" height="1092" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/66b4f142-60fd-41d3-adf0-5f352d102dda_1920x1440.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1092,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:448096,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://pranjalrawat42.substack.com/i/177772459?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66b4f142-60fd-41d3-adf0-5f352d102dda_1920x1440.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Lb1g!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66b4f142-60fd-41d3-adf0-5f352d102dda_1920x1440.gif 424w, https://substackcdn.com/image/fetch/$s_!Lb1g!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66b4f142-60fd-41d3-adf0-5f352d102dda_1920x1440.gif 848w, https://substackcdn.com/image/fetch/$s_!Lb1g!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66b4f142-60fd-41d3-adf0-5f352d102dda_1920x1440.gif 1272w, https://substackcdn.com/image/fetch/$s_!Lb1g!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66b4f142-60fd-41d3-adf0-5f352d102dda_1920x1440.gif 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></p><p>To keep things simple, we do not allow pickups from across restaurants. But even so, its clear that the system is able to serve a lot of the demand. The waiting at restaurants allows much more bundling in general. Most couriers are working with 3 orders. </p><h4>Performance Evaluation</h4><p>The greedy strategy, of using the nearest courier, obviously does the worst. Despite being easy to execute and the couriers moving a lot, it delivers the worst avg. delivery time and worst fulfillment. </p><p>The bipartite matching is fast and tries to minimize total delivery time, and the effect is quite clear. Delivery times are lowest but fulfillment is not very high. Also, unlike the Greedy solution which also prioritizes &#8220;ready first&#8221; orders, the bipartite matching is more focused on delivery time so more orders perish without being matched. So a single minded focus on delivery time may not be wise. </p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZW2e!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F847cdb13-756f-4059-ae30-2fcbd4d084fe_2180x418.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZW2e!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F847cdb13-756f-4059-ae30-2fcbd4d084fe_2180x418.png 424w, https://substackcdn.com/image/fetch/$s_!ZW2e!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F847cdb13-756f-4059-ae30-2fcbd4d084fe_2180x418.png 848w, https://substackcdn.com/image/fetch/$s_!ZW2e!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F847cdb13-756f-4059-ae30-2fcbd4d084fe_2180x418.png 1272w, https://substackcdn.com/image/fetch/$s_!ZW2e!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F847cdb13-756f-4059-ae30-2fcbd4d084fe_2180x418.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZW2e!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F847cdb13-756f-4059-ae30-2fcbd4d084fe_2180x418.png" width="1456" height="279" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/847cdb13-756f-4059-ae30-2fcbd4d084fe_2180x418.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:279,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:107663,&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://pranjalrawat42.substack.com/i/177772459?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F847cdb13-756f-4059-ae30-2fcbd4d084fe_2180x418.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_!ZW2e!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F847cdb13-756f-4059-ae30-2fcbd4d084fe_2180x418.png 424w, https://substackcdn.com/image/fetch/$s_!ZW2e!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F847cdb13-756f-4059-ae30-2fcbd4d084fe_2180x418.png 848w, https://substackcdn.com/image/fetch/$s_!ZW2e!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F847cdb13-756f-4059-ae30-2fcbd4d084fe_2180x418.png 1272w, https://substackcdn.com/image/fetch/$s_!ZW2e!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F847cdb13-756f-4059-ae30-2fcbd4d084fe_2180x418.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Bundling multiple orders has a strong effect on fulfillment. While delivery time increases a little, the fulfillment rate jumps up sharply. Couriers are carrying about 3 orders each time. As a consequence, they are also moving more efficiently, showing lower courier distances. Bundling is done by set-packing algorithms since its many-to-one rather than one-to-one. </p><p>The batched pickup also is helpful. Even more fulfillment, even more bundling. However, the matching process is more computationally intensive (as can be seen by the run time), and avg. delivery time is quite high (as the courier has to move between restaurants). While this simulation was small enough to be &#8220;easy&#8221;, it may be possible that batched pickup might be an intractable problem at real world scale. </p><p>The anticipated bundling that knows when orders are ready is easily able to arrive at restaurant early and wait longer to pick up to 3 orders. This raises throughput, and reduces delivery times. Couriers are very busy; they are always going on very long journeys so end up covering longer distances. Seemingly the best of all worlds. </p><p>Its interesting to note that while simpler strategies like Greedy and One-to-One are more likely to have overlapping assignments, the most smarter methods likely do not seem to have similar assignments. Anticipated bundling and network bundling have about 5% overlap in terms of the same courier to same order. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!k8Q7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0ebda2a-8a3e-4514-8a2a-b5faf182b1a1_1344x410.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!k8Q7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0ebda2a-8a3e-4514-8a2a-b5faf182b1a1_1344x410.png 424w, https://substackcdn.com/image/fetch/$s_!k8Q7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0ebda2a-8a3e-4514-8a2a-b5faf182b1a1_1344x410.png 848w, https://substackcdn.com/image/fetch/$s_!k8Q7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0ebda2a-8a3e-4514-8a2a-b5faf182b1a1_1344x410.png 1272w, https://substackcdn.com/image/fetch/$s_!k8Q7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0ebda2a-8a3e-4514-8a2a-b5faf182b1a1_1344x410.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!k8Q7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0ebda2a-8a3e-4514-8a2a-b5faf182b1a1_1344x410.png" width="1344" height="410" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f0ebda2a-8a3e-4514-8a2a-b5faf182b1a1_1344x410.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:410,&quot;width&quot;:1344,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:80359,&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://pranjalrawat42.substack.com/i/177772459?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0ebda2a-8a3e-4514-8a2a-b5faf182b1a1_1344x410.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_!k8Q7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0ebda2a-8a3e-4514-8a2a-b5faf182b1a1_1344x410.png 424w, https://substackcdn.com/image/fetch/$s_!k8Q7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0ebda2a-8a3e-4514-8a2a-b5faf182b1a1_1344x410.png 848w, https://substackcdn.com/image/fetch/$s_!k8Q7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0ebda2a-8a3e-4514-8a2a-b5faf182b1a1_1344x410.png 1272w, https://substackcdn.com/image/fetch/$s_!k8Q7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0ebda2a-8a3e-4514-8a2a-b5faf182b1a1_1344x410.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>All these results are specific to this simulation. But we can see a clear order where better algorithms which accommodate a wider search space do deliver better results. More sophisticated solutions will use rolling windows and forecasting to better match anticipated demand with anticipated supply. </p><h4>Discussion</h4><p>The first thing that I learned from this exercise is that the perfect solution to this problem is obviously intractable. The perfect solution is too complicated to even possibly fathom, and there may be many ways to think about it or frame it. The perfect solution would involve long term future planning, which means anticipating future demand and supply availability. It would take account some kind of network congestion. We might also want to use clever tricks like bundling, batched pickup and anticipation to improve performance. There may be other &#8220;hacks&#8221; that one could exploit. We would also want the system to be robust to the fact that most of the demand and supply is uncertain.</p><p>The second thing I learned is that each component of the system really interacts with other components. And so when you are making changes, you cannot simply rely on historical data on those changes. For example, if you want to understand the effect of a hike in the delivery fee, it may not be a wise strategy to simply look at historical data. One might even look at experimental data, but the reality is that food delivery works like a system. At the very least, one has to factor in the most important responses: </p><ul><li><p>The response of customers, which depends critically on delivery fees because that affects the final price that they see when they&#8217;re checking out their cart.</p><ul><li><p>They may choose not to buy or buy something with lower prices.  </p></li><li><p>They may reduce tips. </p></li><li><p>They may switch to other apps. </p></li><li><p>They may resort to &#8220;self pickup&#8221;. </p></li><li><p>They may choose to only buy from restaurants under UberOne or DashPass where delivery fees is zero. </p></li></ul></li><li><p>The response of couriers during peak hours to rises in their wages, which usually come with higher delivery fees.</p><ul><li><p>Couriers may increase their availability, especially in peak hours. </p></li><li><p>Couriers may reject less.</p></li></ul></li><li><p>The response of restaurants to delivery fees is also crucial. </p><ul><li><p>They may raise menu prices due to high delivery fees. </p></li><li><p>They may choose to downgrade their subscription on the app, </p></li><li><p>They may begin to use their own couriers. </p></li></ul></li></ul><p>Therefore it is likely that the hike in delivery fees may deteriorate the performance of current matching algorithm (whose performance has been benchmarked and calibrated to a lower delivery fee). For example, a reduction in courier rejection rate, due to higher wages, may present new opportunities to better utilize supply. </p><p>Overall, food delivery presents an interesting window into sophisticated pricing and matching methods; and understanding the dynamics of demand and supply. </p><h4><strong>References</strong></h4><ol><li><p>Reyes, Damian, Alan Erera, Martin Savelsbergh, Sagar Sahasrabudhe, and Ryan O&#8217;Neil. &#8220;The meal delivery routing problem.&#8221; <em>Optimization Online</em> 6571, no. 2018 (2018): 2018.</p></li><li><p>Rios, Brenner Humberto Ojeda, Eduardo C. Xavier, Fl&#225;vio K. Miyazawa, Pedro Amorim, Eduardo Curcio, and Maria Jo&#227;o Santos. &#8220;Recent dynamic vehicle routing problems: A survey.&#8221; <em>Computers &amp; Industrial Engineering</em> 160 (2021): 107604.</p></li><li><p>Yan, Chiwei, Helin Zhu, Nikita Korolko, and Dawn Woodard. &#8220;Dynamic pricing and matching in ride&#8208;hailing platforms.&#8221; <em>Naval Research Logistics (NRL)</em> 67, no. 8 (2020): 705-724.</p></li><li><p>Zhao, L., H. Wang, Y. Liang, D. Li, J. Zhao, X. Ding, J. Hao, and R. He. &#8220;The first INFORMS TSL data-driven research challenge (TSL-Meituan 2024): Background and data description.&#8221; <em>URL https://github. com/meituan/meituan_ informs_data, accessed: February</em> 28 (2024): 2025.</p></li><li><p>Boysen, Nils, Stefan Fedtke, and Stefan Schwerdfeger. &#8220;Last-mile delivery concepts: a survey from an operational research perspective.&#8221; <em>Or Spectrum</em> 43, no. 1 (2021): 1-58.</p></li><li><p>Savelsbergh, Martin, and Marlin W. Ulmer. &#8220;Challenges and opportunities in crowdsourced delivery planning and operations&#8212;an update.&#8221; <em>Annals of Operations Research</em> 343, no. 2 (2024): 639-661.</p></li><li><p><a href="https://help.uber.com/en/ubereats/restaurants/article/what-fees-may-apply-to-my-order?nodeId=65d229e2-a2b4-4fa0-b10f-b36c9546cf55">What fees applies to my order, UberEats</a></p></li></ol><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[How do platforms measure the effectiveness of ads?]]></title><description><![CDATA[Through clever experimental design]]></description><link>https://pranjalrawat42.substack.com/p/how-do-platforms-measure-the-effectiveness</link><guid isPermaLink="false">https://pranjalrawat42.substack.com/p/how-do-platforms-measure-the-effectiveness</guid><dc:creator><![CDATA[Pranjal Rawat, PhD]]></dc:creator><pubDate>Sat, 01 Nov 2025 23:30:27 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!UPbR!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b378f04-6761-4a18-9217-4af2668afe0e_730x730.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><a href="https://drive.google.com/file/d/1LBZ8ibkeIk5D2rzbPvbQAog9GICH3CcD/view?usp=sharing">Slides</a></p><p>Advertising is the backbone of the free internet. It&#8217;s what allows websites to offer content without paywalls, marketplaces to connect buyers and sellers, and businesses of all sizes to reach potential customers. For consumers, ads serve as a discovery mechanism, helping them find products they didn&#8217;t know existed or solutions they didn&#8217;t realize they needed.</p><p>However, despite having mountains of data about impressions, clicks, searches, and browsing behavior, measuring the actual impact of advertising remains notoriously difficult. </p><p>Consider what happens during holiday shopping seasons. People actively search for gifts, browse more frequently, and have high purchase intent. They also see many more ads simply because they&#8217;re online more often. Traditional attribution would credit all these holiday purchases to ads, showing massive returns on ad spend. But much of this purchasing would have happened anyway due to seasonal demand.</p><p>So correlation is not causation, and we have to experiment to test the impact of ads. However, even with randomized controlled trials, which are considered the gold standard in impact evaluation, getting clean estimates of advertising effectiveness is surprisingly elusive.</p><p><strong>Randomization is not all you need</strong></p><p>Imagine you want to test the impact of Nike ads on sales. The traditional solution would be to run an A/B test: divide your users randomly into treatment and control groups. The treatment group sees Nike ads, the control group doesn&#8217;t. Then you compare Nike sales between the two groups to estimate the advertising effect.</p><p>But the reality is that most users never search for Nike or even shoes. They won&#8217;t encounter a single Nike ad during their normal browsing experience for weeks or months. This means that in your treatment group, the vast majority of users won&#8217;t actually be <em>exposed</em> to a Nike ad, even though they&#8217;re technically <em>eligible</em> to see one. Similarly, in your control group, most users wouldn&#8217;t have seen a Nike ad anyway, even if they were allowed to.</p><p>So the difference in Nike sales between these massive treatment and control groups will be minuscule, and the true effect will be possibly <em>undetectable</em>. </p><p>The problem is that because you&#8217;ve blocked all ads for the control group, you can&#8217;t distinguish between two types of control users: those who would have seen a Nike ad <em>if allowed</em>, and those who wouldn&#8217;t have seen one regardless. </p><p><strong>Adjust for Exposure? </strong></p><p>Another approach is to estimate what fraction of users in the treatment group actually saw Nike ads, i.e. the exposure rate, then <em>assume the same fraction would have seen ads in the control group.</em> You can then mathematically adjust your estimate <em>upwards</em> by dividing by the fraction exposed, essentially scaling up your measurement to account for the <em>dilution</em>.</p><p>This approach has a flaw: it dramatically amplifies uncertainty. When you scale up a measurement by dividing by a small number (since exposure rates are typically low), the uncertainty of your estimate increases quadratically. On average you might be right, but your confidence intervals become so wide that the estimate becomes practically useless.</p><p>Adding to these challenges is the fact that advertising effects are typically small. Ads work through gentle <em>nudges</em> and repeated exposure, not dramatic immediate conversions like deep discounts or coupons might generate.</p><p><strong>Placebos?</strong></p><p>Another solution is the placebo ad approach. Instead of blocking ads entirely for the control group, you let the ad auction run normally, but at the last moment, when a Nike ad would have been shown to a control group user, you replace it with something else. Options can range from a public service announcement, a competitor&#8217;s ad, or a product feature highlight.</p><p>Now you know exactly which control users would have seen Nike ads because you tracked when Nike won the auction for them. You can create perfect comparison groups: treatment users who saw Nike ads versus control users who would have seen Nike ads but saw something else instead.</p><p>However, this approach brings <em>contamination</em> in the control group. Showing a different ad or content changes user behavior in unpredictable ways. A user who sees an Adidas ad instead of a Nike ad might behave differently than a user who sees no athletic shoe ad at all. A public service announcement might put users in a different mindset. The control group is no longer a clean counterfactual.</p><p><strong>Simulation as Solution</strong></p><p>Over the past decade, researchers at major tech companies have developed an elegant solution to these problems: ghost ads. </p><p>Under this method when a control group user comes online and triggers an ad opportunity (through a search, visiting a product page, or encountering an ad slot), the system runs two parallel auctions. The first is the real auction that determines what ad the user actually sees - and crucially, Nike is excluded from this auction. The second is a &#8220;ghost&#8221; auction that includes Nike&#8217;s ad.</p><p>The user only sees the result of the real auction, so Nike&#8217;s ad is never shown. But the ghost auction tells us something critical: would Nike have won this auction if it had been allowed to participate? If yes, we record a &#8220;ghost impression&#8221; - an impression that would have occurred in a world where this control user could see Nike ads.</p><p>This approach solves many problems. First, it eliminates dilution by identifying exactly which control users would have been exposed to Nike ads, allowing for precise comparisons with treated users who actually saw the ads. Second, it avoids contamination because control users see exactly what they would have seen in a world without Nike ads - the natural winner of the auction without Nike&#8217;s participation.</p><p><strong>Implementation Issues</strong></p><p>While conceptually elegant, implementing ghost ads requires careful attention to several technical details. </p><p>One challenge arises when a control user is in the control group for multiple advertisers simultaneously. Imagine a user is in the control group for both Nike and Adidas. If you run a single ghost auction including both, they might <em>censor</em> or crowd each other out in the ghost auction. The solution is to run separate ghost auctions for each advertiser. In Nike&#8217;s ghost auction, Adidas doesn&#8217;t exist, and vice versa. This ensures clean counterfactual impressions for each advertiser independently.</p><p>Another issue is that in marketplaces with thousands of advertisers, running ghost auctions for everyone becomes computationally expensive. Smart sampling strategies and caps on the number of simultaneous experiments become necessary for practical implementation. If one can store the exact configuration of the auction, and then one can run the ghost auctions later on in batch. This might be important given that there are strict latency constraints for real time ad serving. </p><p>Once these hiccups are resolved, calculating the average treatment effect on the treated is straightforward. It&#8217;s simply the average outcome for treatment users who saw the ad minus the average outcome for control users who received ghost impressions. This can be applied to any metric of interest: clicks, conversions, time on site, add-to-cart rates, or total spend.</p><p><strong>Beyond Measurement</strong></p><p>The ghost ads approach is particularly powerful when compared to traditional digital marketing attribution methods like last-click or first-click attribution. These older, simpler methods fully credit a conversion to the last (or first) ad clicked before purchase, ignoring the complex customer journey and multiple touchpoints that influence buying decisions. </p><p>However, the value of <em>incrementality</em> measurement can extend beyond reporting. These measurements become crucial inputs for improving the advertising ecosystem itself. Advertisers can use incrementality data to refine their bidding strategies, focusing budget on audiences and contexts where ads drive real behavioral change. Platforms can improve their ranking algorithms to surface more effective ads. </p><p>The ghost ads story illustrates an important principle. Having lots of data or even randomization isn&#8217;t enough. What is needed is thoughtful experimental design that goes beyond simple A/B tests.</p><p><strong>Limitations</strong></p><p>Of course, this approach requires significant engineering effort. And this approach is only possible from the point of view of the platform. So if you&#8217;re not the platform but merely the advertiser, then implementing something like this becomes much harder (though not impossible, a version called Ghost Bids does exist). Ghost ads also does not solve the problem of interference: users in treatment group can simply talk to their friends, who may be in the control group, distorting their behavior. </p><p>One alternative can be geo-experimentation, where you shut off ads for an entire region or geo; and then compare outcomes across other geos. However, that too requires the availability of different geographies as well as a willingness to experiment for extended periods in them.  </p><p><strong>References</strong></p><ol><li><p>Johnson, G. A., Lewis, R. A., &amp; Nubbemeyer, E. I. (2017). Ghost ads: Improving the economics of measuring online ad effectiveness. <em>Journal of Marketing Research</em>, 54(6), 867-884.</p></li><li><p>Johnson, G. A., Lewis, R. A., &amp; Reiley, D. H. (2017). When less is more: Data and power in advertising experiments. <em>Marketing Science</em>, 36(1), 43-53.</p></li><li><p>Gordon, B. R., Zettelmeyer, F., Bhargava, N., &amp; Chapsky, D. (2019). A comparison of approaches to advertising measurement: Evidence from big field experiments at Facebook. <em>Marketing Science</em>, 38(2), 193-225.</p></li></ol><p></p>]]></content:encoded></item><item><title><![CDATA[How to work with LLMs ]]></title><description><![CDATA[Try not to lose your mind.]]></description><link>https://pranjalrawat42.substack.com/p/how-to-work-with-llms</link><guid isPermaLink="false">https://pranjalrawat42.substack.com/p/how-to-work-with-llms</guid><dc:creator><![CDATA[Pranjal Rawat, PhD]]></dc:creator><pubDate>Sat, 31 May 2025 07:09:14 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!UPbR!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b378f04-6761-4a18-9217-4af2668afe0e_730x730.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>LLMs are not genies who will give you anything you wish. They need to be coaxed, cajoled, courted, chaperoned and sometimes clawed at, compelled and even choked to get you what you <em>really </em>want. In this post, I note things that worked for me. Since we might all lose our jobs if we don&#8217;t learn to be masters of prompting. </p><h4><strong>Planning helps. </strong></h4><p>Lets start by acknowledging that it would be nice if <em>you</em> <em>yourself knew what you want. </em>So take the time to pencil out, daydream through, whiteboard a plan even before you ask the LLM to do something. Having a very clear target is helpful for LLMs, as they are executers and do&#8217;ers and struggle with ambiguity and creativity.</p><p>It also helps to understand how LLMs work. Each time you chat to them, your whole chat history is picked up and fed back in. This includes any text they themselves produce. Think of a monster swallowing your entire chat every single time. Then they spit out words in a sequence. Everything in, sequence out. </p><p>So you can dump stuff into them in any order, but you cannot ask them to output stuff in simply any order. Generally, the LLM will understand this and only output stuff in a particular manner (e.g. not answering a math question in reverse). But you can help it considerably by asking it to do stuff in a particular order. By asking it to break the task down into logical chunks and steps that lead to the next. So break the task into smaller sequences. </p><h4><strong>Memory and attention. </strong></h4><p>Next, find out what the context window length is. Depending on which model you are working with, the context history can be very small or very large. For instance, the Gemini models have a huge context window while some GPT models have a very small one. A large context window means you can choke it with long text and it will remember everything mostly well. A small context window means that just after a few interactions&#8212;the critical instructions you began with have been forgotten and you will have to remind. </p><p>Beyond context window, which is a kind of long run memory, LLMs also have a short-run attention window. This means that you only have a limited budget of attention in each response. So if you bundle task 1, 2 and 3; then you may get poor performance on all three. But if you let it work each task in different interactions, it will pay more attention to the details of each task. Hence, it is even more important to break up the core tasks and plan before working with LLMs. </p><h4><strong>Context, specificity and prompt libraries.</strong></h4><p>It is easier to ask them to do something, rather than <em>not do something</em>. If I say, &#8220;Find me all the insulting words in this document&#8221;, then the LLM will deliver. But if I say, &#8220;Find me all the not so insulting words in this document&#8221;, then that could mean anything. In a lot of human conversation, for each assertion the negation is usually understood as per the context of the discussion. GPTs have no such context. </p><p>So <em>context matters.</em> Dump as much context as you can. Papers, books, docs, photos, email threads, your chat history, screenshots of your file structure, audio messages. I find helpful to speak out what I want and convert that to text &#8212; often that is easier than typing. Human&#8217;s slow speed in typing is a huge limitation to how well we interact with LLMs. Overcome that by spamming ctrl C + ctrl V. </p><p>Beyond context, <em>specificity</em> matters. Be vague, and get vague results. One way to help yourself is after providing context, <em>ask the LLM to ask you highly specific and probing questions</em> about the plan. This pushes the onus of thinking back to you. This will be painful as you will have to spend a lot of time clarifying and thinking about design choices. </p><p>Offer examples and prompts, that have worked for you in the past. Initially you will have nothing, but over time you can create a personal library of prompts and examples. Working with LLMs is a long term affair. You make it do something well. Then later you use that as an example. You find a good prompt and you save that for later. So we have to replace libraries of code / docs for libraries of prompts. There is no free lunch after all. </p><h4><strong>Diagnosis, Design and Execution</strong></h4><p>One simple way to work with GPTs is to take it slower. Try to separate tasks into diagnosis, design and execution. </p><p>Diagnosis is about understanding the crux of the problem or the root cause of the error we are trying to fix. Prompts like: &#8220;what is the issue in this code?&#8221; or &#8220;what is the problem here?&#8221; will help focus the GPT on pinpointing the root cause. </p><p>Once we have diagnosed the problem, we can design a solution. Here we can ask the GPT to offer options. You can try, &#8220;Offer some options?&#8221; or &#8220;Plan some possible solutions&#8221;. Then you can weigh in and choose the option you prefer. These design decisions contain important domain knowledge which GPTs do not have, and should be provided by you. </p><p>Execution is about how you do it (e.g. code writing, charting, table creation, etc.). My personal view is that GPTs are good for execution once you already know broadly what to do. </p><h4><strong>Varying strengths and common weaknesses. </strong></h4><p>Different models have different strengths and vary along different axis: general intelligence, coding abilities, writing prowess, memory and context windows, framing and communications, internal-tools, cost, etc. For instance, Claude writes well, Gemini remembers well and spits out text fast, Cursor is great for making many smaller edits at once and repo management, NotebookLM is great for crawling large corpus of documents to get you precise answers, Perplexity searches through the largest number of documents possible, GPTs has great internal-tools (Python command line, visualizations, etc) and has the most user-friendly interface. If you are using APIs, the cost structure of the APIs will also vary quite a bit (even within the GPT models). So try to pick the model as per the task (if you can afford it). </p><p>You should also know the common problems that LLM suffer from: </p><ol><li><p><em>Sycophancy</em>&#8212; the art of always being agreeable and agreeing.</p></li><li><p><em>Hallucination</em>&#8212;straight up passing fiction as truth.</p></li><li><p><em>Limited memory</em> &#8212; they may have simply forgotten what you initially asked for. </p></li><li><p><em>Calculation</em>&#8212;despite recent progress, LLMs make calculation mistakes. </p></li></ol><h4><strong>Try not to lose your mind. </strong></h4><p>So while LLMs have taken up the grunt work, for anything beyond simple tasks they  force us to do the thinking. This is particularly unpleasant&#8212;as any one who has been forced to do thinking will attest. And reading&#8212;a lot of reading. Try not to lose your mind, but you probably will.  </p>]]></content:encoded></item><item><title><![CDATA[The Flippin Coin: A Short Story]]></title><description><![CDATA[Starring Fisher, Neyman, Pearson, Wald, and Bayes]]></description><link>https://pranjalrawat42.substack.com/p/the-flippin-coin-a-short-story</link><guid isPermaLink="false">https://pranjalrawat42.substack.com/p/the-flippin-coin-a-short-story</guid><dc:creator><![CDATA[Pranjal Rawat, PhD]]></dc:creator><pubDate>Sun, 09 Feb 2025 20:54:49 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!wqqj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F079128cb-8ea5-4f7a-bf34-ce2fd78bd400_615x461.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote><p>Recently, I read this old article, titled <em><a href="https://sciences.ucf.edu/biology/d4lab/wp-content/uploads/sites/23/2023/01/Gigerenzer-2004-Mindless-Statistics.pdf">Mindless Statistics</a></em>, which criticized the &#8220;ritual&#8221; of <em>hypothesis testing</em> as it was practiced at the time. It was interesting because it clarified a few distinct approaches. I thought I&#8217;d write a story around it. </p></blockquote><p><strong>Scene 1 </strong></p><p>Once upon a very bright and sunny morning I came across a strange coin on the road&#8212; it was glossy and had strange 19th century markings. Curious, I pocketed it. Google said it was a vintage gambling coin. Excited, I called up my local gambling den. They said that they would buy for a huge sum it if it were functioning perfectly&#8212; they could use it for gala nights. So now I really needed to determine if it was fair or biased. Not knowing much about statistics I decided to approach the experts. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wqqj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F079128cb-8ea5-4f7a-bf34-ce2fd78bd400_615x461.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wqqj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F079128cb-8ea5-4f7a-bf34-ce2fd78bd400_615x461.jpeg 424w, https://substackcdn.com/image/fetch/$s_!wqqj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F079128cb-8ea5-4f7a-bf34-ce2fd78bd400_615x461.jpeg 848w, https://substackcdn.com/image/fetch/$s_!wqqj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F079128cb-8ea5-4f7a-bf34-ce2fd78bd400_615x461.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!wqqj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F079128cb-8ea5-4f7a-bf34-ce2fd78bd400_615x461.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wqqj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F079128cb-8ea5-4f7a-bf34-ce2fd78bd400_615x461.jpeg" width="615" height="461" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/079128cb-8ea5-4f7a-bf34-ce2fd78bd400_615x461.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:461,&quot;width&quot;:615,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:79850,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&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_!wqqj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F079128cb-8ea5-4f7a-bf34-ce2fd78bd400_615x461.jpeg 424w, https://substackcdn.com/image/fetch/$s_!wqqj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F079128cb-8ea5-4f7a-bf34-ce2fd78bd400_615x461.jpeg 848w, https://substackcdn.com/image/fetch/$s_!wqqj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F079128cb-8ea5-4f7a-bf34-ce2fd78bd400_615x461.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!wqqj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F079128cb-8ea5-4f7a-bf34-ce2fd78bd400_615x461.jpeg 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><strong>Scene 2</strong></p><p>It was high noon when I reached Fisher&#8217;s home. He was chatting with Gelman. </p><p>Fisher said <em>&#8220;Assume the coin is fair. Then flip it a few times. Tally the number of heads and tails. Is this far from what you expect? If the coin was fair, how unlikely or surprising is a tally this extreme or more so?&#8221;. </em></p><p>So I flipped the coin n=30 times and saw k=19 heads. If p is the probability of the coin landing heads the chance of this happening is: </p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\Pr(k = 19 \\mid p=0.5, n=30) \\;=\\; \\binom{n}{k} p^k (1 - p)^{n-k} = 0.05&quot;,&quot;id&quot;:&quot;ZFXQZXBHLF&quot;}" data-component-name="LatexBlockToDOM"></div><p>But this is not what Fisher was asking for. He was asking for the chance of observing 19 <em>or more</em> heads, assuming the coin is fair. That would be: </p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\Pr\\bigl(k \\geq 19 \\mid p=0.5, n=30\\bigr)\n\\;=\\;\n\\sum_{x = k}^{n}\n\\binom{n}{x}\np^{x}\n(1 - p)^{n - x} = 0.10&quot;,&quot;id&quot;:&quot;BRAFEPTTHF&quot;}" data-component-name="LatexBlockToDOM"></div><p>This is the <em>p-value</em>. At 0.10 it implies that if we repeated this n=30 flip experiment a million times, then 1 in every 10 would be k=19 heads or more. </p><p>So Fisher says, <em>&#8220;Look, seeing 19 heads out of 30 has a one-sided p-value of 0.10 under fairness, so it&#8217;s not really a surprise. We cannot reject the notion that the coin is fair.&#8221;</em></p><p>Me (excited): <em>&#8220;So is it fair, then?&#8221; </em></p><p>Fisher (sombre): <em>&#8220;No, we just know that it could be. We only have evidence that we cannot reject that notion.&#8221;</em></p><p>Me: <em>&#8220;Oh no! I wish had gotten just 1 more heads. Then I would have a p-value below 0.05!&#8221;</em></p><p>At this Gelman, who had been silent so far, <a href="https://www.tandfonline.com/doi/pdf/10.1198/000313006X152649?casa_token=QexA1YoN-KYAAAAA:xHKblSgvQ9rhOTh5S0esELngABMJdUDoeJ7OHbtq6BFAg1ZzO82dk-19S7O39jOrY2JPF0vplZGTpw">quipped</a>, <em>&#8220;Not really. The difference between statistical insignificance (19) and significance (20), is itself not statistically significant.&#8221;</em></p><p>Frustrated with Fisher&#8217;s lack of definitiveness and Gelman&#8217;s hard-to-follow language, I did what is typically done in these situations. I took a second opinion.</p><p><strong>Scene 3</strong></p><p>I met Neyman and Pearson at their office in the afternoon.</p><p>After hearing me out, Neyman said: <em>&#8220;Well, we can&#8217;t only rely on a &#8220;surprise&#8221; to take a decision. We must first specify the costs and benefits and what decision this test is tied to?&#8221;</em></p><p>Me: <em>&#8220;I want to know if this coin is fair because I want to sell it for a lot of money. However, if the coin is actually fair but my test wrongly calls it biased, I&#8217;d simply lose the sale. I can live with that risk, so maybe we can tolerate up to 20% chance of discarding a fair coin.&#8221;</em></p><p>Pearson: <em>&#8220;So your Type&#8239;I error (alpha)&#8212;rejecting fairness when it is in fact fair&#8212;can be as high as 20%.&#8221; </em></p><p>Me: <em>&#8220;On the other hand, if the coin is truly biased, I absolutely do <strong>not</strong> want to end up calling it fair&#8212;I&#8217;d be discovered as a fraud. Let&#8217;s keep that risk really low, say 5%.&#8221;</em></p><p>Neyman: <em>&#8220;So your Type&#8239;II error (beta)&#8212;failing to reject fairness when it&#8217;s actually biased&#8212;must be below 5%.&#8221;</em></p><p>Pearson: <em>&#8220;Now we need to compute a sample size for this experiment. Before we do that we need to figure out how minute a difference can your gambling den detect.&#8221; </em></p><p>Me: <em>&#8220;Well they are experts so they would immediately catch minute differences. I guess if the coin truly has p&gt;0.51, they would be sure to detect it.&#8221; </em></p><p>Neyman: <em>&#8220;So your minimum detectable effect is 0.01, your null hypothesis is H0:p0=0.5 and your alternative hypothesis is H1:p1=0.51.&#8221;</em></p><p>The decision rule will be a cut-off: choose H1 if k&gt;=c and choose H0 if k&lt;c. </p><p>Now under fairness, given a value of cutoff c, the probability of observing k and declaring the coin as biased when it is not (false positive) must be kept below alpha.</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\underbrace{\n\\sum_{k = c}^{n} \\binom{n}{k} \\,p_0^{\\,k}\\,\\bigl(1 - p_0\\bigr)^{\\,n-k}\n}_{\\text{Probability of Type I error}}\n\\;\\le\\; \\alpha,&quot;,&quot;id&quot;:&quot;JHWWGQXDSC&quot;}" data-component-name="LatexBlockToDOM"></div><p>Now under unfairness, and given c, the probability of observing k and declaring the coin as fair (false negative) must be kept less than beta. </p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\underbrace{\n\\sum_{k = 0}^{c-1} \\binom{n}{k} \\,p_1^{\\,k}\\,\\bigl(1 - p_1\\bigr)^{\\,n-k}\n}_{\\text{Probability of Type II error}}\n\\;\\le\\; \\beta&quot;,&quot;id&quot;:&quot;ZGAUNSNEWA&quot;}" data-component-name="LatexBlockToDOM"></div><p></p><p>I scratch my head, how on earth does one find a n and c that satisfy thisPearson blitzes out some code and says: <em>&#8220;I ran some computer simulations and found that n=15,482 and c=7,794.&#8221;</em></p><p>Me (shocked): <em>&#8220;What! So many coin flips for something so trivial. Fisher just had me flip 30.&#8221;</em></p><p>Neyman: <em>&#8220;That&#8217;s because you want to detect a tiny difference. We need much more data to test a difference of 0.01.&#8221; </em></p><p>Me: <em>&#8220;Then what can I get with just 30 flips?&#8221;</em></p><p>Pearson: <em>&#8220;If we allow only 30 flips, the best cutoff that maintains alpha at 0.2 is c=18, but yields a beta=0.79. So the test is underpowered as power = 1-beta. And if we use the commonly used alpha = 0.05, then the cutoff becomes c=20 but now beta soars to 0.94&#8212;power only 0.06! Your test will never detect the bias, even if there was!&#8221;</em></p><p>Now I did not have time to flip the coin so many times, so tongue in cheek, I thanked them and left feeling more frustrated than before. </p><p><strong>Scene 4</strong></p><p>Abraham Wald was smoking a pipe as I explained to him I simply did not have time to flip the coin 15,482 times. </p><p>Wald: <em>&#8220;I see you spoke to the other guys. They want you to flip a fixed number of coins. That&#8217;s so last century. Why not collect data sequentially and stop as soon as you&#8217;ve learned enough?&#8221;</em></p><p>Me: &#8220;How do we do that?&#8221;</p><p>Wald: <em>&#8220;Well we define some metric that measures the weight of evidence, and define thresholds. Then we flip coins and track this metric over time. If the metric breaches the boundaries we have sufficient evidence to call it, otherwise we continue flipping.&#8221; </em></p><p>For n flips and k observed heads, the <em>likelihood ratio</em> is given as, </p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\frac{\\Pr(\\text{data} \\mid p = p_1)}{\\Pr(\\text{data} \\mid p = p_0)}\\;=\\;\n\\frac{\n\\binom{n}{k}\\,p_1^k\\,(1-p_1)^{n-k}\n}{\n\\binom{n}{k}\\,p_0^k\\,(1-p_0)^{n-k}\n}\n\\;=\\;\n\\left(\\frac{p_1}{p_0}\\right)^k\n\\left(\\frac{1-p_1}{1-p_0}\\right)^{n-k}&quot;,&quot;id&quot;:&quot;PZDRDTWVJM&quot;}" data-component-name="LatexBlockToDOM"></div><p>If this is greater than 1 we have evidence for bias (p1) and if it is less than 1 we have evidence for fairness (p0). Fortunately, we do not need to compute this at each flip. If we flip another coin and find heads all we need to do is multiply this ratio by p1/p0, and if tails multiply by (1-p1)/(1-p0). </p><p>Wald scribbles some illegible math to show that thresholds can be derived as,</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;A \\;=\\; \\frac{1 - \\beta}{\\alpha}\n\\;=\\; 4.75,\n\\quad\nB \\;=\\;\n\\frac{\\beta}{\\,1 - \\alpha\\,}\n\\;=\\;\n0.0625.&quot;,&quot;id&quot;:&quot;BFOVDAGNGC&quot;}" data-component-name="LatexBlockToDOM"></div><p>Intuitively, being cautious (low alpha) increases A. In contrast, being ambitious (low beta) reduces A. The reverse for B. So all we need to do is wait for this metric to either rise higher than A or lower than B. </p><p>Wald: <em>&#8220;And so we just need to watch this ratio, which moves like a stock price.&#8221;</em></p><p>Being an expert stock price watcher and eager to finish this in time, I began flipping coins and tallying heads. I was very hopeful that I&#8217;d have an answer by sundown. </p><p>However, that was not so. </p><p>The metric never breached the threshold at all. </p><p>After 3000 flips this is what it looked like: </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!UUJl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b41d2ea-c077-45ca-ae67-38beb2338bb5_625x396.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!UUJl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b41d2ea-c077-45ca-ae67-38beb2338bb5_625x396.png 424w, https://substackcdn.com/image/fetch/$s_!UUJl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b41d2ea-c077-45ca-ae67-38beb2338bb5_625x396.png 848w, https://substackcdn.com/image/fetch/$s_!UUJl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b41d2ea-c077-45ca-ae67-38beb2338bb5_625x396.png 1272w, https://substackcdn.com/image/fetch/$s_!UUJl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b41d2ea-c077-45ca-ae67-38beb2338bb5_625x396.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!UUJl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b41d2ea-c077-45ca-ae67-38beb2338bb5_625x396.png" width="625" height="396" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3b41d2ea-c077-45ca-ae67-38beb2338bb5_625x396.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:396,&quot;width&quot;:625,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:33908,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!UUJl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b41d2ea-c077-45ca-ae67-38beb2338bb5_625x396.png 424w, https://substackcdn.com/image/fetch/$s_!UUJl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b41d2ea-c077-45ca-ae67-38beb2338bb5_625x396.png 848w, https://substackcdn.com/image/fetch/$s_!UUJl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b41d2ea-c077-45ca-ae67-38beb2338bb5_625x396.png 1272w, https://substackcdn.com/image/fetch/$s_!UUJl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b41d2ea-c077-45ca-ae67-38beb2338bb5_625x396.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>It just meandered on and on. And soon it was midnight. </p><p>Me: <em>&#8220;Wald, I think I need to go home now. What if it never crosses the threshold? Can we conclude anything from what we have now?&#8221;</em></p><p>Wald: <em>&#8220;No we cannot. If a conclusion was not found then you cannot stop flipping.&#8221;</em></p><p>Me: <em>&#8220;But will this end at some point?&#8221;</em></p><p>Wald: <em>&#8220;Theoretically, this could go on forever. It&#8217;s less likely though.&#8221;</em></p><p>My head was spinning. I had wasted all evening&#8212;and was no closer to finding out if this bloody coin was fair or not.  </p><p><strong>Scene 5</strong></p><p>It was midnight, I was just getting home when a figure emerged from the shadows, wearing what looked like an old academic robe. <em>&#8220;I couldn't help but overhear your conversations with my... more conventional colleagues,&#8221;</em> he said with a knowing smile. <em>&#8220;Perhaps you're asking the wrong question entirely.&#8221;</em></p><p>Me (startled): <em>&#8220;Bayes! You scared me. Yes, I just need to know if this coin is fair&#8221;</em></p><p>Bayes (whispering)<em>: &#8220;Let me guess&#8212;you&#8217;re tired of yes/no decisions, thresholds, and indefinite tests? What if I told you that what you need is an interval where p should most likely lie.&#8221;</em></p><p><em>&#8220;Wow&#8230;Yes, that is indeed what I&#8217;m looking for.&#8221;</em></p><p>Bayes (draws closer): <em>&#8220;But first, tell me what you deeply believe. In your heart of hearts, what are your apriori beliefs about p?&#8221;</em></p><p><em>&#8220;Eh? I don&#8217;t think the coin is either fully biased or fully fair, and since we have struggled to find anything so far, p does not seem to be too far from 0.5.&#8221;</em></p><p><em>&#8220;Let&#8217;s take a prior belief of p~Beta(10, 10), it is symmetric and narrowly distributed around 0.5, and update it with the k=19 heads you saw from n=30 trials.&#8221;</em></p><p>Bayes explained that if p is believed to be distributed as:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;p \\;\\sim\\; \\mathrm{Beta}\\bigl(10, 10\\bigr).&quot;,&quot;id&quot;:&quot;YMZKZZDBYS&quot;}" data-component-name="LatexBlockToDOM"></div><p>Then we can exploit the Beta-Binomial relationship to easily derive the conjugate posterior which represents our updated beliefs about p. Using the fact that we we saw k=19 heads out of n=30, p should be:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;p \\;\\Big|\\; \\bigl(k,n\\bigr)\n\\;\\sim\\;\n\\mathrm{Beta}\\Bigl(10 + k,\\; 10 + (n-k)\\Bigr) = \\mathrm{Beta}\\Bigl(29,\\; 21\\Bigr)&quot;,&quot;id&quot;:&quot;RKIEMYZIII&quot;}" data-component-name="LatexBlockToDOM"></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jNLb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc12ccd5e-76c0-499d-94a2-af6915fe192e_525x397.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jNLb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc12ccd5e-76c0-499d-94a2-af6915fe192e_525x397.png 424w, https://substackcdn.com/image/fetch/$s_!jNLb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc12ccd5e-76c0-499d-94a2-af6915fe192e_525x397.png 848w, https://substackcdn.com/image/fetch/$s_!jNLb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc12ccd5e-76c0-499d-94a2-af6915fe192e_525x397.png 1272w, https://substackcdn.com/image/fetch/$s_!jNLb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc12ccd5e-76c0-499d-94a2-af6915fe192e_525x397.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jNLb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc12ccd5e-76c0-499d-94a2-af6915fe192e_525x397.png" width="525" height="397" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c12ccd5e-76c0-499d-94a2-af6915fe192e_525x397.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:397,&quot;width&quot;:525,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:28378,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!jNLb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc12ccd5e-76c0-499d-94a2-af6915fe192e_525x397.png 424w, https://substackcdn.com/image/fetch/$s_!jNLb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc12ccd5e-76c0-499d-94a2-af6915fe192e_525x397.png 848w, https://substackcdn.com/image/fetch/$s_!jNLb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc12ccd5e-76c0-499d-94a2-af6915fe192e_525x397.png 1272w, https://substackcdn.com/image/fetch/$s_!jNLb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc12ccd5e-76c0-499d-94a2-af6915fe192e_525x397.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>Bayes (excited): <em>&#8220;We can find a 95% credible interval for p to lie in: [0.442, 0.712].&#8221; </em></p><p>Me: <em>&#8220;Wow! But this&#8230; too wide for me to decide. Could I instead get to directly compare hypothesis p = 0.51 vs p = 0.50?&#8221;</em></p><p>Bayes noted that as I observed 19 out of 30, the likelihood of the null hypothesis is,</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;L(H0)=\\Pr\\bigl(k \\,\\bigm|\\, p = 0.5\\bigr)\n\\;=\\;\n\\binom{n}{k}\\,\\bigl(0.5\\bigr)^{k}\\,\\bigl(0.5\\bigr)^{\\,n-k} \\;=\\; 0.051&quot;,&quot;id&quot;:&quot;LSRJJABAHP&quot;}" data-component-name="LatexBlockToDOM"></div><p>and the likelihood of the alternative hypothesis is, </p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;L(Ha)=\\Pr\\bigl(k \\,\\bigm|\\, p = 0.51\\bigr)\n\\;=\\;\n\\binom{n}{k}\\,\\bigl(0.51\\bigr)^{k}\\,\\bigl(0.51\\bigr)^{\\,n-k}\\;=\\; 0.060&quot;,&quot;id&quot;:&quot;EPCQVHDJLJ&quot;}" data-component-name="LatexBlockToDOM"></div><p>Which is just slightly more. We construct the Bayes factor or posterior odds ratio: </p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\text{Posterior Odds} = \\mathrm{BF}\n\\;=\\;\\frac{L(H_0)}{L(H_1)} = \\;=\\;\\frac{(0.50)^{30}}\n          {(0.51)^{19}\\,(0.49)^{11}} = 0.8573&quot;,&quot;id&quot;:&quot;ANYBIZOUAJ&quot;}" data-component-name="LatexBlockToDOM"></div><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\text{Posterior probability of } H_a\n\\;=\\;\\frac{1}{1 + \\mathrm{BF}} = 0.538\n\\quad&quot;,&quot;id&quot;:&quot;GQFMHLIQOM&quot;}" data-component-name="LatexBlockToDOM"></div><p></p><p>Bayes: <em>&#8220;And so there is a 0.53 probability of H1:p=0.51 and 0.47 probability of H0:p=0.50.&#8221;</em></p><p>Me (dismayed): <em>&#8220;Great! I &#8230;wait&#8230;that&#8217;s not very helpful. That&#8217;s like flipping a coin!&#8221;</em></p><p>Bayes: <em>&#8220;Well? do you have one lying around?"</em></p><p>Needless to say, that day I learned a lot about statistics but not if the coin was fair. </p><p><strong>Epilogue</strong></p><p>Frustrated with statisticians the next day I went to meet economists. But they laughed and said if the coin was valuable someone would have picked it up already. </p><p><a href="https://colab.research.google.com/drive/19Js_ZbBLRTQjppkNuL7atNqj5clJeA7u?usp=sharing">Code.</a></p><p> </p><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[Econ 101: Who will Generative AI displace?]]></title><description><![CDATA[Depends on the degree of substitutability]]></description><link>https://pranjalrawat42.substack.com/p/econ-101-who-will-generative-ai-displace</link><guid isPermaLink="false">https://pranjalrawat42.substack.com/p/econ-101-who-will-generative-ai-displace</guid><dc:creator><![CDATA[Pranjal Rawat, PhD]]></dc:creator><pubDate>Sat, 18 Jan 2025 03:03:19 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!wA3i!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb93190cb-e97a-4da4-8370-96aa8c5b3fa6_1490x390.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>People generally understand that those whose work is highly substitutable with Gen AI, might be displaced in the near future. But can we sharpen this insight? I use a simplified Econ 101 model to precisely understand our concerns about Gen AI.</p><blockquote><p><strong>TL&#8217;DR</strong> A toy demand-supply model shows that improvements to Generative AI will lower prices, increase sales, and generally increase AI engineers' wages and employment. Its effects on non-AI engineers depend on their substitutability with AI: complementary labor benefits, while substitutable labor suffers. </p></blockquote><p><strong>Goods Market </strong></p><p>Industry demand is downward sloping: </p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;Q_d \\;=\\; \\alpha \\;-\\; \\beta\\,p,&quot;,&quot;id&quot;:&quot;SCSAJAMBQU&quot;}" data-component-name="LatexBlockToDOM"></div><p>Supply depends on the labor inputs of AI engineers, who create Gen AI content, and non AI engineers, who do other stuff. The level of Gen AI technology, represented by &#8220;A&#8221;, magnifies the output from the AI engineers.</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;Q_s \\;=\\;\n  \\Bigl[\\,\n    \\gamma\\,(A\\,L^d_1)^\\rho \n    \\;+\\;\n    (1-\\gamma)\\,(L^d_2)^\\rho\n  \\Bigr]^{\\frac{1}{\\rho}}&quot;,&quot;id&quot;:&quot;PWEPLVFWJT&quot;}" data-component-name="LatexBlockToDOM"></div><p>The parameter &#8220;rho&#8221; measures the substitution between labor inputs. Examining input values that yield the same outputs (5, 10, 15), it becomes clear that when rho &#8776; 1, inputs are fully substitutable on a one-to-one basis. As rho approaches -&#8734;, the inputs become perfectly complementary, meaning either input can become a bottleneck.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wA3i!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb93190cb-e97a-4da4-8370-96aa8c5b3fa6_1490x390.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wA3i!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb93190cb-e97a-4da4-8370-96aa8c5b3fa6_1490x390.png 424w, https://substackcdn.com/image/fetch/$s_!wA3i!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb93190cb-e97a-4da4-8370-96aa8c5b3fa6_1490x390.png 848w, https://substackcdn.com/image/fetch/$s_!wA3i!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb93190cb-e97a-4da4-8370-96aa8c5b3fa6_1490x390.png 1272w, https://substackcdn.com/image/fetch/$s_!wA3i!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb93190cb-e97a-4da4-8370-96aa8c5b3fa6_1490x390.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wA3i!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb93190cb-e97a-4da4-8370-96aa8c5b3fa6_1490x390.png" width="1456" height="381" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b93190cb-e97a-4da4-8370-96aa8c5b3fa6_1490x390.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:381,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:65486,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&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_!wA3i!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb93190cb-e97a-4da4-8370-96aa8c5b3fa6_1490x390.png 424w, https://substackcdn.com/image/fetch/$s_!wA3i!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb93190cb-e97a-4da4-8370-96aa8c5b3fa6_1490x390.png 848w, https://substackcdn.com/image/fetch/$s_!wA3i!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb93190cb-e97a-4da4-8370-96aa8c5b3fa6_1490x390.png 1272w, https://substackcdn.com/image/fetch/$s_!wA3i!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb93190cb-e97a-4da4-8370-96aa8c5b3fa6_1490x390.png 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><strong>Labor Market</strong></p><p>Firms hire labor until marginal cost equals marginal benefit, given fixed prices and wages. This means that the demand for labor is falling in its wage. </p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;w_1 \\;=\\; p\\,\\frac{\\partial Q_s}{\\partial L^d_1}&quot;,&quot;id&quot;:&quot;SBWIJYBVXZ&quot;}" data-component-name="LatexBlockToDOM"></div><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;w_2 \\;=\\; p\\,\\frac{\\partial Q_s}{\\partial L^d_2}&quot;,&quot;id&quot;:&quot;OZWJOURZAD&quot;}" data-component-name="LatexBlockToDOM"></div><p>The labor supply is an upward sloping function of the wage for both AI engineers (indexed by 1) and non AI engineers (indexed by 2). A higher wage causes more workers to pivot to that role.</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;L^s_1 \\;=\\; a + b\\,w_1&quot;,&quot;id&quot;:&quot;XJFBNHPIQU&quot;}" data-component-name="LatexBlockToDOM"></div><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;L^s_2 \\;=\\; a + b\\,w_2&quot;,&quot;id&quot;:&quot;ARUFRVULJC&quot;}" data-component-name="LatexBlockToDOM"></div><p><strong>Equilibrium</strong></p><p>Prices and wages adjust so that demand and supply are in balance. </p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;Q_d = Q_s,\\; L^d_1 = L^s_1,\\; L^d_2 = L^d_2 &quot;,&quot;id&quot;:&quot;VEYOVETOMF&quot;}" data-component-name="LatexBlockToDOM"></div><p><strong>Numerical Solution</strong></p><p>This gives rise to a system of equations with 6 unknowns and 6 equations, the solution representing the equilibrium. I select specific values for the parameters (a, b, etc.), utilize a numerical solver to find the equilibrium, and analyze how the equilibrium shifts when Gen AI technologies are introduced, specifically when the parameter &#8220;A&#8221; increases.</p><p><strong>Example 1: High Substitutability (Rho = 0.5)</strong></p><p>In roles like marketing content creation, entry level programming, report writing, and customer service, the role of non AI engineers is highly substitutable to what AI can create. The introduction of Gen AI here increases the productivity of AI engineers and firms will hire more of them. The need for non AI engineers falls, as they are substitutable, and they are displaced. Consumers are spoilt for choice and prices fall and sales increase.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gExV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5c6a1bb-0852-47b4-ad8e-7a1795c11fc5_1790x490.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gExV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5c6a1bb-0852-47b4-ad8e-7a1795c11fc5_1790x490.png 424w, https://substackcdn.com/image/fetch/$s_!gExV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5c6a1bb-0852-47b4-ad8e-7a1795c11fc5_1790x490.png 848w, https://substackcdn.com/image/fetch/$s_!gExV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5c6a1bb-0852-47b4-ad8e-7a1795c11fc5_1790x490.png 1272w, https://substackcdn.com/image/fetch/$s_!gExV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5c6a1bb-0852-47b4-ad8e-7a1795c11fc5_1790x490.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gExV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5c6a1bb-0852-47b4-ad8e-7a1795c11fc5_1790x490.png" width="1456" height="399" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d5c6a1bb-0852-47b4-ad8e-7a1795c11fc5_1790x490.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:399,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:102168,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!gExV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5c6a1bb-0852-47b4-ad8e-7a1795c11fc5_1790x490.png 424w, https://substackcdn.com/image/fetch/$s_!gExV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5c6a1bb-0852-47b4-ad8e-7a1795c11fc5_1790x490.png 848w, https://substackcdn.com/image/fetch/$s_!gExV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5c6a1bb-0852-47b4-ad8e-7a1795c11fc5_1790x490.png 1272w, https://substackcdn.com/image/fetch/$s_!gExV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5c6a1bb-0852-47b4-ad8e-7a1795c11fc5_1790x490.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><strong>Example 2: Somewhat Complementary (Rho near 0)</strong></p><p>In some industries, the role of non AI engineers is somewhat complementary but also somewhat substitutable to AI. Example: analytics, software, etc. When the two labor types are more complementary, the productivity boost for AI engineers does not displace non AI engineers. Non AI engineers can remain in demand, and their wages and employment may rise. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!T6KG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F347cb5bf-6097-47f8-9028-f9a02327ebf5_1790x490.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!T6KG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F347cb5bf-6097-47f8-9028-f9a02327ebf5_1790x490.png 424w, https://substackcdn.com/image/fetch/$s_!T6KG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F347cb5bf-6097-47f8-9028-f9a02327ebf5_1790x490.png 848w, https://substackcdn.com/image/fetch/$s_!T6KG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F347cb5bf-6097-47f8-9028-f9a02327ebf5_1790x490.png 1272w, https://substackcdn.com/image/fetch/$s_!T6KG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F347cb5bf-6097-47f8-9028-f9a02327ebf5_1790x490.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!T6KG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F347cb5bf-6097-47f8-9028-f9a02327ebf5_1790x490.png" width="1456" height="399" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/347cb5bf-6097-47f8-9028-f9a02327ebf5_1790x490.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:399,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:105838,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!T6KG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F347cb5bf-6097-47f8-9028-f9a02327ebf5_1790x490.png 424w, https://substackcdn.com/image/fetch/$s_!T6KG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F347cb5bf-6097-47f8-9028-f9a02327ebf5_1790x490.png 848w, https://substackcdn.com/image/fetch/$s_!T6KG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F347cb5bf-6097-47f8-9028-f9a02327ebf5_1790x490.png 1272w, https://substackcdn.com/image/fetch/$s_!T6KG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F347cb5bf-6097-47f8-9028-f9a02327ebf5_1790x490.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><strong>Example 3: Very strongly complementary (Rho = -0.5)</strong></p><p>There is also a situation where the complementarity of non AI engineers is so high that AI engineers get displaced! For example: legal or medical research, R&amp;D, managerial work. The firm can do just as well, if not better, by reducing AI engineers, because the technical experts or managers are the real bottleneck.  </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!f-fE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e80251a-c91b-4b16-b376-9d741402159d_1790x490.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!f-fE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e80251a-c91b-4b16-b376-9d741402159d_1790x490.png 424w, https://substackcdn.com/image/fetch/$s_!f-fE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e80251a-c91b-4b16-b376-9d741402159d_1790x490.png 848w, https://substackcdn.com/image/fetch/$s_!f-fE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e80251a-c91b-4b16-b376-9d741402159d_1790x490.png 1272w, https://substackcdn.com/image/fetch/$s_!f-fE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e80251a-c91b-4b16-b376-9d741402159d_1790x490.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!f-fE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e80251a-c91b-4b16-b376-9d741402159d_1790x490.png" width="1456" height="399" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1e80251a-c91b-4b16-b376-9d741402159d_1790x490.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:399,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:114814,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!f-fE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e80251a-c91b-4b16-b376-9d741402159d_1790x490.png 424w, https://substackcdn.com/image/fetch/$s_!f-fE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e80251a-c91b-4b16-b376-9d741402159d_1790x490.png 848w, https://substackcdn.com/image/fetch/$s_!f-fE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e80251a-c91b-4b16-b376-9d741402159d_1790x490.png 1272w, https://substackcdn.com/image/fetch/$s_!f-fE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e80251a-c91b-4b16-b376-9d741402159d_1790x490.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><strong>Conclusion</strong></p><p>An Econ 101 analysis contests the view that Gen AI is necessarily bad for labor. The more complementary work you do with respect to Gen AI, the more you stand to benefit. Consumers, on the other hand, generally stand to gain. </p><p>Disclaimer: It should be noted that all this is just an elaborate thought experiment, as I have left out many important real world aspects and parameter values have been cherry picked to make a point. </p><p><a href="https://colab.research.google.com/drive/1x8gV-0R1ZGJCemUTAz0h3rFPTjAJenW5?usp=sharing">Code</a></p>]]></content:encoded></item><item><title><![CDATA[Why are markets are so efficient?]]></title><description><![CDATA[Revisiting some classic experiments.]]></description><link>https://pranjalrawat42.substack.com/p/why-are-markets-are-so-efficient</link><guid isPermaLink="false">https://pranjalrawat42.substack.com/p/why-are-markets-are-so-efficient</guid><dc:creator><![CDATA[Pranjal Rawat, PhD]]></dc:creator><pubDate>Wed, 01 Jan 2025 03:16:10 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!UPbR!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b378f04-6761-4a18-9217-4af2668afe0e_730x730.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Sharing three experimental papers that reignited my interest in economics and demonstrate the power of markets and why they are best way to allocate resources, at the micro level.</p><p>1. Vernon Smith's <a href="https://lorko.sk/wp-content/uploads/2023/08/Smith1962.pdf">classic classroom experiments</a> on the double auction (bid-ask) market showing that even with little information and few traders, the market finds the price very quickly.</p><p>2. <a href="https://faculty.sites.iastate.edu/tesfatsi/archive/tesfatsi/ZITraders.GodeSunder.JPE1993.pdf">The Gode-Sunder result</a> that market mechanisms are so powerful that even if idiots / dummies were trading in it, they would be led to efficient outcomes. Markets do not need rational traders at all. </p><p>3. Rust, Palmer, Miller's famous <a href="https://sfi-edu.s3.amazonaws.com/sfi-edu/production/uploads/sfi-com/dev/uploads/filer/10/15/1015de9d-dfa1-493e-9a60-738e5a5f203a/92-02-008.pdf">computerized double auction tournament</a> which highlighted how information is revealed through bidding in the market and why passive sniping (wait, watch.. jump in to steal the deal) will always be powerful as long as there are a few active traders revealing information. </p><p>Obviously this does not imply that markets will always be efficient at a macro-level. This only shows the power of markets at a very micro level, with restricted scope. </p><p>I really like these papers because:</p><ul><li><p>They do not use an equilibrium model, but just use simple experiments and computer simulations to make very important inference.</p></li><li><p>They also try to open the messy trading process instead of treating markets as black boxes i.e. automatically clearing and frictionless. </p></li><li><p>Very easy to read and understand. </p></li></ul>]]></content:encoded></item><item><title><![CDATA[Solving Auctions with Reinforcement Learning]]></title><description><![CDATA[Using Proximal Policy Optimization to find Bayes-Nash Equilibria]]></description><link>https://pranjalrawat42.substack.com/p/solving-auctions-with-reinforcement</link><guid isPermaLink="false">https://pranjalrawat42.substack.com/p/solving-auctions-with-reinforcement</guid><dc:creator><![CDATA[Pranjal Rawat, PhD]]></dc:creator><pubDate>Sat, 19 Oct 2024 04:24:30 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!tKX8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b775686-5f78-4af0-8725-c1e5d9a8cd36_1370x732.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Auctions are a classic way to allocate goods between buyers and discover the &#8220;right&#8221; price. However, finding strategic equilibrium in auctions is notoriously hard. As a recent study of the incredible hardness of solving auctions aptly put it:</p><div class="pullquote"><blockquote><p>"We now know that the auctions of Vickrey and Myerson are isolated areas of light in a sea of darkness." &#8212; Cai and Papadimitriou (2014)</p></blockquote></div><p>Auctions are complex because we do not know how much opponents value the same item (sometimes, we do not even know how much <em>we</em> should value it). This uncertainty makes finding the mutual best response strategies even harder. Further, every piece of information can be something others could respond to. Adding rounds and multiple items makes this even worse. As a result&#8212;even today, we do not know the strategic equilibria of many multi-item and multi-round auctions ordinarily found worldwide. </p><h4>Reinforcement Learning</h4><p>Reinforcement learning (RL) has shown remarkable success in finding powerful strategies in games of imperfect information. This raises an interesting question: Can RL help us approximate equilibria in auctions where analytical solutions are often intractable?</p><p>Reinforcement learning allows agents to learn optimal strategies through trial and error, receiving feedback from the environment. In games like poker&#8212;where players have imperfect information about the game state&#8212;RL algorithms have achieved superhuman performance.</p><h4>Auctions as a Learning Problem</h4><p>Auctions are typically modeled as Bayesian games, where each bidder has private information (their own valuation and other private observations), and public information and strategies depend on this information&nbsp;<em>as well as</em>&nbsp;beliefs about other bidders' valuations.</p><p>For example, in a first-price sealed-bid auction, the auction is a one-shot game where each player &#8220;i&#8221; draws a private valuation about the item: </p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;v_i \\sim UNIF(0,1)&quot;,&quot;id&quot;:&quot;USOYRWEHII&quot;}" data-component-name="LatexBlockToDOM"></div><p>This is their &#8220;state,&#8221; and they can bid using a strategy or&nbsp;<em>policy,</em>&nbsp;which is, in general, a probability distribution over bids that depends on the private valuation (mixed strategy). It could be deterministic as well (pure strategies). </p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;b_i \\sim \\pi(a|v_i)&quot;,&quot;id&quot;:&quot;KBJQVLOLLH&quot;}" data-component-name="LatexBlockToDOM"></div><p>And the reward for bidder &#8220;i&#8221; will depend on whether they won the auction. </p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;r_i = \n\\begin{cases}\nv_i - b_i, &amp; \\text{if } b_i > \\max_{j \\neq i} b_j, \\\\\n0, &amp; \\text{otherwise}.\n\\end{cases}&quot;,&quot;id&quot;:&quot;XVJMPEWZYD&quot;}" data-component-name="LatexBlockToDOM"></div><p>Under first price rules, the winner pays the complete bid. The Bayes-Nash equilibria of this auction, given the total number of players N, is well known to be, </p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;b^*(v) = \\frac{N-1}{N} v&quot;,&quot;id&quot;:&quot;MWBGSAIUAI&quot;}" data-component-name="LatexBlockToDOM"></div><p>It is unique, symmetric, and pure (no randomness). It also implies that each player will shade their bids (be a little dishonest in their bidding). As the number of players rises, this bidding strategy nears truthtelling. </p><p>Our central question is whether reinforcement learning algorithms can converge to the equilibrium bidding strategy of any arbitrary auction simply through self-play.</p><h4>Policy Gradient Algorithms</h4><p>With a slight change of notation:</p><ul><li><p><strong>States (s)</strong>: Each bidder's private valuation and any public information.</p></li><li><p><strong>Actions (a)</strong>: The bids they choose to submit.</p></li><li><p><strong>Rewards (r)</strong>: The payoff received depends on the auction rules.</p></li><li><p><strong>Round (t): </strong>This can take value higher than 1 if the auction has multiple rounds</p></li></ul><p>We can parameterize policies by making them Normally distributed, where the mean and deviation depend on the valuation. Some clipping keeps it within reasonable ranges (e.g., 0 and 1). But importantly, the mean and deviation can be deep neural networks, allowing us to express strategies vividly.</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;a_i \\sim \\pi_\\theta(a|v_i) \\sim N(\\mu_{\\theta_1}(v_i), \\sigma_{\\theta_2}(v_i))&quot;,&quot;id&quot;:&quot;HHCYPAIRWR&quot;}" data-component-name="LatexBlockToDOM"></div><p>The agent will keep track of value functions representing states' value under that policy. We also have action-value and advantage functions that will tell us how good an action is compared to the rest. </p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;V^\\pi(s) = \\mathbb{E}_\\pi \\left[\\sum_{t=0}^{T} r_t \\, | \\, s_0 = s \\right]&quot;,&quot;id&quot;:&quot;AIYSBAGDNP&quot;}" data-component-name="LatexBlockToDOM"></div><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot; Q^\\pi(s, a) = \\mathbb{E}_\\pi \\left[ \\sum_{t=0}^{T} r_t \\, | \\, s_0 = s, a_0 = a \\right].&quot;,&quot;id&quot;:&quot;WMJUEKOCPM&quot;}" data-component-name="LatexBlockToDOM"></div><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;A^\\pi(s, a) = Q^\\pi(s, a) - V^\\pi(s)&quot;,&quot;id&quot;:&quot;RBIXGRXYAE&quot;}" data-component-name="LatexBlockToDOM"></div><p>The agent estimates these as they play the auction repeatedly. One way of expressing the objective is a weighted expected log-likelihood function. We&#8217;d like to maximize this by tweaking the parameters. </p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;J(\\theta) =  \\mathbb{E}_{a, s} [\\hat{A} \\log \\pi_{\\theta}(a|s)]&quot;,&quot;id&quot;:&quot;BOXQSKNORD&quot;}" data-component-name="LatexBlockToDOM"></div><p>One way to make sense of this is to realize that if the estimate for advantage was 1, then this is a standard maximization of the expected-log likelihood of observing those actions at those states. This would mean we are re-estimating the same parameters that generated the data. By weighing the instances by the &#8220;advantage&#8221; of actions, we are&nbsp;<em>pulling the policy towards parameters that generate more rewards. </em>So, we compute the policy gradient by playing a few auctions and take a hill-climbing step: </p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\nabla J(\\theta) = E_{a, s} [\\hat{A} \\nabla \\log \\pi(a|s)]\n\n&quot;,&quot;id&quot;:&quot;NYQKJGDAZC&quot;}" data-component-name="LatexBlockToDOM"></div><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;J(\\theta) \\leftarrow J(\\theta) + \\alpha \\nabla J(\\theta)&quot;,&quot;id&quot;:&quot;KFFRVAMXAF&quot;}" data-component-name="LatexBlockToDOM"></div><p>Note that while the advantage function will depend on the policy, we treat it as exogenous (obtained from elsewhere) when taking the derivative. </p><h4>Proximal Policy Optimization</h4><p>Proximal Policy Optimization (PPO) is a state-of-the-art RL algorithm known for its stability and efficiency. Instead of log probabilities, it uses the ratio between old policies (which it currently follows) and the subsequent policy it tries to attain. So, the objective is to improve the probability of playing actions with a higher advantage&nbsp;<em>relative to the current probability of observing them. </em>This is a change in emphasis over seeking relative improvement rather than absolute. </p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;r_t(\\theta) = \\frac{\\pi_\\theta(a_t | s_t)}{\\pi_{\\theta_{\\text{old}}}(a_t | s_t)}&quot;,&quot;id&quot;:&quot;VTTRHEWBHB&quot;}" data-component-name="LatexBlockToDOM"></div><p>Further, to prevent significant changes in the policy, we explicitly clip the objective if this fraction becomes too large or too small.  </p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;J^{\\text{PPO}}(\\theta) = \\mathbb{E}_{\\pi_{\\text{old}}} \\left[ \\min \\left( r_t(\\theta) \\hat{A}_t, \\ \\text{clip}\\left( r_t(\\theta), 1 - \\epsilon, 1 + \\epsilon \\right) A_t \\right) \\right]&quot;,&quot;id&quot;:&quot;JKXAFMAHZO&quot;}" data-component-name="LatexBlockToDOM"></div><p>The result is an incredibly stable and fast algorithm that does not need to use second-order methods to explicitly create &#8220;trust regions&#8221; where to improve the policy. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tKX8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b775686-5f78-4af0-8725-c1e5d9a8cd36_1370x732.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tKX8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b775686-5f78-4af0-8725-c1e5d9a8cd36_1370x732.png 424w, https://substackcdn.com/image/fetch/$s_!tKX8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b775686-5f78-4af0-8725-c1e5d9a8cd36_1370x732.png 848w, https://substackcdn.com/image/fetch/$s_!tKX8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b775686-5f78-4af0-8725-c1e5d9a8cd36_1370x732.png 1272w, https://substackcdn.com/image/fetch/$s_!tKX8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b775686-5f78-4af0-8725-c1e5d9a8cd36_1370x732.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tKX8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b775686-5f78-4af0-8725-c1e5d9a8cd36_1370x732.png" width="1370" height="732" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0b775686-5f78-4af0-8725-c1e5d9a8cd36_1370x732.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:732,&quot;width&quot;:1370,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:155947,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!tKX8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b775686-5f78-4af0-8725-c1e5d9a8cd36_1370x732.png 424w, https://substackcdn.com/image/fetch/$s_!tKX8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b775686-5f78-4af0-8725-c1e5d9a8cd36_1370x732.png 848w, https://substackcdn.com/image/fetch/$s_!tKX8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b775686-5f78-4af0-8725-c1e5d9a8cd36_1370x732.png 1272w, https://substackcdn.com/image/fetch/$s_!tKX8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b775686-5f78-4af0-8725-c1e5d9a8cd36_1370x732.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><h4><strong>Convergence Issues and Multiple Equilibria</strong></h4><p>Generally, best response dynamics (like the one above) do&nbsp;<em>not&nbsp;</em>have any guarantee of convergence, except in particular games like zero-sum or potential games (e.g. traffic congestion). They may oscillate forever and never find an equilibrium. For instance, in a simple game like rock-paper-scissors, best response dynamics will oscillate forever (even as the time average converges to the only equilibria: mixing 1/3, 1/3, 1/3). But if they do converge, they will converge to a Nash equilibrium. </p><p>This is the same guarantee that fictitious play has. But fictitious play approximately solved Poker. Interestingly, other algorithms, like counterfactual regret minimization, which are guaranteed to converge to coarse correlated equilibrium, could not solve Poker (initially). </p><p>Most of the auctions we study below have unique equilibria, so we do not need to worry about finding the wrong one. But generally, auctions <em>can</em> have more than one equilibrium, and if they converge, best-response dynamics will converge to only one of them, and that too if they are &#8220;stable&#8221;. But which equilibria would you be interested in? Unstable, weird ones? I&#8217;d prefer stable, ones that algorithms can find quickly&#8212;that suggests that humans can find them too. </p><h4><strong>Visualizing Learning</strong></h4><p>This is what learning by two PPO agents in a first-price auction looks like. The left graph has the mean bidding as a valuation function, and the right graph has the actual bids to valuations.  </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JDiH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c269eb8-d708-42aa-9ac1-32835992dd01_1200x1000.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JDiH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c269eb8-d708-42aa-9ac1-32835992dd01_1200x1000.gif 424w, https://substackcdn.com/image/fetch/$s_!JDiH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c269eb8-d708-42aa-9ac1-32835992dd01_1200x1000.gif 848w, https://substackcdn.com/image/fetch/$s_!JDiH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c269eb8-d708-42aa-9ac1-32835992dd01_1200x1000.gif 1272w, https://substackcdn.com/image/fetch/$s_!JDiH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c269eb8-d708-42aa-9ac1-32835992dd01_1200x1000.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JDiH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c269eb8-d708-42aa-9ac1-32835992dd01_1200x1000.gif" width="728" height="606.6666666666666" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9c269eb8-d708-42aa-9ac1-32835992dd01_1200x1000.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:1000,&quot;width&quot;:1200,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:2709153,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&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_!JDiH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c269eb8-d708-42aa-9ac1-32835992dd01_1200x1000.gif 424w, https://substackcdn.com/image/fetch/$s_!JDiH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c269eb8-d708-42aa-9ac1-32835992dd01_1200x1000.gif 848w, https://substackcdn.com/image/fetch/$s_!JDiH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c269eb8-d708-42aa-9ac1-32835992dd01_1200x1000.gif 1272w, https://substackcdn.com/image/fetch/$s_!JDiH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c269eb8-d708-42aa-9ac1-32835992dd01_1200x1000.gif 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>These are two PPO agents in the infamous all-pay auction where losers must pay their total bid. Not surprisingly, the equilibrium strategy is conservative when valuations are low and is b = v^2/2. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cY-v!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9abd8c63-0f35-4ad4-8bc2-2045b955a0f2_1200x1000.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cY-v!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9abd8c63-0f35-4ad4-8bc2-2045b955a0f2_1200x1000.gif 424w, https://substackcdn.com/image/fetch/$s_!cY-v!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9abd8c63-0f35-4ad4-8bc2-2045b955a0f2_1200x1000.gif 848w, https://substackcdn.com/image/fetch/$s_!cY-v!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9abd8c63-0f35-4ad4-8bc2-2045b955a0f2_1200x1000.gif 1272w, https://substackcdn.com/image/fetch/$s_!cY-v!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9abd8c63-0f35-4ad4-8bc2-2045b955a0f2_1200x1000.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!cY-v!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9abd8c63-0f35-4ad4-8bc2-2045b955a0f2_1200x1000.gif" width="1200" height="1000" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9abd8c63-0f35-4ad4-8bc2-2045b955a0f2_1200x1000.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1000,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2658123,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&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_!cY-v!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9abd8c63-0f35-4ad4-8bc2-2045b955a0f2_1200x1000.gif 424w, https://substackcdn.com/image/fetch/$s_!cY-v!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9abd8c63-0f35-4ad4-8bc2-2045b955a0f2_1200x1000.gif 848w, https://substackcdn.com/image/fetch/$s_!cY-v!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9abd8c63-0f35-4ad4-8bc2-2045b955a0f2_1200x1000.gif 1272w, https://substackcdn.com/image/fetch/$s_!cY-v!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9abd8c63-0f35-4ad4-8bc2-2045b955a0f2_1200x1000.gif 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>And this is for the second-price auction, which leads us to truth-telling b = v. </p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rRwy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f01ae8f-37cc-4690-b547-068b64064d30_1200x1000.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rRwy!,w_424,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f01ae8f-37cc-4690-b547-068b64064d30_1200x1000.gif 424w, https://substackcdn.com/image/fetch/$s_!rRwy!,w_848,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f01ae8f-37cc-4690-b547-068b64064d30_1200x1000.gif 848w, https://substackcdn.com/image/fetch/$s_!rRwy!,w_1272,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f01ae8f-37cc-4690-b547-068b64064d30_1200x1000.gif 1272w, https://substackcdn.com/image/fetch/$s_!rRwy!,w_1456,c_limit,f_webp,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f01ae8f-37cc-4690-b547-068b64064d30_1200x1000.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rRwy!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f01ae8f-37cc-4690-b547-068b64064d30_1200x1000.gif" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1f01ae8f-37cc-4690-b547-068b64064d30_1200x1000.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:null,&quot;width&quot;:null,&quot;resizeWidth&quot;:0,&quot;bytes&quot;:16765402,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&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_!rRwy!,w_424,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f01ae8f-37cc-4690-b547-068b64064d30_1200x1000.gif 424w, https://substackcdn.com/image/fetch/$s_!rRwy!,w_848,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f01ae8f-37cc-4690-b547-068b64064d30_1200x1000.gif 848w, https://substackcdn.com/image/fetch/$s_!rRwy!,w_1272,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f01ae8f-37cc-4690-b547-068b64064d30_1200x1000.gif 1272w, https://substackcdn.com/image/fetch/$s_!rRwy!,w_1456,c_limit,f_auto,q_auto:good,fl_lossy/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f01ae8f-37cc-4690-b547-068b64064d30_1200x1000.gif 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><h4><strong>More Experiments</strong></h4><p><strong>Asymmetric Valuations: </strong>The first price auction is when one bidder is a &#8220;strong&#8221; bidder and draws valuations from UNIF(0,1.33) while the weak bidder draws from UNIF(0,0.8). Equilibrium bidding strategies come from a complex differential equation. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!H9NH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b8ae8fc-cd1b-43e7-9289-e0c20f3e4ee5_1668x1386.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!H9NH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b8ae8fc-cd1b-43e7-9289-e0c20f3e4ee5_1668x1386.png 424w, https://substackcdn.com/image/fetch/$s_!H9NH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b8ae8fc-cd1b-43e7-9289-e0c20f3e4ee5_1668x1386.png 848w, https://substackcdn.com/image/fetch/$s_!H9NH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b8ae8fc-cd1b-43e7-9289-e0c20f3e4ee5_1668x1386.png 1272w, https://substackcdn.com/image/fetch/$s_!H9NH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b8ae8fc-cd1b-43e7-9289-e0c20f3e4ee5_1668x1386.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!H9NH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b8ae8fc-cd1b-43e7-9289-e0c20f3e4ee5_1668x1386.png" width="1456" height="1210" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2b8ae8fc-cd1b-43e7-9289-e0c20f3e4ee5_1668x1386.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1210,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:469033,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!H9NH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b8ae8fc-cd1b-43e7-9289-e0c20f3e4ee5_1668x1386.png 424w, https://substackcdn.com/image/fetch/$s_!H9NH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b8ae8fc-cd1b-43e7-9289-e0c20f3e4ee5_1668x1386.png 848w, https://substackcdn.com/image/fetch/$s_!H9NH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b8ae8fc-cd1b-43e7-9289-e0c20f3e4ee5_1668x1386.png 1272w, https://substackcdn.com/image/fetch/$s_!H9NH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b8ae8fc-cd1b-43e7-9289-e0c20f3e4ee5_1668x1386.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><strong>Korean Auction</strong> is a multi-round restricted auction where you only know if you hold the highest bid. The only equilibrium for a two-player, two-round Korean auction is the sniping equilibrium, where agents choose to completely suppress any information in the first round by bidding 0, and then a standard first-price equilibrium arises in the last round. This was proved in a paper by my advisor Prof, John Rust. We see that RL finds this equilibrium as well. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!z3m-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8455e0a0-3a75-4d8f-8cba-b85890bd38ed_1484x1294.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!z3m-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8455e0a0-3a75-4d8f-8cba-b85890bd38ed_1484x1294.png 424w, https://substackcdn.com/image/fetch/$s_!z3m-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8455e0a0-3a75-4d8f-8cba-b85890bd38ed_1484x1294.png 848w, https://substackcdn.com/image/fetch/$s_!z3m-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8455e0a0-3a75-4d8f-8cba-b85890bd38ed_1484x1294.png 1272w, https://substackcdn.com/image/fetch/$s_!z3m-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8455e0a0-3a75-4d8f-8cba-b85890bd38ed_1484x1294.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!z3m-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8455e0a0-3a75-4d8f-8cba-b85890bd38ed_1484x1294.png" width="1456" height="1270" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8455e0a0-3a75-4d8f-8cba-b85890bd38ed_1484x1294.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1270,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:441124,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!z3m-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8455e0a0-3a75-4d8f-8cba-b85890bd38ed_1484x1294.png 424w, https://substackcdn.com/image/fetch/$s_!z3m-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8455e0a0-3a75-4d8f-8cba-b85890bd38ed_1484x1294.png 848w, https://substackcdn.com/image/fetch/$s_!z3m-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8455e0a0-3a75-4d8f-8cba-b85890bd38ed_1484x1294.png 1272w, https://substackcdn.com/image/fetch/$s_!z3m-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8455e0a0-3a75-4d8f-8cba-b85890bd38ed_1484x1294.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><strong>Reserve prices</strong> are price floors that auctioneers can set to eliminate any bids below them. This is typically done to thwart cartels but slightly changes the optimal bidding strategy in first-price auctions. We see that RL can converge to this as well (reserve at 0.25). </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!k_Mr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16c37f72-ed65-42e1-aa41-e6ccea87d2d6_1664x1382.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!k_Mr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16c37f72-ed65-42e1-aa41-e6ccea87d2d6_1664x1382.png 424w, https://substackcdn.com/image/fetch/$s_!k_Mr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16c37f72-ed65-42e1-aa41-e6ccea87d2d6_1664x1382.png 848w, https://substackcdn.com/image/fetch/$s_!k_Mr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16c37f72-ed65-42e1-aa41-e6ccea87d2d6_1664x1382.png 1272w, https://substackcdn.com/image/fetch/$s_!k_Mr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16c37f72-ed65-42e1-aa41-e6ccea87d2d6_1664x1382.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!k_Mr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16c37f72-ed65-42e1-aa41-e6ccea87d2d6_1664x1382.png" width="1456" height="1209" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/16c37f72-ed65-42e1-aa41-e6ccea87d2d6_1664x1382.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1209,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:485771,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!k_Mr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16c37f72-ed65-42e1-aa41-e6ccea87d2d6_1664x1382.png 424w, https://substackcdn.com/image/fetch/$s_!k_Mr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16c37f72-ed65-42e1-aa41-e6ccea87d2d6_1664x1382.png 848w, https://substackcdn.com/image/fetch/$s_!k_Mr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16c37f72-ed65-42e1-aa41-e6ccea87d2d6_1664x1382.png 1272w, https://substackcdn.com/image/fetch/$s_!k_Mr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16c37f72-ed65-42e1-aa41-e6ccea87d2d6_1664x1382.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><strong>Common values.</strong> In some cases, like oil rigs, often nobody knows the true value but receives a noisy signal about the value. Players also know that if we collected all the signals (the research others&#8217; did), we could find a better estimate. In these auctions, bidders tend to be more aggressive and face the potential threat of the winners curse (if you win, you kinda paid too much). Here too, RL finds the equilibria where bidding is done as a function of a noisy signal. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uh80!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b14e8bb-4ffc-49a5-822f-30deea3cf608_1162x1160.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uh80!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b14e8bb-4ffc-49a5-822f-30deea3cf608_1162x1160.png 424w, https://substackcdn.com/image/fetch/$s_!uh80!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b14e8bb-4ffc-49a5-822f-30deea3cf608_1162x1160.png 848w, https://substackcdn.com/image/fetch/$s_!uh80!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b14e8bb-4ffc-49a5-822f-30deea3cf608_1162x1160.png 1272w, https://substackcdn.com/image/fetch/$s_!uh80!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b14e8bb-4ffc-49a5-822f-30deea3cf608_1162x1160.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uh80!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b14e8bb-4ffc-49a5-822f-30deea3cf608_1162x1160.png" width="1162" height="1160" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0b14e8bb-4ffc-49a5-822f-30deea3cf608_1162x1160.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1160,&quot;width&quot;:1162,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:290446,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!uh80!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b14e8bb-4ffc-49a5-822f-30deea3cf608_1162x1160.png 424w, https://substackcdn.com/image/fetch/$s_!uh80!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b14e8bb-4ffc-49a5-822f-30deea3cf608_1162x1160.png 848w, https://substackcdn.com/image/fetch/$s_!uh80!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b14e8bb-4ffc-49a5-822f-30deea3cf608_1162x1160.png 1272w, https://substackcdn.com/image/fetch/$s_!uh80!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b14e8bb-4ffc-49a5-822f-30deea3cf608_1162x1160.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><h4>Conclusion</h4><p>While these are relatively simple auctions, where we know the answer already&#8212;it is helpful to know that RL can find the equilibria. Whether this method can scale up to more complex situations is an open question. But if we can transplant the success of RL in Poker, Chess, and Go into solving markets, that would do wonders for market design. </p><h4>References</h4><ul><li><p>Cai, Y., &amp; Papadimitriou, C. H. (2014). Simultaneous Auctions and Computational Complexity. In <em>Proceedings of the 15th ACM Conference on Economics and Computation</em>.</p></li><li><p>Schulman, J., Wolski, F., Dhariwal, P., Radford, A., &amp; Klimov, O. (2017). Proximal policy optimization algorithms. <em>arXiv preprint arXiv:1707.06347</em>.</p><p>Chicago</p></li><li><p>Sutton, R. S., &amp; Barto, A. G. (2018). <em>Reinforcement Learning: An Introduction</em>. MIT Press.</p></li><li><p>Rust, J. (2024). Explaining Early Bidding in Informationally-Restricted, Ascending-Bid Auctions.</p></li><li><p>Krishna, V. (2009). <em>Auction theory</em>. Academic press.</p><p>Chicago</p></li></ul>]]></content:encoded></item><item><title><![CDATA[Improving the precision of average treatment effects]]></title><description><![CDATA[A Monte Carlo study of Causal Machine Learning methods]]></description><link>https://pranjalrawat42.substack.com/p/improving-the-precision-of-average</link><guid isPermaLink="false">https://pranjalrawat42.substack.com/p/improving-the-precision-of-average</guid><dc:creator><![CDATA[Pranjal Rawat, PhD]]></dc:creator><pubDate>Mon, 02 Sep 2024 07:28:45 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee5092d4-3b84-4d1b-bd46-a0124ad157c6_1452x1264.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In this post we use causal machine learning to reduce variance in the analysis of experimental data. </p><p>There are two main reasons why additional information beyond treatment and outcome is useful in experiments: </p><ul><li><p>To obtain more precise estimates of the treatment effect</p></li><li><p>To understand how the treatment effect varies across context</p></li></ul><p>In this post, I will focus on the former and compare methods using Monte Carlo study similar to Negi &amp; Wooldridge (2021).</p><h4><strong>Definitions</strong></h4><ul><li><p>i: The index of the individual in the experiment, N total.</p></li><li><p>Y: The outcome that we are interested in. e.g. purchases, retention, clicks, etc.</p></li><li><p>D: The intervention or lever that we want to use to achieve good outcomes. Takes values 1 or 0. This was randomly assigned to &#8216;p&#8217; fraction of total individuals.</p></li><li><p>X: The side information or context that was available. Also called covariates. </p></li><li><p>Base machine learning models: </p><ul><li><p>g: An LightGBM model for Y from X and D</p></li><li><p>l: An LightGBM model for Y from X</p></li></ul></li></ul><h4><strong>Synthetic Data </strong></h4><p>I will test two synthetic data generating processes: one simple and one complex. The <em>potential</em> outcomes is what would have been, depending on what treatment was assigned. The difference between potential outcomes are the individual treatment effects. For the K = 2 covariates, I can plot the surfaces. </p><h5>DGP Simple</h5><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rRBT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a14f8c6-9cc3-4a00-8687-99d812943e70_1992x956.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rRBT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a14f8c6-9cc3-4a00-8687-99d812943e70_1992x956.png 424w, https://substackcdn.com/image/fetch/$s_!rRBT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a14f8c6-9cc3-4a00-8687-99d812943e70_1992x956.png 848w, https://substackcdn.com/image/fetch/$s_!rRBT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a14f8c6-9cc3-4a00-8687-99d812943e70_1992x956.png 1272w, https://substackcdn.com/image/fetch/$s_!rRBT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a14f8c6-9cc3-4a00-8687-99d812943e70_1992x956.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rRBT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a14f8c6-9cc3-4a00-8687-99d812943e70_1992x956.png" width="1456" height="699" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6a14f8c6-9cc3-4a00-8687-99d812943e70_1992x956.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:699,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1016040,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!rRBT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a14f8c6-9cc3-4a00-8687-99d812943e70_1992x956.png 424w, https://substackcdn.com/image/fetch/$s_!rRBT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a14f8c6-9cc3-4a00-8687-99d812943e70_1992x956.png 848w, https://substackcdn.com/image/fetch/$s_!rRBT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a14f8c6-9cc3-4a00-8687-99d812943e70_1992x956.png 1272w, https://substackcdn.com/image/fetch/$s_!rRBT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a14f8c6-9cc3-4a00-8687-99d812943e70_1992x956.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><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6TyH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12eebf3f-69df-4599-bc3c-0abf5183bd31_1460x1264.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6TyH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12eebf3f-69df-4599-bc3c-0abf5183bd31_1460x1264.png 424w, https://substackcdn.com/image/fetch/$s_!6TyH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12eebf3f-69df-4599-bc3c-0abf5183bd31_1460x1264.png 848w, https://substackcdn.com/image/fetch/$s_!6TyH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12eebf3f-69df-4599-bc3c-0abf5183bd31_1460x1264.png 1272w, https://substackcdn.com/image/fetch/$s_!6TyH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12eebf3f-69df-4599-bc3c-0abf5183bd31_1460x1264.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6TyH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12eebf3f-69df-4599-bc3c-0abf5183bd31_1460x1264.png" width="1456" height="1261" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/12eebf3f-69df-4599-bc3c-0abf5183bd31_1460x1264.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1261,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:313333,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6TyH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12eebf3f-69df-4599-bc3c-0abf5183bd31_1460x1264.png 424w, https://substackcdn.com/image/fetch/$s_!6TyH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12eebf3f-69df-4599-bc3c-0abf5183bd31_1460x1264.png 848w, https://substackcdn.com/image/fetch/$s_!6TyH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12eebf3f-69df-4599-bc3c-0abf5183bd31_1460x1264.png 1272w, https://substackcdn.com/image/fetch/$s_!6TyH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F12eebf3f-69df-4599-bc3c-0abf5183bd31_1460x1264.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><h5>DGP Complex</h5><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Poal!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d2d9d7e-7b73-4982-bfe7-535128d2598e_1986x972.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Poal!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d2d9d7e-7b73-4982-bfe7-535128d2598e_1986x972.png 424w, https://substackcdn.com/image/fetch/$s_!Poal!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d2d9d7e-7b73-4982-bfe7-535128d2598e_1986x972.png 848w, https://substackcdn.com/image/fetch/$s_!Poal!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d2d9d7e-7b73-4982-bfe7-535128d2598e_1986x972.png 1272w, https://substackcdn.com/image/fetch/$s_!Poal!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d2d9d7e-7b73-4982-bfe7-535128d2598e_1986x972.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Poal!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d2d9d7e-7b73-4982-bfe7-535128d2598e_1986x972.png" width="1456" height="713" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9d2d9d7e-7b73-4982-bfe7-535128d2598e_1986x972.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:713,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1059959,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Poal!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d2d9d7e-7b73-4982-bfe7-535128d2598e_1986x972.png 424w, https://substackcdn.com/image/fetch/$s_!Poal!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d2d9d7e-7b73-4982-bfe7-535128d2598e_1986x972.png 848w, https://substackcdn.com/image/fetch/$s_!Poal!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d2d9d7e-7b73-4982-bfe7-535128d2598e_1986x972.png 1272w, https://substackcdn.com/image/fetch/$s_!Poal!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d2d9d7e-7b73-4982-bfe7-535128d2598e_1986x972.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><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MtxU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee5092d4-3b84-4d1b-bd46-a0124ad157c6_1452x1264.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MtxU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee5092d4-3b84-4d1b-bd46-a0124ad157c6_1452x1264.png 424w, https://substackcdn.com/image/fetch/$s_!MtxU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee5092d4-3b84-4d1b-bd46-a0124ad157c6_1452x1264.png 848w, https://substackcdn.com/image/fetch/$s_!MtxU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee5092d4-3b84-4d1b-bd46-a0124ad157c6_1452x1264.png 1272w, https://substackcdn.com/image/fetch/$s_!MtxU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee5092d4-3b84-4d1b-bd46-a0124ad157c6_1452x1264.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!MtxU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee5092d4-3b84-4d1b-bd46-a0124ad157c6_1452x1264.png" width="1452" height="1264" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ee5092d4-3b84-4d1b-bd46-a0124ad157c6_1452x1264.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1264,&quot;width&quot;:1452,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:263934,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!MtxU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee5092d4-3b84-4d1b-bd46-a0124ad157c6_1452x1264.png 424w, https://substackcdn.com/image/fetch/$s_!MtxU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee5092d4-3b84-4d1b-bd46-a0124ad157c6_1452x1264.png 848w, https://substackcdn.com/image/fetch/$s_!MtxU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee5092d4-3b84-4d1b-bd46-a0124ad157c6_1452x1264.png 1272w, https://substackcdn.com/image/fetch/$s_!MtxU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee5092d4-3b84-4d1b-bd46-a0124ad157c6_1452x1264.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><h4><strong>Models</strong></h4><ul><li><p>B-OLS: The <em>Bivariate</em> OLS computes the simple difference in means of Y in the treated and untreated. It can be obtained as a regression of Y on D. Here we ignore X completely. </p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\text{reg} \\ Y \\text{on} \\ D&quot;,&quot;id&quot;:&quot;VODHMYMQUN&quot;}" data-component-name="LatexBlockToDOM"></div></li><li><p>M-OLS: The <em>Multivariate</em> OLS controls for X. This method was harshly criticized by Friedman (2008), for being biased and yet has always been popular (Athey and Imbens, 2017).  </p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\text{reg} \\ Y \\text{on} \\ D, X&quot;,&quot;id&quot;:&quot;WBKUWWONGA&quot;}" data-component-name="LatexBlockToDOM"></div></li><li><p>I-OLS: This <em>Interacted</em> OLS was proposed by Lin (2013) to resolve the Friedman critique by allowing the treatment effect to vary with X.</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\text{reg} \\ Y \\text{on} \\ D, X, D*(X-\\bar{X})&quot;,&quot;id&quot;:&quot;QXDHAEDZTD&quot;}" data-component-name="LatexBlockToDOM"></div></li><li><p>S-Learner: The <em>Single</em> Learner (Hill 2011) directly models potential outcomes from the data using a single machine learning model.</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;g(X, D):=E[Y|X,D]&quot;,&quot;id&quot;:&quot;BDLMNJFDFW&quot;}" data-component-name="LatexBlockToDOM"></div><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\tau = 1/N\\sum_i g(X_i, 1)-g(X_i, 0)&quot;,&quot;id&quot;:&quot;PSTTLEICXR&quot;}" data-component-name="LatexBlockToDOM"></div></li></ul><ul><li><p>T-Learner: The <em>Two</em> Learner approach (Foster, 2013) fits two mappings between Y and X, one in the treated sample and one in the untreated. Both mappings are used to &#8216;score&#8217; the entire the dataset to obtain &#8216;what-if&#8217; for each individual and then aggregated to find the ATE. </p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;l_d(X) := E[Y|X,D=d] \n&quot;,&quot;id&quot;:&quot;MWWBAAWGDX&quot;}" data-component-name="LatexBlockToDOM"></div><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\tau = 1/N \\sum_i l_1(X_i)- l_0(X_i))\n&quot;,&quot;id&quot;:&quot;HZGSXSBKEX&quot;}" data-component-name="LatexBlockToDOM"></div></li><li><p>X-Learner: The <em>Cross</em> learner (Kunzal 2019) tries to resolve the issues faced by the T-learner in imbalanced samples. We use the individual treatment effects from the X-Learner to fit two CATE models. The final ATE estimate is a rebalanced average of the individual CATE predictions. </p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\tau^d_i = | Y_i - l_{d}(X_i)| \\ \\text{if} \\ D_i = d&quot;,&quot;id&quot;:&quot;GSAIFWZHYG&quot;}" data-component-name="LatexBlockToDOM"></div><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;f_d(X) := E[\\tau^d_i|X_i] \\ \\text{if} \\ D_i = d&quot;,&quot;id&quot;:&quot;GITCAEGGEM&quot;}" data-component-name="LatexBlockToDOM"></div><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\tau = 1/N \\sum_i p f_1(X_i)+(1-p) f_0(X_i))&quot;,&quot;id&quot;:&quot;HNPLHVICAX&quot;}" data-component-name="LatexBlockToDOM"></div></li><li><p>R-Learner (aka Double Machine Learning): The <em>Robinson</em> or <em>Residual</em> Learner (Nie and Wager 2020, Chernozhukov et al., 2016) residualizes Y and D using X, and then regresses the residuals to obtain the ATE.</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;l(X) := E[Y|X] \n&quot;,&quot;id&quot;:&quot;SHLGIBQYNF&quot;}" data-component-name="LatexBlockToDOM"></div><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\text{reg} \\ Y - l(X) \\ \\text{on} \\ D-p&quot;,&quot;id&quot;:&quot;CRPZVPKYKF&quot;}" data-component-name="LatexBlockToDOM"></div></li><li><p>I-Learner: The <em>Interactive</em> ML or MLRATE estimator of Guo et al (2019) estimates the conditional expectation function and uses that with an Interacted OLS. </p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;l(X) := E[Y|X]&quot;,&quot;id&quot;:&quot;VUIOVMJZQG&quot;}" data-component-name="LatexBlockToDOM"></div><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\text{reg} \\ Y  \\ \\text{on} \\ D, l(X), D*(l(X)-\\bar{l(X)})&quot;,&quot;id&quot;:&quot;JLGEZEVWQF&quot;}" data-component-name="LatexBlockToDOM"></div></li></ul><ul><li><p>DR-Learner: The <em>Doubly Robust</em> Learner (Kennedy 2023, Foster 2023) takes the S-Learner&#8217;s individual treatment effects but then correct it using a rebalanced estimate of the error. </p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\tau = \\frac{1}{N} \\sum_i  [g(X_i,1) - g(X_i,0)]+ [\\frac{D_i (Y_i - g(X_i,1))}{p} - \\frac{(1 - D_i) (Y_i - g(X_i,0)}{1-p}]&quot;,&quot;id&quot;:&quot;SCBCWKABUD&quot;}" data-component-name="LatexBlockToDOM"></div></li></ul><h4><strong>Time Taken</strong></h4><p>The X learner takes the most time to compute (&gt;1sec) since it has two cross-fitting procedures. The R, DR and T learners are next in line since they use two models. The S and I learners are relatively fast as they only need a single model. The OLS models are obviously the fastest, and can be made recursive, and would shine if latency was important (e.g. in High Frequency Trading).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JG_8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9023dae6-1574-4763-b23c-deb0772bf45a_1152x524.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JG_8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9023dae6-1574-4763-b23c-deb0772bf45a_1152x524.png 424w, https://substackcdn.com/image/fetch/$s_!JG_8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9023dae6-1574-4763-b23c-deb0772bf45a_1152x524.png 848w, https://substackcdn.com/image/fetch/$s_!JG_8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9023dae6-1574-4763-b23c-deb0772bf45a_1152x524.png 1272w, https://substackcdn.com/image/fetch/$s_!JG_8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9023dae6-1574-4763-b23c-deb0772bf45a_1152x524.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JG_8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9023dae6-1574-4763-b23c-deb0772bf45a_1152x524.png" width="1152" height="524" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9023dae6-1574-4763-b23c-deb0772bf45a_1152x524.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:524,&quot;width&quot;:1152,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:92462,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!JG_8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9023dae6-1574-4763-b23c-deb0772bf45a_1152x524.png 424w, https://substackcdn.com/image/fetch/$s_!JG_8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9023dae6-1574-4763-b23c-deb0772bf45a_1152x524.png 848w, https://substackcdn.com/image/fetch/$s_!JG_8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9023dae6-1574-4763-b23c-deb0772bf45a_1152x524.png 1272w, https://substackcdn.com/image/fetch/$s_!JG_8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9023dae6-1574-4763-b23c-deb0772bf45a_1152x524.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><h4><strong>Monte Carlo Results</strong></h4><p>I sample repeatedly from the DGPs and estimate ATE and obtain its sampling distribution. The experimental parameters are:</p><ul><li><p>p: The fraction of individuals that were given the treatment.  </p></li><li><p>N: The number of individuals in the experiment</p></li><li><p>K: The number of covariates.</p></li><li><p>q: Std of measurement error in the outcome.  </p></li><li><p>M: Number of Monte Carlo iterations</p></li></ul><h5>Baseline (N=10,000, p=0.3, q=0, K=2, M=50)</h5><p>The OLS estimators generally have little bias but carry larger variance. The S learner is biased towards 0 but has the largest variance reduction. The DR, T, X and I learners are able to shave a lot of variance for minimal bias.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MfSL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedcf4fd2-d449-4edf-b929-43ca23e87fd9_2000x800.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MfSL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedcf4fd2-d449-4edf-b929-43ca23e87fd9_2000x800.png 424w, https://substackcdn.com/image/fetch/$s_!MfSL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedcf4fd2-d449-4edf-b929-43ca23e87fd9_2000x800.png 848w, https://substackcdn.com/image/fetch/$s_!MfSL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedcf4fd2-d449-4edf-b929-43ca23e87fd9_2000x800.png 1272w, https://substackcdn.com/image/fetch/$s_!MfSL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedcf4fd2-d449-4edf-b929-43ca23e87fd9_2000x800.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!MfSL!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedcf4fd2-d449-4edf-b929-43ca23e87fd9_2000x800.png" width="1200" height="479.6703296703297" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/edcf4fd2-d449-4edf-b929-43ca23e87fd9_2000x800.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:582,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:221412,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!MfSL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedcf4fd2-d449-4edf-b929-43ca23e87fd9_2000x800.png 424w, https://substackcdn.com/image/fetch/$s_!MfSL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedcf4fd2-d449-4edf-b929-43ca23e87fd9_2000x800.png 848w, https://substackcdn.com/image/fetch/$s_!MfSL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedcf4fd2-d449-4edf-b929-43ca23e87fd9_2000x800.png 1272w, https://substackcdn.com/image/fetch/$s_!MfSL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fedcf4fd2-d449-4edf-b929-43ca23e87fd9_2000x800.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><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tx6t!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b29fe37-206d-427b-a979-2604283ef457_2144x708.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tx6t!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b29fe37-206d-427b-a979-2604283ef457_2144x708.png 424w, https://substackcdn.com/image/fetch/$s_!tx6t!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b29fe37-206d-427b-a979-2604283ef457_2144x708.png 848w, https://substackcdn.com/image/fetch/$s_!tx6t!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b29fe37-206d-427b-a979-2604283ef457_2144x708.png 1272w, https://substackcdn.com/image/fetch/$s_!tx6t!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b29fe37-206d-427b-a979-2604283ef457_2144x708.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tx6t!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b29fe37-206d-427b-a979-2604283ef457_2144x708.png" width="1456" height="481" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6b29fe37-206d-427b-a979-2604283ef457_2144x708.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:481,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:151958,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!tx6t!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b29fe37-206d-427b-a979-2604283ef457_2144x708.png 424w, https://substackcdn.com/image/fetch/$s_!tx6t!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b29fe37-206d-427b-a979-2604283ef457_2144x708.png 848w, https://substackcdn.com/image/fetch/$s_!tx6t!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b29fe37-206d-427b-a979-2604283ef457_2144x708.png 1272w, https://substackcdn.com/image/fetch/$s_!tx6t!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b29fe37-206d-427b-a979-2604283ef457_2144x708.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><h5><strong>Imbalanced Sample </strong>(p=0.03)</h5><p>The bias tends to rise in imbalanced samples. The M-OLS can actually increase variance. The overall best performance was from the DR and X Learner, and the I-Learner on the simple DGP. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4Hle!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38aae5bc-2cec-4175-9a5f-f73ae4f238d8_2000x800.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4Hle!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38aae5bc-2cec-4175-9a5f-f73ae4f238d8_2000x800.png 424w, https://substackcdn.com/image/fetch/$s_!4Hle!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38aae5bc-2cec-4175-9a5f-f73ae4f238d8_2000x800.png 848w, https://substackcdn.com/image/fetch/$s_!4Hle!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38aae5bc-2cec-4175-9a5f-f73ae4f238d8_2000x800.png 1272w, https://substackcdn.com/image/fetch/$s_!4Hle!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38aae5bc-2cec-4175-9a5f-f73ae4f238d8_2000x800.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4Hle!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38aae5bc-2cec-4175-9a5f-f73ae4f238d8_2000x800.png" width="1200" height="479.6703296703297" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/38aae5bc-2cec-4175-9a5f-f73ae4f238d8_2000x800.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:582,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:201795,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!4Hle!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38aae5bc-2cec-4175-9a5f-f73ae4f238d8_2000x800.png 424w, https://substackcdn.com/image/fetch/$s_!4Hle!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38aae5bc-2cec-4175-9a5f-f73ae4f238d8_2000x800.png 848w, https://substackcdn.com/image/fetch/$s_!4Hle!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38aae5bc-2cec-4175-9a5f-f73ae4f238d8_2000x800.png 1272w, https://substackcdn.com/image/fetch/$s_!4Hle!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38aae5bc-2cec-4175-9a5f-f73ae4f238d8_2000x800.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><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!k2_8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e7037b3-82a5-4de7-ae18-db03067465b5_2120x696.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!k2_8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e7037b3-82a5-4de7-ae18-db03067465b5_2120x696.png 424w, https://substackcdn.com/image/fetch/$s_!k2_8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e7037b3-82a5-4de7-ae18-db03067465b5_2120x696.png 848w, https://substackcdn.com/image/fetch/$s_!k2_8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e7037b3-82a5-4de7-ae18-db03067465b5_2120x696.png 1272w, https://substackcdn.com/image/fetch/$s_!k2_8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e7037b3-82a5-4de7-ae18-db03067465b5_2120x696.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!k2_8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e7037b3-82a5-4de7-ae18-db03067465b5_2120x696.png" width="1456" height="478" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2e7037b3-82a5-4de7-ae18-db03067465b5_2120x696.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:478,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:144127,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!k2_8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e7037b3-82a5-4de7-ae18-db03067465b5_2120x696.png 424w, https://substackcdn.com/image/fetch/$s_!k2_8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e7037b3-82a5-4de7-ae18-db03067465b5_2120x696.png 848w, https://substackcdn.com/image/fetch/$s_!k2_8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e7037b3-82a5-4de7-ae18-db03067465b5_2120x696.png 1272w, https://substackcdn.com/image/fetch/$s_!k2_8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e7037b3-82a5-4de7-ae18-db03067465b5_2120x696.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><h5><strong>Small Sample </strong>(N=500)</h5><p>In smaller samples, bias rises. Here the I-Learner performs very well, followed by the DR and X-Learner. The R-Learner actually shaves off a lot of variance, but is much more biased. Notably, ML methods do not perform very poorly in smaller samples. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xzEE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e1ebbb5-88cc-467d-88d6-76d67b3d9d79_2000x800.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xzEE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e1ebbb5-88cc-467d-88d6-76d67b3d9d79_2000x800.png 424w, https://substackcdn.com/image/fetch/$s_!xzEE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e1ebbb5-88cc-467d-88d6-76d67b3d9d79_2000x800.png 848w, https://substackcdn.com/image/fetch/$s_!xzEE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e1ebbb5-88cc-467d-88d6-76d67b3d9d79_2000x800.png 1272w, https://substackcdn.com/image/fetch/$s_!xzEE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e1ebbb5-88cc-467d-88d6-76d67b3d9d79_2000x800.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xzEE!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e1ebbb5-88cc-467d-88d6-76d67b3d9d79_2000x800.png" width="1200" height="479.6703296703297" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1e1ebbb5-88cc-467d-88d6-76d67b3d9d79_2000x800.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:582,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:245342,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!xzEE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e1ebbb5-88cc-467d-88d6-76d67b3d9d79_2000x800.png 424w, https://substackcdn.com/image/fetch/$s_!xzEE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e1ebbb5-88cc-467d-88d6-76d67b3d9d79_2000x800.png 848w, https://substackcdn.com/image/fetch/$s_!xzEE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e1ebbb5-88cc-467d-88d6-76d67b3d9d79_2000x800.png 1272w, https://substackcdn.com/image/fetch/$s_!xzEE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e1ebbb5-88cc-467d-88d6-76d67b3d9d79_2000x800.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><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mNbT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0777a1f-d186-43b3-a1be-0f105fc3a780_1572x506.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mNbT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0777a1f-d186-43b3-a1be-0f105fc3a780_1572x506.png 424w, https://substackcdn.com/image/fetch/$s_!mNbT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0777a1f-d186-43b3-a1be-0f105fc3a780_1572x506.png 848w, https://substackcdn.com/image/fetch/$s_!mNbT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0777a1f-d186-43b3-a1be-0f105fc3a780_1572x506.png 1272w, https://substackcdn.com/image/fetch/$s_!mNbT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0777a1f-d186-43b3-a1be-0f105fc3a780_1572x506.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mNbT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0777a1f-d186-43b3-a1be-0f105fc3a780_1572x506.png" width="1456" height="469" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a0777a1f-d186-43b3-a1be-0f105fc3a780_1572x506.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:469,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:99820,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!mNbT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0777a1f-d186-43b3-a1be-0f105fc3a780_1572x506.png 424w, https://substackcdn.com/image/fetch/$s_!mNbT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0777a1f-d186-43b3-a1be-0f105fc3a780_1572x506.png 848w, https://substackcdn.com/image/fetch/$s_!mNbT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0777a1f-d186-43b3-a1be-0f105fc3a780_1572x506.png 1272w, https://substackcdn.com/image/fetch/$s_!mNbT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0777a1f-d186-43b3-a1be-0f105fc3a780_1572x506.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><h5><strong>Measurement Error </strong>(q=0.1)</h5><p>A small amount of noise in outcome measurement can bias the estimates towards 0. Here the DR learner did very well on both DGPs and I-Learner did well on the Simpler DGP. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rm-6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4a94362-7b20-4453-a9e6-ee34aa228399_2000x800.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rm-6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4a94362-7b20-4453-a9e6-ee34aa228399_2000x800.png 424w, https://substackcdn.com/image/fetch/$s_!rm-6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4a94362-7b20-4453-a9e6-ee34aa228399_2000x800.png 848w, https://substackcdn.com/image/fetch/$s_!rm-6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4a94362-7b20-4453-a9e6-ee34aa228399_2000x800.png 1272w, https://substackcdn.com/image/fetch/$s_!rm-6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4a94362-7b20-4453-a9e6-ee34aa228399_2000x800.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rm-6!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4a94362-7b20-4453-a9e6-ee34aa228399_2000x800.png" width="1200" height="479.6703296703297" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f4a94362-7b20-4453-a9e6-ee34aa228399_2000x800.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:582,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:239624,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!rm-6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4a94362-7b20-4453-a9e6-ee34aa228399_2000x800.png 424w, https://substackcdn.com/image/fetch/$s_!rm-6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4a94362-7b20-4453-a9e6-ee34aa228399_2000x800.png 848w, https://substackcdn.com/image/fetch/$s_!rm-6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4a94362-7b20-4453-a9e6-ee34aa228399_2000x800.png 1272w, https://substackcdn.com/image/fetch/$s_!rm-6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff4a94362-7b20-4453-a9e6-ee34aa228399_2000x800.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><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!AdlB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdec5d62c-2133-4d30-9458-4f1454da1574_1578x514.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AdlB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdec5d62c-2133-4d30-9458-4f1454da1574_1578x514.png 424w, https://substackcdn.com/image/fetch/$s_!AdlB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdec5d62c-2133-4d30-9458-4f1454da1574_1578x514.png 848w, https://substackcdn.com/image/fetch/$s_!AdlB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdec5d62c-2133-4d30-9458-4f1454da1574_1578x514.png 1272w, https://substackcdn.com/image/fetch/$s_!AdlB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdec5d62c-2133-4d30-9458-4f1454da1574_1578x514.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!AdlB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdec5d62c-2133-4d30-9458-4f1454da1574_1578x514.png" width="1456" height="474" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dec5d62c-2133-4d30-9458-4f1454da1574_1578x514.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:474,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:99929,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!AdlB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdec5d62c-2133-4d30-9458-4f1454da1574_1578x514.png 424w, https://substackcdn.com/image/fetch/$s_!AdlB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdec5d62c-2133-4d30-9458-4f1454da1574_1578x514.png 848w, https://substackcdn.com/image/fetch/$s_!AdlB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdec5d62c-2133-4d30-9458-4f1454da1574_1578x514.png 1272w, https://substackcdn.com/image/fetch/$s_!AdlB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdec5d62c-2133-4d30-9458-4f1454da1574_1578x514.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><h5><strong>High Dimensional Covariates </strong>(K=20)</h5><p>Here the DR learner outperformed all others in both DGPs. The I-Learner also did very well on the simpler DGP. The M-OLS and I-OLS also did surprisingly well, despite not being designed for high dimensional covariates.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!siWN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9a620af-efd4-469f-ad32-5b39c32be642_2000x800.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!siWN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9a620af-efd4-469f-ad32-5b39c32be642_2000x800.png 424w, https://substackcdn.com/image/fetch/$s_!siWN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9a620af-efd4-469f-ad32-5b39c32be642_2000x800.png 848w, https://substackcdn.com/image/fetch/$s_!siWN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9a620af-efd4-469f-ad32-5b39c32be642_2000x800.png 1272w, https://substackcdn.com/image/fetch/$s_!siWN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9a620af-efd4-469f-ad32-5b39c32be642_2000x800.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!siWN!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9a620af-efd4-469f-ad32-5b39c32be642_2000x800.png" width="1200" height="479.6703296703297" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f9a620af-efd4-469f-ad32-5b39c32be642_2000x800.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:582,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:274156,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!siWN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9a620af-efd4-469f-ad32-5b39c32be642_2000x800.png 424w, https://substackcdn.com/image/fetch/$s_!siWN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9a620af-efd4-469f-ad32-5b39c32be642_2000x800.png 848w, https://substackcdn.com/image/fetch/$s_!siWN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9a620af-efd4-469f-ad32-5b39c32be642_2000x800.png 1272w, https://substackcdn.com/image/fetch/$s_!siWN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9a620af-efd4-469f-ad32-5b39c32be642_2000x800.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><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4ZWE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5dc38fb9-c3a6-4b1b-85ca-13e0a882667a_1590x520.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4ZWE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5dc38fb9-c3a6-4b1b-85ca-13e0a882667a_1590x520.png 424w, https://substackcdn.com/image/fetch/$s_!4ZWE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5dc38fb9-c3a6-4b1b-85ca-13e0a882667a_1590x520.png 848w, https://substackcdn.com/image/fetch/$s_!4ZWE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5dc38fb9-c3a6-4b1b-85ca-13e0a882667a_1590x520.png 1272w, https://substackcdn.com/image/fetch/$s_!4ZWE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5dc38fb9-c3a6-4b1b-85ca-13e0a882667a_1590x520.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4ZWE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5dc38fb9-c3a6-4b1b-85ca-13e0a882667a_1590x520.png" width="1456" height="476" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5dc38fb9-c3a6-4b1b-85ca-13e0a882667a_1590x520.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:476,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:99712,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!4ZWE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5dc38fb9-c3a6-4b1b-85ca-13e0a882667a_1590x520.png 424w, https://substackcdn.com/image/fetch/$s_!4ZWE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5dc38fb9-c3a6-4b1b-85ca-13e0a882667a_1590x520.png 848w, https://substackcdn.com/image/fetch/$s_!4ZWE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5dc38fb9-c3a6-4b1b-85ca-13e0a882667a_1590x520.png 1272w, https://substackcdn.com/image/fetch/$s_!4ZWE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5dc38fb9-c3a6-4b1b-85ca-13e0a882667a_1590x520.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><h4><strong>Cost-Benefit Analysis</strong></h4><p>As promised some of these estimators are able to reduce variance by 70%-90% at minimal increase in bias. What is best for the problem depends on the relative valuation of absolute bias (as % of True ATE) vs the variance reduction (as % of variance of B-OLS). Note, more bias is bad while more variance reduced is good. If I take &#8216;r&#8217; to be a simple linear conversion factor:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;\\text{abs bias (%)}=r*\\text{variance reduced (%)}&quot;,&quot;id&quot;:&quot;FRMFRHTTXI&quot;}" data-component-name="LatexBlockToDOM"></div><p>And if we treat all the five scenarios above as equally likely to occur, then we can score and add up the quality of each estimator under a value of r. Then by changing r from 0 to 1000 we can discover the best and second best estimators. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uWTW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eb78601-db03-4825-82d0-fe5822bc2af8_1962x950.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uWTW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eb78601-db03-4825-82d0-fe5822bc2af8_1962x950.png 424w, https://substackcdn.com/image/fetch/$s_!uWTW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eb78601-db03-4825-82d0-fe5822bc2af8_1962x950.png 848w, https://substackcdn.com/image/fetch/$s_!uWTW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eb78601-db03-4825-82d0-fe5822bc2af8_1962x950.png 1272w, https://substackcdn.com/image/fetch/$s_!uWTW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eb78601-db03-4825-82d0-fe5822bc2af8_1962x950.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uWTW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eb78601-db03-4825-82d0-fe5822bc2af8_1962x950.png" width="1456" height="705" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5eb78601-db03-4825-82d0-fe5822bc2af8_1962x950.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:705,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:157516,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!uWTW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eb78601-db03-4825-82d0-fe5822bc2af8_1962x950.png 424w, https://substackcdn.com/image/fetch/$s_!uWTW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eb78601-db03-4825-82d0-fe5822bc2af8_1962x950.png 848w, https://substackcdn.com/image/fetch/$s_!uWTW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eb78601-db03-4825-82d0-fe5822bc2af8_1962x950.png 1272w, https://substackcdn.com/image/fetch/$s_!uWTW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5eb78601-db03-4825-82d0-fe5822bc2af8_1962x950.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><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZkmH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939f9201-023a-4a0b-9fb6-91471478e4ad_1970x968.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZkmH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939f9201-023a-4a0b-9fb6-91471478e4ad_1970x968.png 424w, https://substackcdn.com/image/fetch/$s_!ZkmH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939f9201-023a-4a0b-9fb6-91471478e4ad_1970x968.png 848w, https://substackcdn.com/image/fetch/$s_!ZkmH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939f9201-023a-4a0b-9fb6-91471478e4ad_1970x968.png 1272w, https://substackcdn.com/image/fetch/$s_!ZkmH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939f9201-023a-4a0b-9fb6-91471478e4ad_1970x968.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZkmH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939f9201-023a-4a0b-9fb6-91471478e4ad_1970x968.png" width="1456" height="715" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/939f9201-023a-4a0b-9fb6-91471478e4ad_1970x968.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:715,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:173179,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ZkmH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939f9201-023a-4a0b-9fb6-91471478e4ad_1970x968.png 424w, https://substackcdn.com/image/fetch/$s_!ZkmH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939f9201-023a-4a0b-9fb6-91471478e4ad_1970x968.png 848w, https://substackcdn.com/image/fetch/$s_!ZkmH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939f9201-023a-4a0b-9fb6-91471478e4ad_1970x968.png 1272w, https://substackcdn.com/image/fetch/$s_!ZkmH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F939f9201-023a-4a0b-9fb6-91471478e4ad_1970x968.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><ul><li><p>If variance reduction matters most, then the S-Learner or X-Learner is your choice. But this situation is practically less likely. </p></li><li><p>But in general, the top two choices, in order, are:</p><ul><li><p>Doubly Robust Learner which is robust to imbalances, high dimensional covariates and complex DGPs. </p></li><li><p>Interactive ML Learner which is more conservative and cautious about bias and more suited for simpler DGPs. </p></li></ul></li></ul><h4><strong>References</strong></h4><ol><li><p>Athey, S., &amp; Imbens, G. W. (2017). The econometrics of randomized experiments. In *Handbook of economic field experiments* (Vol. 1, pp. 73-140). North-Holland. Chicago.</p></li><li><p>Bai, Y., Shaikh, A. M., &amp; Tabord-Meehan, M. (2024). A Primer on the Analysis of Randomized Experiments and a Survey of some Recent Advances. *arXiv preprint arXiv:2405.03910*. Chicago.</p></li><li><p>Chernozhukov, V., Chetverikov, D., Demirer, M., Duflo, E., Hansen, C., Newey, W., &amp; Robins, J. (2018). Double/debiased machine learning for treatment and structural parameters.</p></li><li><p>Foster, D. J., &amp; Syrgkanis, V. (2023). Orthogonal statistical learning. <em>The Annals of Statistics</em>, <em>51</em>(3), 879-908.</p></li><li><p>Freedman, D. A. (2008). On regression adjustments to experimental data. Advances in Applied Mathematics, 40*(2), 180-193.</p></li><li><p>Guo, Y., Coey, D., Konutgan, M., Li, W., Schoener, C., &amp; Goldman, M. (2021). Machine learning for variance reduction in online experiments. *Advances in Neural Information Processing Systems, 34*, 8637-8648.</p></li><li><p>Kennedy, E. H. (2023). Towards optimal doubly robust estimation of heterogeneous causal effects. <em>Electronic Journal of Statistics</em>, <em>17</em>(2), 3008-3049.</p><p>Chicago</p></li><li><p>K&#252;nzel, S. R., Sekhon, J. S., Bickel, P. J., &amp; Yu, B. (2019). Metalearners for estimating heterogeneous treatment effects using machine learning. *Proceedings of the national academy of sciences, 116*(10), 4156-4165.</p></li><li><p>Lin, W. (2013). Agnostic notes on regression adjustments to experimental data: Reexamining Freedman&#8217;s critique.</p></li><li><p>List, J. A., Muir, I., &amp; Sun, G. (2024). Using machine learning for efficient flexible regression adjustment in economic experiments. *Econometric Reviews*, 1-39.</p></li><li><p>Negi, A., &amp; Wooldridge, J. M. (2021). Revisiting regression adjustment in experiments with heterogeneous treatment effects. *Econometric Reviews, 40*(5), 504-534.</p></li><li><p>Nie, X., &amp; Wager, S. (2021). Quasi-oracle estimation of heterogeneous treatment effects. *Biometrika, 108*(2), 299-319.</p></li></ol><h4><strong>Implementation Notes</strong></h4><ul><li><p>I have not tested methods that also use <em>pre-experimental</em> <em>outcomes</em> (e.g. CUPED, DiD, etc.).</p></li><li><p>Since treatment is randomized, the propensity scores are identical and equal to p. If we are able to control for all confounders, we can use propensity scores in place of p. </p></li><li><p>All methods above used out of the box LightGBM regressor and cross-splitting to prevent overfitting.</p></li></ul>]]></content:encoded></item></channel></rss>