  Real-time bidding (RTB) systems, which utilize auctions to allocate user
impressions to competing advertisers, continue to enjoy success in digital
advertising. Assessing the effectiveness of such advertising remains a
challenge in research and practice. This paper proposes a new approach to
perform causal inference on advertising bought through such mechanisms.
Leveraging the economic structure of first- and second-price auctions, we first
show that the effects of advertising are identified by the optimal bids. Hence,
since these optimal bids are the only objects that need to be recovered, we
introduce an adapted Thompson sampling (TS) algorithm to solve a multi-armed
bandit problem that succeeds in recovering such bids and, consequently, the
effects of advertising while minimizing the costs of experimentation. We derive
a regret bound for our algorithm which is order optimal and use data from RTB
auctions to show that it outperforms commonly used methods that estimate the
effects of advertising.
