📜 ⬆️ ⬇️

Bid optimization: the relationship between the cost per click and the set rate

Today we will talk again about conversions. Namely, evidence that, under certain assumptions about the relationship between the price of a click ( CPC) and set rate ( Bid), and also about the relationship between CPCand the number of clicks ( CL) for the optimization strategy “maximum conversions at a fixed target conversion cost (for example, X) ", The optimal bid for a keyword phrase is proportional to the product of the conversion rate for the phrase ( CR) on the target cost of conversion X, i.e:

BID simCRX.


The optimization rule itself is:

BID=CRX


widely used in practice to optimize the rates in contextual advertising. In this paper, we present a rigorous justification of this approach, and also show how it can be modified in order to increase the effect of optimization.



Basic definitions and assumptions:


As part of the work, we will operate with the following values:
')

Now we make a number of assumptions:

Assumption 1:


CPCidirectly proportional BidiThis means that the higher the rate we set, the higher the cost per click, namely:

CPCi=kiBIDi,

Where 0<ki<1.

Assumption 2:


Number of clicks on the phrase CLidirectly proportional to the root of the bet Bidi. This means that by increasing the rate by 2 times on average, we will receive 1.41 times more clicks. The logic of this model is that, from a certain point, an increase in the rate has little effect on the resulting increase in the number of clicks:

CLi=wiBIDi1/2,


Where wi>0.

Setting the optimization problem:


By making these 2 assumptions about the form of dependencies, we can express the main metrics of contextual advertising through a bid for a key phrase. We will not be interested in all metrics, but only the following, aggregated across all optimized phrases: expense ( SP), the number of conversions ( CV), the cost of conversion ( CPA):

SP= sum limitsi=1NSPi= sum limitsi=1NCLiCPCi,


CV= sum limitsi=1NCVi= sum limitsi=1NCRiCLi,


CPA= fracSPCV= frac sum limitsi=1NCLiCPCi sum limitsi=1NCRiCLi.



If we accept our assumptions regarding the relationship between the average cost per click and the number of clicks on the rate, the last formulas will take the form:

CPA= frac sum limitsi=1NkiwiBIDi3/2 sum limitsi=1NCRiwiBIDi1/2,



CV= sum limitsi=1NCRiwiBIDi1/2.


The task that corresponds to the optimization strategy: “the maximum of conversions with a limited average price of conversion” can be mathematically written as:

 begincases displaystyleCV mapstomax  CPA=X endcases,


Where X- The target conversion price set by the user. If we now replace the expressions for CVand CPAthrough their submission through a bid, we get the following equivalent problem:

 begincases displaystyle sum limitsi=1NCRiwiBIDi1/2 mapstomax frac sum limitsi=1NkiwiBIDi3/2 sum limitsi=1NCRiwiBIDi1/2=X endcases,


or

 begincases displaystyle sum limitsi=1NCRiwiBIDi1/2 mapstomax sum limitsi=1NkiwiBIDi3/2X sum limitsi=1NCRiwiBIDi1/2=0 endcases.


We assume that the conversion rates CRias well as proportionality coefficients wiand kido not depend on the bid. Then our task comes down to finding such a set of bids that would maximize the number of conversions at a limited CPA.

Solution optimization problem:


So, we formulated the classical extremal problem (search for the maximum) under the given constraints, which is called the conditional extremum problem in another way.

The classical approach to solving such a problem is the Lagrange method of indefinite multipliers, which reduces the problem to a conditional extremum in the search for unconditional (without restrictions on the solution) extremum.

The essence of the Lagrange method is to optimize a modified function of the following form:

L(x,L1,...,Lm)=f(x)+ sum limitsj=1mLjgj(x),


Where f(x)- the original function, for which we need to find a conditional extremum, g1(x),...,gm(x)- specified restrictions on the solution, and Lj- Uncertain Lagrange multipliers that need to be found in the process of optimizing the function L(x,L1,...,Lm).

In our case, instead of solving the problem formulated above, we will optimize the following function:

F= sum limitsi=1NCRiwiBIDi1/2+L Bigl( sum limitsi=1NkiwiBIDi3/2X sum limitsi=1NCRiwiBIDi1/2 Bigr)


regarding N+1variable: BID1,BID2,...,BIDN,L.

In order to find the maximum of the above function, it is required to solve the system from N+1equations for N+1variable:

 begincases displaystyle frac partialF partialBID1=0 frac partialF partialBID2=0... frac partialF partialL=0 endcases,


