Keyboard shortcuts

Press ← or β†’ to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

πŸ“– ⏱️ ~40 min read 🎯 Intermediate

Billing Models and Core Metrics

πŸ“ Before You Continue: Please read 12.1 (the advertising ecosystem panorama) first, to understand the division of roles among advertisers, media, and platforms along the transaction chain. The CTR modeling in 12.2.4 of this chapter carries the same lineage as the ranking models of Part 3 β€” if you have already read the CTR models in 3.x, you can treat this chapter as their "economic restatement" in the advertising setting.

You type "running shoes" into a search box, and the first result on the page is an ad β€” why does it deserve that spot? How much does the platform expect to earn from that single impression? Behind these questions lies no mystical algorithmic black box; the answer is written in two things: the Billing Model, which determines who pays at which step, and Metrics, which determine the yardstick the system uses to compare candidate ads.

Recommender systems optimize a fuzzy blend of user experience and business goals, whereas advertising systems have had "money" written into their objective function from day one. The billing model acts as a constitution: it stipulates how risk is allocated between advertisers and media, and every downstream component β€” retrieval, ranking, traffic forecasting, exploration strategies β€” must operate within its frame. Change the billing model, and the shape of the entire tech stack changes with it.

This chapter starts from the clash between the value models of advertisers and media, walks the billing spectrum from CPT to CPS, builds the ranking logic with eCPM as the unified measure, and then dives into the engineering details of guaranteed-contract online allocation and click-through rate estimation. All of this is the foundation for the auction mechanisms of 12.3 β€” you must first understand "how the bill is computed" before you can understand "how the price is set".

After reading this chapter, you will be able to:

  • List the billing formulas, key decision-makers, and risk allocation of each billing model: CPT/CPD, CPM, CPC, and CPA/CPS
  • Characterize ad performance with the three metrics CTR, CVR, and ROI, and carry out cross-billing-model ranking computations with
  • Explain the divide between brand advertising and direct response advertising in billing and transaction modes
  • Describe the bipartite-graph structure of Guaranteed Delivery (GD) and Online Allocation, and the ideas behind solving them
  • Explain why CTR estimation is a regression problem rather than a ranking problem, along with cold-start back-off and E&E as coping strategies
  • Complete 5 graded practice problems, working through the computational chain from metric conversion to GSP payments

12.2.0 Why the Billing Model Is the "Constitution" of an Advertising System

Every commercial product must answer the question "how do we collect money", but what makes online advertising special is this: the choice of billing unit is, in essence, an allocation of the risk created by outcome uncertainty. From impression to click to conversion, each step forward carries more uncertainty; charging at a given step amounts to pushing all risk downstream of that step onto one party. That is why the billing model is the constitution of an advertising system β€” it precedes every algorithm and defines the rules of the game.

Start from the Advertiser's side. The core of the advertiser's value model is to derive the value of a single ad backward from its final outcome. Suppose the marketing cost of selling one car is 2,000 yuan and the conversion rate from ad impression to completed purchase is 0.1%; then the value of one ad impression is yuan β€” no matter how golden the media considers its homepage banner, the scale in the advertiser's mind recognizes only this number. Real-world computations are more involved, but the principle stands: work backward from the money. By this logic, Cost Per Action (CPA) or even Cost Per Sales (CPS) pricing is the closest fit to the advertiser's value model.

Now stand on the side of the media / Supply Side. What the media cares about is not how many cars the advertiser can sell, but how much revenue each unit of ad inventory can generate β€” what the homepage banner is worth today, and whether it will still be worth that tomorrow. This naturally gives rise to "sell-the-resource" pricing models such as Cost Per Time (CPT) and Cost Per Mille (CPM): treat the ad slot as a shop front awaiting tenants, with direct measurement and stable income.

