dat <- read.csv("Customer Shopping and Promotion Preferences clean.csv")

# Reverse-code importance: 0 = least important, 10 = most important
dat$importance_recoded <- 10 - dat$discount_importance

plot(
  jitter(dat$importance_recoded, amount = 0.15),
  jitter(dat$discount_willingness, amount = 0.08),
  main = "Discount Importance and Willingness to Buy",
  xlab = "Discount importance (0 = least, 10 = most)",
  ylab = "Willingness to buy because of a discount (Q6 score)",
  xlim = c(-0.5, 10.5),
  ylim = c(0.5, 5.5),
  pch = 19,
  col = "steelblue"
)

abline(
  lm(discount_willingness ~ importance_recoded, data = dat),
  col = "red",
  lwd = 2
)