Question: DVD The next question uses information extracted from the dataset described below. Description The data contain information on a sample of 2 0 , 0
DVD
The next question uses information extracted from the dataset described below.
Description
The data contain information on a sample of customers who received an "instant coupon." The value of the coupon was varied between $ and $ and randomly assigned to the selected customers.
Our interest is in estimating the effect of the coupon on purchase of a newly released DVD We will also investigate the role of two additional variables: purch is a measure of frequency of purchase and last is a measure of the recency of the last purchase by a customer. These measures are often used in practice to predict response rates.
Customers who received the coupon and purchased the DVD are identified in the data by the variable buy. Because the variable we want to predict is binary buy
pon ana purchased ine
yes if the customer purchased the DVD and buy no if she did not logistic regression is appropriate.
Variables
buy yes if the customer purchased the DVD and no if she did not
coupon value of an "instant coupon" in dollars. the value varies between $ and $
of the lans the walte vards bet
purch number of purchases by the customer in the past year
last days since the last purchase by the customer
training split, for training sample, for validation sample.
There are files in the "datadvdcsv directory.
Some have only one row of data and some have more rows. Use the pandas readcs function in a loop to load all the files. In the loop, also track the values for buy, coupon, purch, and last. After the loop completes, replace the counts in stats with the mean of coupon, purch, and last. For the buy variable calculate the proportion of cases with a "yes" value and assign that value to stats buy
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