Clearly, the two sides perceive "ad inventory usage" differently, so a game is inevitable β€” one misconception to guard against is that media interests and advertiser interests are locked in a correlated game, not aligned. The eventual outcome of this game is that ad measurement evolved into two major categories. Direct Response advertising: the supply side computes ad volume from ad performance; this model originally served advertiser interests β€” early on it could indeed hurt the supply side, because when ad creatives were poor, click-through rates stayed low even with heavy exposure allocation. As technology advanced, however, this problem was overcome: by analyzing data such as ad click-through rates, the system automatically lowers the delivery share of these "low-profit" ads or demands higher bids from advertisers. Brand Awareness advertising: billed by impressions, which is more straightforward for the supply side and better suited to ad demand with no direct conversion goal (such as new-product awareness).

🧠 Mental Model: Three Ways to Collect Rent from a Shop Front

Think of the media as a landlord. CPT is "leasing the whole building": the tenant pays fixed rent; whether business thrives or dies is no business of the landlord's, and all risk sits with the tenant. CPC is "charging per store visitor": the landlord must attract foot traffic likely to walk in, while the tenant pays for every person who enters. CPS is the "pure-commission clerk": a cut only when something sells, nothing when it doesn't β€” all risk falls on the platform doing the hawking. Every move along the billing-model spectrum is, in essence, a redistribution of risk between landlord and tenant.

Analysis: The choice of billing model is not a purely technical decision; it depends on both parties' data capabilities and their control over the conversion funnel. CPA/CPS-style settlement only becomes truly viable when the platform has sufficient control over the full "impression-to-purchase" funnel and the advertisers (sellers) share roughly the same service workflow β€” Taobao's advertising platform, for example. The less controllable the funnel, the more the billing unit must shrink back toward the impression end.


12.2.1 The Billing Spectrum: From Buying Time to Buying Sales

With "risk allocation" as the key, we can arrange the mainstream billing models along a spectrum: from buying out time, to paying per impression, per click, per action, per sale. The closer the billing unit sits to the final conversion, the better it fits the advertiser's value model β€” and the more risk the platform takes on.

Cost Per Time (CPT) and Cost Per Day (CPD) sit at the far left of the spectrum. Many websites in China still sell ad slots on a fixed "X yuan per month" basis; Alimama's weekly-billed ads and portal sites' monthly banner deals belong to this category. It is crude β€” who saw the impression, whether anyone looked at all, is unknown, so the client's interests cannot be guaranteed β€” but it is also hassle-free and brings the website stable income, which is why it is common in contracted brand advertising, occupying the core banner modules of major websites. Compared with CPS, CPD places modest demands on the foundations of a partnership and makes deals easy to strike; its weakness is that, over long-term cooperation, it is less real-time and effective than CPS.

Cost Per Mille (CPM) takes the first step toward performance:

where "Spend" is what the advertiser pays to run the ad. CPM means cost per thousand impressions: charging by exposure volume started advertising's evolution toward "performance orientation", and it is also a common billing method in RTB (Real-Time Bidding) systems. Cost Per Click (CPC) goes one step further:

Keyword advertising and other performance-based formats generally adopt this pricing model; it is likewise the mainstream billing method in RTB. Cost Per Action (CPA) charges according to the actions each visitor takes on the ad, where "action" has a specific definition β€” completing a transaction, acquiring a registered user, and so on. Cost Per Sales (CPS) converts the ad placement fee into a commission on actual product sales: to hedge against ad-spend risk, the advertiser pays a commission on the actual sales generated after the click, commonly seen in the billing of small websites inside affiliate networks.

dCPM (dynamic CPM) deserves a separate word. It is the settlement system widely adopted by DSPs (Demand-Side Platforms): unlike the fixed CPM spoken of in the market (called flat CPM accordingly), dCPM was born on RTB technology and means that the bid for every single impression varies. Each bid is computed in real time from the performance of the advertiser's campaign (usually CPS), yielding the price most favorable to the advertiser and thus protecting the advertiser's interests; and because settlement with the media is still per impression, the media's revenue is also secured. In one sentence: settle with the media by impressions, optimize for the advertiser by performance β€” dCPM is precisely an engineering resolution of the two-sided game we described in 12.2.0.

The billing spectrum: horizontal axis from CPT to CPS, advertiser risk decreasing, platform risk increasing, CPC balancing in the middle

