California State University Northridge Scatterplots Python Programming Code
Description
Q2. Tayko Software is a software catalog firm that sells games and educational software. It started
out as a software manufacturer and then added third-party titles to its offerings. It recently revised its
collection of items in a new catalog, which is mailed out to its customers. This mailing yielded 2000
purchases. Based on these data, Tayko wants to devise a model for predicting the spending amount
that a purchasing customer will yield. The file Tayko.csv contains information on 2000 purchases.
Table 1. describes the variables to be used in the problem (the Excel file contains additional variables).
Table 1. Description of Variables for Tayko Software Example
a. Explore the spending amount by creating a pivot table for the categorical variables and
computing the average and standard deviation of spending in each category.
b. Explore the relationship between spending and each of the two continuous predictors by
creating two scatterplots (Spending vs. Freq, and Spending vs. last_update_days_ago). Does
there seem to be a linear relationship?
c. To fit a predictive model for Spending:
1) Partition the 2000 records into training and validation sets.
2) Run a multiple linear regression model for Spending vs. all six predictors. Give the
estimated predictive equation.
3) Based on this model, what type of purchaser is most likely to spend a large amount of
money?
4) If we used backward elimination to reduce the number of predictors, which predictor would
be dropped first from the model?
5) Show how the prediction and the prediction error are computed for the first purchase in the
validation set.
6) Evaluate the model’s predictive accuracy by examining its performance on the validation
set.
7) Create a histogram of the model residuals. Do they appear to follow a normal distribution?
How does this affect the predictive performance of the model?
Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."