HW 4
Question 1
Recency train 25%, 50%, 75% quantiles
Explore
Data : CDSalesProcessed
Functions : p25 median p75
Top : Function
variable p25 median p75
RecencyTrain 159 268 297
DollarTrain 25%, 50%, 75% quantiles
Explore
Data : CDSalesProcessed
Functions : p25 median p75
Top : Function
variable p25 median p75
DollarTrain 17.300 37.980 83.280
Question 2
Pivot table
Data : CDSalesProcessed
Categorical : DollarTrain_rc RecencyTrain_rc
Numeric : DollarVal
Function : mean
RecencyTrain_rc X1 X2 X3 X4 Total
1 NA 16.017 26.376 83.227 61.606
2 2.731 9.850 15.274 29.305 14.065
3 5.139 4.887 5.696 27.723 7.360
4 4.044 3.119 10.253 3.900 5.013
Total 4.178 6.707 15.209 62.154 22.053
Question 3
Regress DollarVal onto RecencyTrain, FrequencyTrain, and DollarTrain. What is the R squared for this model?
Ans: R-squared: 0.304, Adjusted R-squared: 0.303
Please interpret the coefficients on RecencyTrain, FrequencyTrain, and DollarTrain.
RecencyTrain: One unit of change in RecencyTrain, causes a decrease of |-0.056| in the DollarVal, holding all
[Type here]
, 10/15/2018 radiant-report-2018-02-07.html
FrequencyTrain: One unit of change in FrequencyTrain, causes an increase of |12.066| in the DollarVal,
holding all other variables constant
DollarTrain: One unit of change in DollarTrain, causes an increase of |0.008| in the DollarVal, holding all
other variables constant
Linear regression (OLS)
Data : CDSalesProcessed
Response variable : DollarVal
Explanatory variables: FrequencyTrain, DollarTrain, RecencyTrain
Null hyp.: the effect of x on DollarVal is zero
Alt. hyp.: the effect of x on DollarVal is not zero
coefficient std.error t.value p.value
(Intercept) 6.880 4.337 1.586 0.113
FrequencyTrain 12.066 0.685 17.614 < .001 ***
DollarTrain 0.008 0.008 0.994 0.321
RecencyTrain -0.056 0.014 -3.883 < .001 ***
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
R-squared: 0.304, Adjusted R-squared: 0.303
F-statistic: 342.667 df(3,2353), p.value < .001
Nr obs: 2,357
Question 4
Please use the model in Q3. Please predict DollarVal for a customer that has RecencyTrain=100,
FrequencyTrain and DollarTrain at the sample mean.
FrequencyTrain mean = 2.253
DollarTrain mean = 81.507
Ans: 29.086
This study source was downloaded by 100000830604181 from CourseHero.com on 10-21-2021 05:32:22 GMT -05:00
file:///Users/kunlelawal/Desktop/Masters/MSA/Classes/Spring2018/MGT%206203/HW4/radiant-report-2018-02-07.html 2/9
https://www.coursehero.com/file/34269548/hw4solnpdf/