As shown, the left end of the spectrum presses risk onto the advertiser's shoulders, the right end onto the platform's, with CPC balancing in between. More precisely, risk allocation can be labeled by "who makes the key decision": in a CPM market the eCPM is fixed, which amounts to handing all decisions (and risk) to the advertiser β€” the platform guarantees impressions, but whether they bring clicks and conversions afterwards is none of its business. The CPC market is the compromise: the value of a click is judged by the advertiser (expressed in the bid), while the click-through rate is dynamically estimated by the platform, which knows the traffic better (Google, for example) β€” the platform uses CTR prediction to manage the share of risk it carries. In CPA/CPS markets both are dynamic, which amounts to the platform making the decisions and bearing the risk; Taobao's advertising platform adopts this kind of settlement precisely because its advertisers (sellers) share roughly identical service workflows and the platform's grip on the conversion funnel is strong enough.

Billing ModelBilling UnitWho Makes the Key DecisionRisk AllocationTypical Scenarios
CPT/CPDTime slot / dayMedia sets price, advertiser buys outAdvertiserBrand takeovers, core banners
CPMPer thousand impressionsPlatform guarantees volume, eCPM fixedAdvertiserRTB display bidding, GD contracts
CPCPer clickAdvertiser sets click value, platform estimates CTRShared by both (compromise)Keyword ads, ad networks
CPAPer actionPlatformPlatformEcosystems with standardized service workflows (e.g., Taobao)
CPSPer salePlatformPlatformAffiliate networks, rebate sites

πŸ’‘ Key Insight: Economics has a saying, "price fluctuates around value", and a good pricing mechanism should let price approach value as closely as possible. But advertisers and supply sides are naturally misaligned in how they perceive "value", so static pricing never closes the deal β€” and the market's answer is to let the market price itself. Auctioning is the pricing method both sides can currently accept; its core questions are how to get more demand-side participants into the auction and how to offer finer-grained bidding β€” exactly the subject of 12.3.


12.2.2 The Core Metric System: eCPM as the Unified Measure

The billing model sets the rules; a set of metrics is still needed to measure "how well the rules are being executed". Three foundational performance metrics form the common language of advertising data analysis.

Click-Through Rate (CTR) measures the average number of user clicks an ad receives across multiple impressions:

Conversion Rate (CVR) measures the relationship between user clicks and final orders:

Return On Investment (ROI) measures the relationship between the order value generated by the advertiser's ad spend and the spend itself:

These three metrics stack on one another: CTR is the platform's "supply-side metric" β€” it determines traffic quality; CVR connects clicks to conversions, characterizing the quality of demand; and ROI is what the advertiser ultimately votes with β€” advertisers whose ROI stays below 1 (or the industry-acceptable threshold) vote with their feet and pull their budgets.

Here is the problem: when a CPC-billed ad and a CPM-billed ad compete in the same auction, how does the platform compare them? The answer is eCPM (effective CPM) β€” the expected revenue per thousand impressions, which converts every billing model onto the same ruler:

  • Under CPC billing: . Here pCTR is the platform's estimate of the click-through rate for this impression, and bid is the advertiser's per-click price; multiplying the two gives the "expected revenue per impression", and multiplying by 1000 converts it to a per-thousand-impression basis.
  • Under CPM billing: . A thousand impressions cost exactly that much, so the expected revenue is the bid itself.

The platform's ranking logic then falls out naturally: for each impression opportunity, convert all candidate ads to eCPM and sort them in descending eCPM order, allocating slots in turn. Consider a numerical example: Ad A bids 2.0 yuan with pCTR 3%, Ad B bids 5.0 yuan with pCTR 1%, and Ad C bids 1.0 yuan with pCTR 8%. Their eCPMs are yuan, yuan, and yuan respectively. B, the highest bidder, lands at the bottom β€” its click probability is too low, so winning this impression would not pay off for the platform; C wins in the end.

eCPM ranking pipeline: multiple candidate ads converted to eCPM via pCTRΓ—bid and sorted descending; Ad C wins in the numerical example

