Import Data

data <- read.csv("Customer Shopping and Promotion Preferences_November 29, 2026_18.00.csv")

names(data)
##  [1] "StartDate"                 "EndDate"                  
##  [3] "Status"                    "IPAddress"                
##  [5] "Progress"                  "Duration..in.seconds."    
##  [7] "Finished"                  "RecordedDate"             
##  [9] "ResponseId"                "RecipientLastName"        
## [11] "RecipientFirstName"        "RecipientEmail"           
## [13] "ExternalReference"         "LocationLatitude"         
## [15] "LocationLongitude"         "DistributionChannel"      
## [17] "UserLanguage"              "Last.Seen.Flow.Element.ID"
## [19] "Last.Seen.Question.IDs"    "Q2"                       
## [21] "Q3"                        "Q4"                       
## [23] "Q5"                        "Q6"                       
## [25] "Q7"                        "Q8_1"                     
## [27] "Q8_2"                      "Q8_3"                     
## [29] "Q8_4"                      "Q8_5"                     
## [31] "Q9"
dim(data)
## [1] 53 31

Clean Data

# Remove the two extra Qualtrics header rows
clean_data <- data[-c(1,2), ]

# Keep the survey variables needed for analysis
clean_data <- clean_data[, c("Q2", "Q3", "Q4", "Q5", "Q6", "Q7",
                             "Q8_1", "Q8_2", "Q8_3", "Q8_4", "Q8_5", "Q9")]

# Convert variables to numeric
clean_data[] <- lapply(clean_data, as.numeric)

summary(clean_data)
##        Q2              Q3              Q4              Q5       
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:2.000   1st Qu.:2.000   1st Qu.:2.000   1st Qu.:1.000  
##  Median :2.000   Median :3.000   Median :3.000   Median :1.000  
##  Mean   :2.755   Mean   :3.531   Mean   :2.812   Mean   :1.653  
##  3rd Qu.:3.000   3rd Qu.:5.000   3rd Qu.:3.000   3rd Qu.:2.000  
##  Max.   :7.000   Max.   :7.000   Max.   :5.000   Max.   :4.000  
##  NAs    :2       NAs    :2       NAs    :3       NAs    :2      
##        Q6              Q7             Q8_1             Q8_2       
##  Min.   :1.000   Min.   :1.000   Min.   : 0.000   Min.   : 0.000  
##  1st Qu.:3.000   1st Qu.:2.000   1st Qu.: 1.000   1st Qu.: 2.000  
##  Median :3.000   Median :3.000   Median : 5.000   Median : 3.500  
##  Mean   :3.408   Mean   :3.082   Mean   : 4.521   Mean   : 4.042  
##  3rd Qu.:4.000   3rd Qu.:4.000   3rd Qu.: 8.000   3rd Qu.: 5.250  
##  Max.   :5.000   Max.   :5.000   Max.   :10.000   Max.   :10.000  
##  NAs    :2       NAs    :2       NAs    :3        NAs    :3       
##       Q8_3             Q8_4             Q8_5              Q9       
##  Min.   : 0.000   Min.   : 0.000   Min.   : 0.000   Min.   :1.000  
##  1st Qu.: 2.000   1st Qu.: 2.000   1st Qu.: 1.500   1st Qu.:1.000  
##  Median : 4.000   Median : 4.000   Median : 5.000   Median :2.000  
##  Mean   : 4.489   Mean   : 4.234   Mean   : 4.106   Mean   :1.854  
##  3rd Qu.: 6.500   3rd Qu.: 6.000   3rd Qu.: 6.500   3rd Qu.:3.000  
##  Max.   :10.000   Max.   :10.000   Max.   :10.000   Max.   :4.000  
##  NAs    :4        NAs    :4        NAs    :4        NAs    :3
dim(clean_data)
## [1] 51 12

Save Cleaned Data

write.csv(clean_data, "Cleaned_Survey_Data.csv", row.names = FALSE)

Simple Regression

