Question: pls give python code A travel services firm has a paid search campaign. Among the many keywords in its campaign, we have data on four

pls give python code
A travel services firm has a paid search campaign. Among the many keywords in its
campaign, we have data on four keywords, denoted by 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.
The files are named clicksdata.kw8322228.csv, clicksdata.kw8322392.csv,
clicksdata.kw8322393.csv, clicksdata.kw8322445.csv respectively.
Part A: Estimate the alpha and beta parameters for each of these four keywords for this firm.
Hand-in: The eight numbers. No additional writeup required. Hint on checking your answers:
For kw8322228, alpha should be between 70 and 76, beta should between 0.03 and 0.06, with
a residual-sum-of-squares of about 230.
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. In R, nonlinear
regression using nls() and the basic call is something like what is given below.
nls_output <- nls(n.clicks ~ alpha*(1-exp(-beta*bid.value)),
start = list(alpha={starting value of alpha}, beta={starting value of beta}),
data={name of data frame})
In Python you can use the scipy.optimize.curve_fit function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!