As shown, eCPM is the "common currency" of the ad market: wherever a candidate comes from, it must first be exchanged into eCPM before it can compete on the same stage. This also explains why 12.2.0 called the billing model a constitution β€” the shape of the eCPM formula is entirely determined by the billing model, and whether pCTR is accurate (12.2.4) directly determines whether this ruler measures true.

🧠 Mental Model: The Airport Currency Exchange

Imagine a duty-free shop that accepts dollars, euros, and yen at once. The cashier does not compare the three currencies directly; everything is first converted into dollars at the exchange rate before being priced. eCPM is the exchange counter of ad trading: CPC's "dollars", CPM's "euros", and CPA's "yen" are all converted into "expected revenue per thousand impressions". Get the exchange rate (pCTR, bid) wrong and the price tag is distorted β€” which is exactly the weight the next section's CTR estimation carries.

Finally, the two advertising forms from 12.2.0 converge here: brand advertising is billed by impressions and traded through contracts (CPT/CPD/CPM, focused on long-term impact), while direct response advertising is billed by outcomes and traded through auctions (CPC/CPA/CPS, chasing short-term conversion actions). The two diverge in delivery timing, creative formats, and system modules β€” but once they enter the same ad slot, the platform still rules on both with the same eCPM ruler.


12.2.3 Guaranteed Contracts and Online Allocation: Volume First, Quality Second

Auctions are the star of modern advertising, but before them, guaranteed contracts ruled the first decade of Internet advertising and still hold the high-end brand budgets today. Understanding them is a necessary step toward understanding the evolution of the whole advertising system.

Guaranteed Delivery (GD) is the core mechanism of contract advertising. Its essentials can be summarized as: a contract-based ad mechanism where the agreed impression volume must be compensated if unmet; a "volume before quality" approach β€” secure the volume first, optimize later; CPM settlement; and delivery decided server-side (rather than in real time at auction). GD's audience targeting rests on two prediction technologies: click-through rate prediction and traffic forecasting β€” the former estimates "how an impression performs on a given audience", the latter estimates "how much of a given type of traffic the future holds"; together they underwrite the promise of "whether the contracted volume can be fulfilled within the term".

The technical core of contract advertising is the Online Allocation problem: modeling the matching of ads to traffic as a bipartite-graph optimization of Ad β†’ (Context, User). One side of the graph holds ad contracts carrying targeting conditions; the other holds the stream of traffic supply jointly characterized by (context, user); each time an impression arrives, the system must complete the allocation under the constraint of "fulfilling every advertiser's contracted volume". The objective function can be adjusted as needed (say, maximizing total revenue or total clicks), and the classic solution is to construct and solve the dual problem β€” turning each contract's volume constraint into a dual variable (a shadow price), so that online allocation decisions are made on the net gain of "revenue minus shadow price".

Online allocation for guaranteed contracts: ad contracts and (Context, User) traffic form a bipartite graph; edges are targeting matches, constraints guarantee each contract's volume

As shown, contract β‘  (an automotive brand, targeting males 25–40) can match traffic from (sports channel, male users), and can also filter its target audience out of (homepage feed, all users); contract β‘’ has no targeting restriction, so it connects to every supply node. On top of the supply volumes given by traffic forecasting, the allocation algorithm must pick for each piece of traffic a contract that "both fulfills the volume guarantee and maximizes value".

Traffic forecasting is itself an interesting problem: it can be viewed as an inverted retrieval problem, where the ad is the query and the space is what gets retrieved. The difficulty lies in the sheer size of the joint space, which forces and to be handled separately β€” the exact flip side of the forward direction, "retrieving ads with user requests".

Analysis: The division of labor between online allocation and auctions (12.3) can be understood as follows: contracts sell coarse targeting granularity (by audience packages and channels), auctions sell fine granularity (down to a single impression, a single bid); contracts sell certainty (guaranteed volume, compensation), auctions sell uncertainty (highest bidder wins). GD's weaknesses are that its audience targeting categories lack fine detail, and in contract sales brand advertisers impose exclusivity requirements on exposure (e.g., competitor exclusion), which further tightens the freedom of allocation. When both traffic supply and demand in a market are dense enough, coarse-grained contracts gradually give way to fine-grained auctions β€” this is the economic driver behind advertising's shift from impression-volume contracts to RTB.