The simple regression showed that the use of discounts and coupons had a significant relationship with consumers’ willingness to buy a product because of a discount. The coefficient was 0.348, the p-value was 0.022, and the R² was 0.109. This means that consumers who use discounts more often were more likely to say that a discount makes them willing to purchase a product.

simple_model <- lm(Q6 ~ Q4, data = clean_data)

summary(simple_model)
## 
## Call:
## lm(formula = Q6 ~ Q4, data = clean_data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.8093 -0.7759 -0.1129  0.6148  2.2353 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   2.4166     0.4416   5.472 1.78e-06 ***
## Q4            0.3482     0.1470   2.368   0.0221 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.074 on 46 degrees of freedom
##   (3 observations deleted due to missingness)
## Multiple R-squared:  0.1087, Adjusted R-squared:  0.08929 
## F-statistic: 5.608 on 1 and 46 DF,  p-value: 0.02214

Multivariate Regression

The multivariate regression included discount use, age, household income, and comfort with personalized promotions. The model had an R² of 0.251 and a p-value of 0.013. Comfort with personalized promotions was statistically significant with a p-value of 0.024. Age and household income were not significant. Overall, the multivariate regression explained more of consumers’ willingness to purchase because of a discount than the simple regression.

multiple_model <- lm(Q6 ~ Q4 + Q2 + Q3 + Q7, data = clean_data)

summary(multiple_model)
## 
## Call:
## lm(formula = Q6 ~ Q4 + Q2 + Q3 + Q7, data = clean_data)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -2.25428 -0.69921 -0.03296  0.70471  2.47086 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)   
## (Intercept)  1.98134    0.63640   3.113  0.00329 **
## Q4           0.29763    0.15014   1.982  0.05385 . 
## Q2           0.04050    0.13149   0.308  0.75956   
## Q3          -0.11509    0.08271  -1.392  0.17123   
## Q7           0.28426    0.12167   2.336  0.02421 * 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.018 on 43 degrees of freedom
##   (3 observations deleted due to missingness)
## Multiple R-squared:  0.2509, Adjusted R-squared:  0.1813 
## F-statistic: 3.601 on 4 and 43 DF,  p-value: 0.01282

Compare Regression Models

summary(simple_model)
## 
## Call:
## lm(formula = Q6 ~ Q4, data = clean_data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.8093 -0.7759 -0.1129  0.6148  2.2353 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   2.4166     0.4416   5.472 1.78e-06 ***
## Q4            0.3482     0.1470   2.368   0.0221 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.074 on 46 degrees of freedom
##   (3 observations deleted due to missingness)
## Multiple R-squared:  0.1087, Adjusted R-squared:  0.08929 
## F-statistic: 5.608 on 1 and 46 DF,  p-value: 0.02214
summary(multiple_model)
## 
## Call:
## lm(formula = Q6 ~ Q4 + Q2 + Q3 + Q7, data = clean_data)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -2.25428 -0.69921 -0.03296  0.70471  2.47086 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)   
## (Intercept)  1.98134    0.63640   3.113  0.00329 **
## Q4           0.29763    0.15014   1.982  0.05385 . 
## Q2           0.04050    0.13149   0.308  0.75956   
## Q3          -0.11509    0.08271  -1.392  0.17123   
## Q7           0.28426    0.12167   2.336  0.02421 * 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.018 on 43 degrees of freedom
##   (3 observations deleted due to missingness)
## Multiple R-squared:  0.2509, Adjusted R-squared:  0.1813 
## F-statistic: 3.601 on 4 and 43 DF,  p-value: 0.01282
anova(simple_model, multiple_model)
## Analysis of Variance Table
## 
## Model 1: Q6 ~ Q4
## Model 2: Q6 ~ Q4 + Q2 + Q3 + Q7
##   Res.Df    RSS Df Sum of Sq      F  Pr(>F)  
## 1     46 53.016                              
## 2     43 44.554  3    8.4622 2.7224 0.05598 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1