Instrumental variables when you cannot randomize
Today let's look at what to do when you cannot randomize the thing whose effect you want to measure, and the usual regression hands you an answer that is clearly wrong.
Riverside Mart is a convenience chain. Across 300 separate store-weeks, it recorded the shelf price of its signature snack bar and how many units sold that week.
Here is that scatter, price against units sold, across all 300 store-weeks.
Price and units rise together, which is backwards. Raise a price and ordinary demand says sales should fall, not climb with it. Something else is driving both of them at once.
Why raising the price seems to raise sales (it does not)
Fit the obvious regression first: units sold against price, across all 300 store-weeks.
The coefficient on price is 2.41. Read literally, that says every extra dollar on the snack bar's shelf price brings in about 2.4 more units sold a week. That is not just a weak effect, it is the wrong direction entirely.
store_weeks was built by simulation, so the real effect of price on units is known and fixed in advance: minus 4 units per dollar. Raising the price should cost the store sales, not gain them, yet the regression says the opposite.
The reason is a variable the regression never sees: demand, the store manager's own weekly read of how strong local appetite for the snack bar is running. In a strong-demand week, the manager raises the price because customers will pay it, and that same strong demand also pushes units sold up on its own. Price and units move together for a reason that has nothing to do with price's real effect, which is why the naive regression reads the relationship backwards.
demand's own true effect on units is fixed at plus 14 units per unit of demand strength, built into the simulation the same way price's effect was. It is that effect the naive regression is mistaking for price's.