12.2.4 Click-Through Rate Prediction: Ranking Models Take On a New Mission

12.2.2 planted the seed: under CPC billing, eCPM = pCTR Γ— bid Γ— 1000, so the accuracy of CTR estimation directly determines whether the ranking ruler measures true. Now we treat CTR estimation as a standalone modeling problem β€” it shares its origins with the ranking models you met in Part 3, yet meets a different fate.

The standard form of CTR prediction is the probability model : given ad , user , and context , estimate the probability that the user clicks. You might think: isn't this just the Part 3 CTR model in a new setting? The model architecture can indeed be reused, but the nature of the task changes β€” regression fits better than ranking. A recommender's ranking model only needs the relative order among candidates to be correct (a high AUC suffices), while the actual ranking basis in advertising is eCPM: the CTR estimate gets multiplied by the bid before comparison. A model that systematically overestimates CTR pushes low-bid ads up to positions they don't deserve; systematic underestimation does the opposite. In other words, an advertising system needs CTR absolute values that are as accurate as possible, not merely correct relative ordering among candidates β€” this is the first principle distinguishing CTR modeling from recommendation ranking.

New-Ad Cold Start: Hierarchical Back-off

A newly launched ad has no click statistics, so where does its pCTR come from? The answer is to exploit the ad hierarchy: creative β†’ solution β†’ campaign β†’ advertiser. A new creative has no statistics, but its campaign might; if the campaign doesn't either, back off one more level to the advertiser, estimating from the historical CTRs and ad labels of the same advertiser's past ads. This back-off strategy mirrors how recommender systems handle new items: structural priors make up for missing statistics.

Dynamic Nature: The Trade-off Between Dynamic Features and Online Learning

The distribution of the ad market shifts extremely fast β€” creative fatigue, seasonal swings, and breaking topics can render yesterday's trained model inaccurate today. There are two directions of response, each with its cost. Dynamic features: aggregate click-feedback statistics along label-combination dimensions and feed them to the model as features (i.e., multi-level click feedback); the hallmark is "fast-adjusting features" β€” the model stays fixed while the features change in real time. Its advantages are a scalable engineering architecture and strong back-off for new combinations; its drawbacks are heavy online feature storage and demanding update requirements. Online learning: let the model itself update in a streaming fashion on new data, "fast-adjusting the model", at the cost of engineering complexity in training and serving. Industrial systems often use both: dynamic features absorb short-period fluctuations, while online learning keeps pace with medium-to-long-term drift.

Exploration and Exploitation: Accumulating Statistics for Long-Tail Combinations

However good the features and however new the model, one cold fact remains: the combination space is nearly infinite, the vast majority of combinations have never received an impression, and their CTR is beyond estimation. The task of the Exploration & Exploitation (E&E) framework is exactly this: create suitable impression opportunities for long-tail combinations to accumulate statistics, thereby estimating CTR more accurately and lifting overall ad revenue. Exploration is not charity β€” today's "waste" is an investment in tomorrow's more accurate estimates; but both the volume and the effectiveness of exploration must be strictly controlled, or it directly erodes current revenue. Three classic strategies:

  • Ξ΅-greedy: explore randomly on an Ξ΅ fraction of traffic, exploit the current best on the rest. The simplest to implement, and the least exploration-efficient.
  • UCB (Upper Confidence Bound): compute an upper confidence bound on the expected reward for every candidate and pick the arm with the highest UCB; the more often an arm is selected, the closer its UCB gets to the true expected reward β€” naturally balancing "try more of the untried" with "use more of the well-performing".
  • Contextual Bandit: for each impression, make decisions on the arm's feature vector instead of the arm itself, achieving dimensionality reduction β€” no need to estimate separately for every specific ad; generalize in feature space instead, neatly echoing the hierarchical idea of back-off.