Where  frac partialF partialBIDi- partial derivative functions Fon variable Bidiand  frac partialF partialL- partial derivative of a function Fby Lagrange multiplier L. Calculate these derivatives:

 frac partialF partialBIDi= fracCRiwi2BIDi1/2+L Bigl( frac3wikiBIDi1/22 fracXCRiwi2BIDi1/2 Bigr),i=1..N,


then from the fact that  frac partialF partialBIDi=0, follows that:

CRi+L bigr(3kiBIDiXCRi bigl)=0,i=1..N.


Similarly, we calculate the derivative  frac partialF partialL:

 frac partialF partialL= sum limitsi=1NwiBIDi1/2(kiBIDiXCRi)=0


Thus, our task of finding the optimal set of rates has been reduced to solving a system of equations:

 begincases displaystyleCRi+L bigr(3kiBIDiXCRi bigl)=0,i=1..N sum limitsi=1NwiBIDi1/2(kiBIDiXCRi)=0 endcases.


To solve this system, we first express Bidiof Nfirst equations of the system:

BIDi= fracCRi(LX1)3Lki,i=1..N


and substitute these expressions in the last equation:

 sum limitsi=1N fracwiki1/2 Bigl( fracCRi(LX1)3L Bigr)1/2 Bigl( fracCRi(LX1)3LXCRi Bigr)=0


Now we will simplify the resulting equation and remove all factors from the summation sign, which do not depend on i:

 sum limitsi=1N fracwiki1/2CRi3/2 Bigl( fracLX13L Bigr)1/2 Bigl( frac2LX13L Bigr)=0


or

 Bigl( frac2LX13L Bigr) Bigl( fracLX13L Bigr)1/2 sum limitsi=1N fracwiki1/2CRi3/2=0


Since all quantities CRi, wi, kicannot be less than 0 and are equal to zero at the same time, it means that

 sum limitsi=1N fracwiki1/2CRi3/2>0,


so the solution of the equation is equivalent to solving a simple equation for the Lagrange multiplier only L:

 Bigl( frac2LX13L Bigr) Bigl( fracLX13L Bigr)1/2=0


It can be verified that this equation has only 2 solutions:

L1= frac1XorL2= frac12X.


When substituting the first solution L1= frac1Xinto expression BIDi= fracCRi(LX1)3Lkiwe will get that BIDi=0for all i. Obviously, such a solution does not deliver the maximum of the function being optimized. CV= sum limitsi=1NCRiwiBIDi1/2, which means this solution will be outsiders (with this solution we will not spend anything and will not receive a single conversion).

Now consider the second solution. L1= frac12Xand substitute it in

BIDi= fracCRi(LX1)3Lki.


In this case, we have:

BIDi= fracCRi Bigl( frac12XX1 Bigr)3 Bigl( frac12X Bigr)ki


or

BIDi= fracCRikiX


which means

BIDi simCRiX.


Thus, our assumption is proved. Please note that in the formula for calculating the optimal rate there is also a multiplier  frac1ki. If we recall that

 frac1ki= fracBIDiCPCi,


That becomes clear the meaning of this expression. It reflects how much we can additionally “artificially increase” the rate due to the fact that the cost of the click is always less than the rate we set. If we consider advertising networks (for example, YAN), then as a rule ki approx1and therefore the classical formula for calculating the rate is correct:

BIDi=CRiX


Conclusion


In this post, we strictly justified the classical formula for optimizing the rates in contextual advertising for the strategy: “maximum conversions with a limited average conversion price”. We formulated basic assumptions when this formula is accurate. In addition, as a result of solving the task, Calltouch discovered how to modify this formula (especially if we talk about optimizing search advertising campaigns), so as to increase the effect of optimization. The results can be used as part of a conversion optimizer, as well as when manually managing bids.

Afterword:


In our opinion, the main purpose of this post is not even a strict proof of the well-known fact about how to optimize the rates for the context, but a demonstration in practice of one of the tools of the optimization theory, the Lagrange method of indefinite multipliers. This method allows to solve almost any problem on the conditional extremum arising in the development of practical tools for optimization. For example, the tasks “maximum conversions with limited DRR (share of advertising expenses)” or “maximum conversions with limited budget” are also easily reduced to a model that can be optimized using the Lagrange method. Of course, it is not always possible to solve the resulting system of equations analytically, as is done in the example described in the paper. The main difficulty of the considered approach is that we need to solve a system of nonlinear equations of large dimension, which is not always possible to do in closed form. However, there are methods of computational mathematics that will allow solving such systems numerically, building an approximate solution with any degree of accuracy.

Source: https://habr.com/ru/post/341390/


All Articles