Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A travel services firm has a paid search campaign. There is data on 4 keywords: kw8322228, kw8322392, kw8322393 and kw8322445. These are generic, non-branded keywords,

A travel services firm has a paid search campaign. There is data on 4 keywords: kw8322228, kw8322392, kw8322393 and kw8322445. These are generic, non-branded keywords, where the prospect's query does not indicate that he/ she is leaning toward a specific brand. For each keyword, the firm tried several bid values and recorded the corresponding number of clicks that it received. NOTE: The data on the 4 keywords can be found in the folder: https://drive.google.com/drive/folders/1rv3npkLHWVPK9B58Zn6yu1cT3BsLsA2j?usp=share_link

 

Q1) Write Python code to estimate the alpha and beta parameters for all 4 keywords. To estimate the alpha and beta for a keyword you need to run nonlinear regression n.clicks as a function of bid.value and using the appropriate function form. Nonlinear regression can be run in Python using scipy.optimize.curve_fit.

NOTE: For the initial value of alpha for each keyword, use the number of clicks at the highest bid in the dataset for that keyword. For the initial value of beta for each keyword, use the reciprocal of the average bid in the dataset for that keyword.

HINT: For kw8322228, alpha should be between 70 and 76, beta should between 0.03 and 0.06, with a RSS of about 230.


Q2) Assume that the LTV dollar value and the conversion rate values for each of the keywords for this firm are as shown:
keyword           ltv       conv.rate
kw8322228    354       0.3
kw8322392    181         0.32
kw8322393    283       0.3
kw8322445    107        0.3

Assume there is no budget constraint. Using the alpha, beta parameters from Q1 and the LTV and conversion rate values, write Python code to estimate the optimal bids for each of the 4 keywords.

NOTE: Choose an initial value vector x0 and the solver. Set up the bounds so that the lower limit = 0. If the bid is allowed to go negative, then you can get degenerate solutions.  

HINT: For kw8322228, at the optimal solution, the overall expenditure is between $1800 and $1900. The sum of overall expenditures across all 4 keywords is between $6600 and $6700.


Q3) With reference to Q2, now assume that you have a budget constraint of $3000 across these 4 keywords. Write Python code to compute the optimal bid amounts and the corresponding expenditures for the 4 keywords. This optimization in its most obvious form involves nonlinear functions and nonlinear constraints.

NOTE: Choose an initial value vector x0 and the solver. scipy.optimize.minimize function can handle both linear and nonlinear constraints.
Linear contraints are specified by create a linear constraint object using the optimize.LinearConstraint method and passing it to scipy.optimize.minimize via the constraints argument.
For nonlinear constraints it is very similar, except that you have to create a nonlinear constraint object using the optimize.NonlinearConstraint method and passing this to scipy.optimize.minimize via the constraints argument as before.

 

Set method='trust-constr'. To set up the nonlinear constraint create a constraint object as shown where total_expenditure() is a function that takes as input the vector of 4 bids and computes the total expenditure:
budget = 3000
budget_constraint_object = optimize.NonlinearConstraint(total_expenditure, 0, budget)

Set up the bounds so the lower limit = 0. If the bid is allowed to go negative, then you can get degenerate solutions.

 

HINT: At the optimal solution, total profit is in between $17900 and $18100.

 

NOTE: The data on the 4 keywords can be found in the folder: https://drive.google.com/drive/folders/1rv3npkLHWVPK9B58Zn6yu1cT3BsLsA2j?usp=share_link

NOTE: The code for Q1, Q2, and Q3 is to be written in Python in the Jupyter Notebooks environment.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Im an AI assistant and I cant access external content material consisting of the folder linked to wi... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Operating System questions