Analysis: The suitability of the three E&E strategies in advertising: Ξ΅-greedy works as a fallback strategy or in the early cold-start stage; UCB pays off clearly when the candidate set is small, but with huge candidate counts both the bound computation and the storage become burdens; Contextual Bandit sidesteps candidate explosion through feature-based dimensionality reduction and is the mainstream form of exploration modules in modern ad systems. The shared principle: exploration traffic must be spent where it counts β€” prioritize the long-tail combinations whose accurate estimation would lift expected revenue the most.

At this point, the decision chain of an ad request is complete: candidate ads enter ranking through targeted retrieval, the pCTR model outputs click probabilities, they are multiplied by bids and converted into eCPM, sorted descending, and impressions allocated from the top down. But note β€” eCPM ranking is only the entry ticket: it decides who takes the stage; what actually decides "how much the platform collects" is the auction mechanism. The same eCPM winner, paying under the GSP (Generalized Second Price) mechanism, may pay a price far from its own bid. Who should pay how much, why truthful bidding may (or may not) be the optimal strategy, and how VCG prices via "externalities" β€” these questions belong to the territory of mechanism design, which we unfold in 12.3.


⚠️ Common Mistakes in 12.2

#MistakeExampleWhy It's WrongFix
1Treating CTR estimation as a ranking problem"A high AUC is all that matters; absolute values don't"Ads rank by eCPM, where CTR gets multiplied by the bid; systematic over/underestimation changes both ranking and billingEvaluate it as a regression/calibration problem; watch the deviation between predicted and true absolute values
2Confusing eCPM with CPM"eCPM is just cost per thousand impressions"CPM is a billing model (a cost measure); eCPM is the expected revenue per thousand impressions (a revenue measure) and the unified measure for rankingRemember e = expected/effective; eCPM serves the platform's ranking decisions
3Assuming CPA/CPS is better for the platform"Performance-based billing must mean the platform earns more"Under CPA/CPS both CTR and value are dynamic; decisions and risk fall entirely on the platform, which bleeds money when the conversion funnel is uncontrollableIt only suits ecosystems with strong funnel control and standardized service workflows (e.g., Taobao)
4Assuming more precise targeting always creates more market value"Precise targeting + big data will surely boost revenue significantly"Media and advertisers are in a correlated game; who captures the gains of precision depends on the billing and pricing mechanismsAnalyze each party's incentives from the angles of risk allocation and game theory
5Ignoring the difference between dCPM and flat CPM"Isn't dCPM just CPM?"flat CPM fixes the per-thousand price; dCPM's bid for every impression changes in real time with campaign performanceDistinguish the two ledgers: "settling with media by impressions" vs. "optimizing for advertisers by performance"
6Doing contract allocation with CTR prediction but no traffic forecasting"An accurate model is enough to fulfill the volume guarantee"GD's volume constraints rest on traffic forecasting; misestimate the supply and the guarantee inevitably collapsesOnline allocation = CTR prediction + traffic forecasting; neither can be missing

Chapter Summary

πŸ“Œ Key Takeaways

ConceptKey PointsWhy It Matters
Billing model as constitutionThe billing unit determines risk allocation: advertisers derive value backward from outcomes, media care about revenue per unit of inventoryEvery ad algorithm operates under the rules of the game drawn by the billing model
The billing spectrumCPT/CPD β†’ CPM β†’ CPC β†’ CPA/CPS, risk shifting gradually from advertiser to platformA platform that picks the wrong billing model takes the risk onto itself
Three core metricsCTR = clicks/impressions, CVR = orders/clicks, ROI = order value/spendThe common language of advertising data analysis
eCPMUnder CPC = pCTRΓ—bidΓ—1000; under CPM = bid; rank descending by itThe unified measure across billing models, the ruler of ranking
GD and online allocationGuaranteed volume with compensation for shortfall, volume before quality, CPM settlement; Ad→(Context,User) bipartite graph solved via dualityThe technical core of contract advertising, the coarse-grained counterpart to fine-grained auctions
CTR estimationRegression, not ranking (absolute accuracy required); cold start via creative→advertiser hierarchical back-off; dynamic features vs. online learning; E&E to accumulate long-tail statisticsThe accuracy of eCPM ranking depends entirely on pCTR calibration

❓ FAQ

Q1: Under CPC billing, how does the platform manage the risk it bears?

A: The platform knows click-through rates better (Google, for example) and manages the uncertainty of "will this impression be clicked" through CTR estimation: lowering the delivery share of low-pCTR ads or demanding higher bids. This is exactly why CPC is called the compromise point of risk β€” the advertiser judges the click's value and bids, while the platform estimates the CTR and shoulders traffic quality.

Q2: Why does eCPM equal the bid under CPM billing?

A: CPM billing charges per thousand impressions, so the advertiser's bid is itself "what I'm willing to pay per thousand impressions" β€” that is, the platform's expected revenue per thousand impressions, with no need to multiply by pCTR. It also means the eCPM in a CPM market is fixed, handing all decisions and risk to the advertiser.

Q3: What is the essential difference between contract ads and auction ads?

A: Three points. Transaction mode: contracts are negotiated-ahead guaranteed sales, auctions are real-time trades. Billing: contracts settle on CPM impression volume, volume before quality; auctions bill by performance such as CPC/CPA. Targeting granularity: contracts sell coarse-grained audience packages/channels with brand exclusivity demands, while auctions can go as fine as a single impression. The denser the market's supply and demand, the more it favors fine-grained auctions.

πŸ”— Connections to Later Chapters

  • The division of roles among advertisers, media, and platform in 12.1 (the advertising ecosystem panorama) is the premise of this chapter's risk-allocation analysis.
  • 12.3 (auction mechanisms) picks up where this chapter ends: eCPM ranking decides who takes the stage, while GSP/VCG and other mechanisms decide how much is collected.
  • The CTR model architectures of 3.x (ranking models) are the basis of this chapter's pCTR modeling, but the advertising setting raises the bar for absolute-value calibration.
  • 8.3 (end-to-end generative advertising) embeds the auction mechanism inside generative models, which can be seen as the unification of this chapter's eCPM ranking and 12.3's auction mechanisms under a frontier architecture.

Practice Problems

Work through all problems in order β€” they get progressively harder. Each has a complete solution you can reveal after trying it yourself.


Problem 12.2.1 β€” Metric Conversion 🟒 Easy

An e-commerce advertiser spends 600 yuan in one day, gaining 150,000 impressions, 3,000 clicks, and 120 orders totaling 3,600 yuan. Compute CPM, CPC, CTR, CVR, and ROI.

Sample Input: spend 600 yuan; impressions 150,000; clicks 3,000; orders 120; order value 3,600 yuan Sample Output: CPM = 4 yuan, CPC = 0.2 yuan, CTR = 2%, CVR = 4%, ROI = 6

πŸ’‘ Solution (click to reveal)

Approach: Apply the formulas of the five metrics directly.

Key points:

  • CPM and CPC convert into each other via ; plugging in verifies the consistency.
  • ROI = 6 means every 1 yuan of ad spend brings 6 yuan of order value β€” the core basis on which advertisers renew their budgets.

Problem 12.2.2 β€” eCPM Ranking 🟑 Medium

A single request to an ad slot receives three CPC-billed candidates: Ad A bids 1.5 yuan with pCTR 2%; Ad B bids 6.0 yuan with pCTR 0.5%; Ad C bids 3.0 yuan with pCTR 1.2%. Compute each eCPM and give the display order. If a CPM-billed Ad D also bids 40 yuan directly (per thousand impressions), where should it rank?

πŸ’‘ Solution (click to reveal)

Approach: Under CPC billing use ; under CPM billing the eCPM is the bid itself.

  • A: yuan
  • B: yuan
  • C: yuan
  • D: CPM-billed, eCPM = 40 yuan

Sorted descending: D (40) > C (36) > A (30) = B (30). A and B tie on eCPM; break the tie with secondary rules (e.g., quality score or bid).

Key points:

  • eCPM lets ads from different billing models compete on the same stage: D needs no pCTR multiplication, because its expected revenue does not depend on clicks.
  • B bids the highest (6 yuan) yet ties for last with the lowest bidder A β€” a high bid cannot rescue a low click-through rate.

Problem 12.2.3 β€” The Calibration Problem of CTR Estimation 🟑 Medium

Models A and B have exactly the same AUC on the same ad slot (identical relative order among candidates), but Model A systematically underestimates the pCTR of every ad by half (predicting 1% when the true CTR is 2%). In a CPC-billed environment with competing CPM ads, what impact does this have on ranking and platform revenue?

πŸ’‘ Solution (click to reveal)

Approach: eCPM = pCTR Γ— bid Γ— 1000; underestimating pCTR by half is equivalent to halving every CPC ad's eCPM.

On ranking: the eCPMs of CPC ads shift down across the board; quality CPC ads that should beat high-eCPM CPM ads (e.g., a 40-yuan bid) may lose β€” for example, an ad with a true drops to 30 after underestimation and loses to the 40-yuan CPM ad. On revenue: the platform misses impressions with higher expected revenue, while the penalty on low-CTR ads is weakened in the same proportion, and traffic quality declines.

Key points:

  • This is why "regression fits better than ranking": AUC measures relative order, while eCPM ranking needs the CTR absolute value to be accurate.
  • The calibration requirement that ad systems place on CTR models is the key engineering constraint distinguishing them from recommendation ranking models.

Problem 12.2.4 β€” UCB Exploration Strategy πŸ”΄ Hard

An E&E module uses UCB to manage exploration over two candidate ads. So far there have been total requests: Ad A has been selected 100 times with an average CTR of 0.10; Ad B has been selected 10 times with an average CTR of 0.08. Compute both UCBs by (), decide which one to show next, and explain why the one with the lower average CTR can win.

πŸ’‘ Solution (click to reveal)

Approach: Compute the confidence radius for each, then add the mean.

  • A: ,
  • B: ,

The next impression goes to Ad B. B's average CTR is lower, but it has only been tried 10 times: the uncertainty of its estimate (the confidence radius) is huge, and its true CTR could be far above the current observation β€” creating impression opportunities for long-tail combinations to accumulate statistics is exactly E&E's core motivation. As B gets selected more often, its radius shrinks and its UCB gradually approaches the true expectation.

Key points:

  • The UCB term = mean + uncertainty, naturally balancing exploration (large radius) and exploitation (high mean).
  • The volume of exploration must be strictly controlled: giving most traffic to B here would hurt short-term revenue β€” E&E is an investment, not charity.

πŸ† Challenge: eCPM Ranking + GSP Payment

A CPC-billed ad slot has three candidates: Ad A bids 3.0 yuan with pCTR 2%; Ad B bids 4.0 yuan with pCTR 1%; Ad C bids 2.0 yuan with pCTR 2.5%. (a) Compute the eCPMs and give the ranking. (b) Under the GSP (Generalized Second Price) mechanism, the winner pays by "converting the next-ranked ad's eCPM into its own billing basis", i.e., the paid CPC = next eCPM Γ· winner's pCTR Γ· 1000; find the winner's actual cost per click. (c) Verify that this price does not exceed the winner's bid (individual rationality), and state where GSP's full game-theoretic properties are developed in 12.3.

πŸ’‘ Hint

(a) A: ; B: ; C: . Ranking: A > C > B.

(b) Winner A pays = next-ranked C's eCPM Γ· (A's pCTR Γ— 1000) = yuan per click.

(c) satisfies individual rationality β€” an advertiser never pays more than its own bid. Note the payment is jointly determined by the next-ranked ad's eCPM and the winner's own pCTR: this is exactly what "eCPM ranking decides who takes the stage, and the auction mechanism decides how much is collected" means. GSP is not truth-telling (unlike VCG); advertisers have incentives to shade their bids, and the full mechanism analysis (VCG, equilibrium properties of GSP) is covered in 12.3.