Introduction

This R Notebook addresses the PC Mall marketing research assignment by analyzing customer survey data and answering the core research questions through descriptive statistics, visualizations, hypothesis testing, and regression modeling.

Load Data

# Load the dataset (assumes file is in the working directory)
pcmall <- read.csv("PC_Mall.csv", header = TRUE, check.names = TRUE)
# Inspect the dataset
str(pcmall)
## 'data.frame':    3744 obs. of  95 variables:
##  $ ID                        : int  1 2 3 4 5 6 7 8 9 10 ...
##  $ BuyFreq                   : chr  "11 +" "2 to 4" "5 to 10" "11 +" ...
##  $ UserType                  : chr  "PCMall" "PCMall" "PCMall" "PCMall" ...
##  $ Web_Online                : int  1 1 1 1 1 1 1 1 1 1 ...
##  $ Web_Phone                 : int  0 0 0 1 0 0 0 0 0 0 ...
##  $ Catalog_Phone             : int  0 0 0 0 0 0 0 1 0 0 ...
##  $ Catalog_Online            : int  1 0 0 1 0 0 0 0 0 0 ...
##  $ Catalog                   : int  0 1 0 1 1 0 0 1 1 0 ...
##  $ X3rdWeb                   : int  1 0 1 0 0 0 0 1 0 0 ...
##  $ WOM                       : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ SearchEng                 : int  1 0 1 1 0 1 1 0 0 1 ...
##  $ ChatRoom                  : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ BannerAd                  : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ Other                     : int  0 0 0 0 0 0 0 0 1 0 ...
##  $ Influence_ExplainOthers   : chr  " " " " " " " " ...
##  $ SatCatFreq                : int  4 6 5 6 4 8 4 7 4 4 ...
##  $ PrefCatFreq               : chr  "Monthly" "None" "Monthly" "Weekly" ...
##  $ SupService_Item1          : int  7 6 1 7 7 4 4 6 7 1 ...
##  $ SupService_Item2          : int  7 7 4 7 7 4 4 6 7 1 ...
##  $ SupService_Item3          : int  7 7 4 7 7 4 4 6 7 1 ...
##  $ SupService_Item4          : int  7 7 1 7 7 4 5 6 6 1 ...
##  $ PreferredMethod           : int  1 1 1 1 1 1 1 1 1 1 ...
##  $ PreferredMethod_Others    : chr  " " " " " " " " ...
##  $ ProdInfo_Item1            : int  7 4 6 6 7 4 6 5 6 NA ...
##  $ ProdInfo_Item2            : int  6 4 6 6 7 4 5 5 6 NA ...
##  $ ProdInfo_Item3            : int  7 6 6 7 7 4 5 6 6 NA ...
##  $ ProdInfo_Item4            : int  6 4 6 NA 7 4 NA 4 6 NA ...
##  $ ProdInfo_Item5            : int  7 6 3 7 7 4 5 5 6 NA ...
##  $ ProdInfo_Item6            : int  7 6 3 5 7 4 4 5 6 NA ...
##  $ Pricing_Item1             : int  7 6 5 6 7 4 5 6 5 NA ...
##  $ Pricing_Item2             : int  6 6 4 6 7 4 5 6 6 NA ...
##  $ Pricing_Item3             : int  7 6 4 6 7 4 5 5 5 NA ...
##  $ Pricing_Item4             : int  4 4 3 NA 7 4 6 6 4 NA ...
##  $ Pricing_Item5             : int  7 4 4 NA 7 4 6 6 4 NA ...
##  $ PriceExp1                 : int  2 2 2 2 2 2 2 2 2 NA ...
##  $ PriceExp2                 : int  2 2 2 1 2 2 2 2 1 NA ...
##  $ PriceExp3                 : int  2 2 2 2 2 2 2 2 1 NA ...
##  $ PriceExp4                 : int  2 2 2 1 2 2 1 2 2 NA ...
##  $ PriceExp5                 : int  2 2 1 2 2 2 2 2 2 NA ...
##  $ PriceExp6                 : int  2 2 2 2 2 2 2 2 2 NA ...
##  $ PriceExp7                 : int  2 2 2 2 2 2 1 2 2 NA ...
##  $ PriceExp8                 : int  2 2 2 2 2 2 2 2 2 NA ...
##  $ PriceExp9                 : int  2 2 2 2 1 2 2 2 2 NA ...
##  $ PriceExp_ExplainOthers    : chr  " " " " " " " " ...
##  $ SalesSer_Item1            : int  NA 4 2 NA 4 4 7 4 4 NA ...
##  $ SalesSer_Item2            : int  NA 4 2 7 4 4 7 4 4 NA ...
##  $ SalesSer_Item3            : int  NA 4 2 7 4 4 6 4 7 NA ...
##  $ SalesSer_Item4            : int  NA 4 4 NA 4 4 6 4 6 NA ...
##  $ SalesSer_Item5            : int  NA 4 2 NA 4 4 6 4 6 NA ...
##  $ SalesSer_Item6            : int  NA 4 4 NA 4 4 7 4 6 NA ...
##  $ SalesSer_Item7            : int  NA 4 4 NA 4 4 NA 4 4 NA ...
##  $ SalesSer_Item8            : int  NA 4 4 NA 4 4 NA 4 4 NA ...
##  $ ReturnExperience          : chr  " " " " " " " " ...
##  $ ExchangeExperience        : chr  " " " " " " " " ...
##  $ Product_Item1             : int  7 6 6 7 7 4 5 6 6 NA ...
##  $ Product_Item2             : int  7 6 6 6 7 4 5 6 6 NA ...
##  $ Product_Item3             : int  7 6 5 6 7 4 6 6 6 NA ...
##  $ Product_Item4             : int  7 5 5 6 7 4 7 6 6 NA ...
##  $ ReasonNotSat1             : int  2 2 2 2 2 2 1 2 2 NA ...
##  $ ReasonNotSat2             : int  2 2 1 2 2 2 2 2 2 NA ...
##  $ ReasonNotSat3             : int  2 2 2 2 2 2 2 2 2 NA ...
##  $ ReasonNotSat4             : int  2 2 2 2 1 2 2 2 2 NA ...
##  $ ReasonNotSat_ExplainOthers: chr  " " " " " " " " ...
##  $ InternetConnection        : int  3 3 3 4 2 2 2 3 3 NA ...
##  $ InternetConnection_Others : chr  " " " " " " " " ...
##  $ WebConPC_Item1            : int  7 6 6 6 7 4 6 5 6 NA ...
##  $ WebConPC_Item2            : int  7 6 6 6 5 4 6 5 6 NA ...
##  $ WebConPC_Item3            : int  7 6 6 7 6 4 5 5 6 NA ...
##  $ WebConPC_Item4            : int  6 6 3 7 5 4 5 5 6 NA ...
##  $ WebConPC_Item5            : int  6 5 6 6 5 4 5 6 6 NA ...
##  $ WebConPC_Item6            : int  6 4 3 7 4 4 6 4 6 NA ...
##  $ WebConPC_Item7            : int  6 6 6 7 5 4 5 6 6 NA ...
##  $ WebConMac_Item1           : int  NA NA 5 NA NA 4 NA NA 6 NA ...
##  $ WebConMac_Item2           : int  NA NA 6 NA NA 4 NA NA 6 NA ...
##  $ WebConMac_Item3           : int  NA NA 6 NA NA 4 NA NA 6 NA ...
##  $ WebConMac_Item4           : int  NA NA 2 NA NA 4 NA NA 6 NA ...
##  $ WebConMac_Item5           : int  NA NA 6 NA NA 4 NA NA 6 NA ...
##  $ WebConMac_Item6           : int  NA NA 3 NA NA 4 NA NA 6 NA ...
##  $ WebConMac_Item7           : int  NA NA 6 NA NA 4 NA NA 6 NA ...
##  $ OverallSat1               : int  NA 6 2 6 6 4 2 6 6 NA ...
##  $ OverallSat2               : int  6 6 2 6 5 4 1 6 5 NA ...
##  $ Repurchase                : int  7 6 3 6 6 4 1 5 6 NA ...
##  $ Recommend                 : int  7 5 3 6 6 4 1 5 6 NA ...
##  $ RankPromo1                : int  1 1 1 1 4 4 1 6 4 NA ...
##  $ RankPromo2                : int  5 4 4 4 2 1 3 3 5 NA ...
##  $ RankPromo3                : int  4 5 6 5 1 2 4 2 1 NA ...
##  $ RankPromo4                : int  3 6 5 NA 5 3 5 5 3 NA ...
##  $ RankPromo5                : int  2 3 3 2 3 6 NA 1 2 NA ...
##  $ RankPromo6                : int  6 2 2 3 6 5 6 4 6 NA ...
##  $ Age                       : int  3 2 3 6 3 1 3 3 5 NA ...
##  $ Income                    : int  6 4 1 7 7 1 7 3 7 NA ...
##  $ Education                 : int  2 4 4 5 4 2 4 5 5 NA ...
##  $ Education_Others          : chr  " " " " " " " " ...
##  $ Occupation                : int  3 7 7 2 2 7 3 3 3 NA ...
##  $ Occupation_Others         : chr  " " " " " " " " ...
head(pcmall)
##   ID BuyFreq UserType Web_Online Web_Phone Catalog_Phone Catalog_Online Catalog
## 1  1    11 +   PCMall          1         0             0              1       0
## 2  2  2 to 4   PCMall          1         0             0              0       1
## 3  3 5 to 10   PCMall          1         0             0              0       0
## 4  4    11 +   PCMall          1         1             0              1       1
## 5  5 5 to 10   PCMall          1         0             0              0       1
## 6  6 5 to 10   PCMall          1         0             0              0       0
##   X3rdWeb WOM SearchEng ChatRoom BannerAd Other Influence_ExplainOthers
## 1       1   0         1        0        0     0                        
## 2       0   0         0        0        0     0                        
## 3       1   0         1        0        0     0                        
## 4       0   0         1        0        0     0                        
## 5       0   0         0        0        0     0                        
## 6       0   0         1        0        0     0                        
##   SatCatFreq PrefCatFreq SupService_Item1 SupService_Item2 SupService_Item3
## 1          4     Monthly                7                7                7
## 2          6        None                6                7                7
## 3          5     Monthly                1                4                4
## 4          6      Weekly                7                7                7
## 5          4   Quarterly                7                7                7
## 6          8        None                4                4                4
##   SupService_Item4 PreferredMethod PreferredMethod_Others ProdInfo_Item1
## 1                7               1                                     7
## 2                7               1                                     4
## 3                1               1                                     6
## 4                7               1                                     6
## 5                7               1                                     7
## 6                4               1                                     4
##   ProdInfo_Item2 ProdInfo_Item3 ProdInfo_Item4 ProdInfo_Item5 ProdInfo_Item6
## 1              6              7              6              7              7
## 2              4              6              4              6              6
## 3              6              6              6              3              3
## 4              6              7             NA              7              5
## 5              7              7              7              7              7
## 6              4              4              4              4              4
##   Pricing_Item1 Pricing_Item2 Pricing_Item3 Pricing_Item4 Pricing_Item5
## 1             7             6             7             4             7
## 2             6             6             6             4             4
## 3             5             4             4             3             4
## 4             6             6             6            NA            NA
## 5             7             7             7             7             7
## 6             4             4             4             4             4
##   PriceExp1 PriceExp2 PriceExp3 PriceExp4 PriceExp5 PriceExp6 PriceExp7
## 1         2         2         2         2         2         2         2
## 2         2         2         2         2         2         2         2
## 3         2         2         2         2         1         2         2
## 4         2         1         2         1         2         2         2
## 5         2         2         2         2         2         2         2
## 6         2         2         2         2         2         2         2
##   PriceExp8 PriceExp9 PriceExp_ExplainOthers SalesSer_Item1 SalesSer_Item2
## 1         2         2                                    NA             NA
## 2         2         2                                     4              4
## 3         2         2                                     2              2
## 4         2         2                                    NA              7
## 5         2         1                    n/a              4              4
## 6         2         2                                     4              4
##   SalesSer_Item3 SalesSer_Item4 SalesSer_Item5 SalesSer_Item6 SalesSer_Item7
## 1             NA             NA             NA             NA             NA
## 2              4              4              4              4              4
## 3              2              4              2              4              4
## 4              7             NA             NA             NA             NA
## 5              4              4              4              4              4
## 6              4              4              4              4              4
##   SalesSer_Item8 ReturnExperience ExchangeExperience Product_Item1
## 1             NA                                                 7
## 2              4                                                 6
## 3              4                                                 6
## 4             NA                                                 7
## 5              4              N/a                N/a             7
## 6              4                                                 4
##   Product_Item2 Product_Item3 Product_Item4 ReasonNotSat1 ReasonNotSat2
## 1             7             7             7             2             2
## 2             6             6             5             2             2
## 3             6             5             5             2             1
## 4             6             6             6             2             2
## 5             7             7             7             2             2
## 6             4             4             4             2             2
##   ReasonNotSat3 ReasonNotSat4 ReasonNotSat_ExplainOthers InternetConnection
## 1             2             2                                             3
## 2             2             2                                             3
## 3             2             2                                             3
## 4             2             2                                             4
## 5             2             1                        n/a                  2
## 6             2             2                                             2
##   InternetConnection_Others WebConPC_Item1 WebConPC_Item2 WebConPC_Item3
## 1                                        7              7              7
## 2                                        6              6              6
## 3                                        6              6              6
## 4                                        6              6              7
## 5                                        7              5              6
## 6                                        4              4              4
##   WebConPC_Item4 WebConPC_Item5 WebConPC_Item6 WebConPC_Item7 WebConMac_Item1
## 1              6              6              6              6              NA
## 2              6              5              4              6              NA
## 3              3              6              3              6               5
## 4              7              6              7              7              NA
## 5              5              5              4              5              NA
## 6              4              4              4              4               4
##   WebConMac_Item2 WebConMac_Item3 WebConMac_Item4 WebConMac_Item5
## 1              NA              NA              NA              NA
## 2              NA              NA              NA              NA
## 3               6               6               2               6
## 4              NA              NA              NA              NA
## 5              NA              NA              NA              NA
## 6               4               4               4               4
##   WebConMac_Item6 WebConMac_Item7 OverallSat1 OverallSat2 Repurchase Recommend
## 1              NA              NA          NA           6          7         7
## 2              NA              NA           6           6          6         5
## 3               3               6           2           2          3         3
## 4              NA              NA           6           6          6         6
## 5              NA              NA           6           5          6         6
## 6               4               4           4           4          4         4
##   RankPromo1 RankPromo2 RankPromo3 RankPromo4 RankPromo5 RankPromo6 Age Income
## 1          1          5          4          3          2          6   3      6
## 2          1          4          5          6          3          2   2      4
## 3          1          4          6          5          3          2   3      1
## 4          1          4          5         NA          2          3   6      7
## 5          4          2          1          5          3          6   3      7
## 6          4          1          2          3          6          5   1      1
##   Education Education_Others Occupation Occupation_Others
## 1         2                           3                  
## 2         4                           7                  
## 3         4                           7                  
## 4         5                           2                  
## 5         4                           2                  
## 6         2                           7

Question 1: Summary Statistics and Visualizations

-how many products customers have purchased from PCMall in the past year (Q1.1), from which businesses (Q1.2), and through which methods they have made these purchases (Q1.3); -what influenced them to make these purchases (Q1.4); and -how customers feel about the current frequency of catalog distribution, as well as their preferred frequency (Q1.5 and 1.6).

# Frequency tables (basic R)
cat("Q1.1 - Number of products purchased in past year:\n")
## Q1.1 - Number of products purchased in past year:
table(pcmall$BuyFreq)
## 
##       0       1    11 +  2 to 4 5 to 10 
##      48     213     869    1356    1258
cat("Q1.2 - Businesses purchased from in last two years:\n")
## Q1.2 - Businesses purchased from in last two years:
table(pcmall$UserType)
## 
##    Both MacMall  PCMall 
##     723    2377     644
cat("Q1.3 - Purchase methods used:\n")
## Q1.3 - Purchase methods used:
cat("Web_Online:\n"); table(pcmall$Web_Online)
## Web_Online:
## 
##    0    1 
##  756 2906
cat("Web_Phone:\n"); table(pcmall$Web_Phone)
## Web_Phone:
## 
##    0    1 
## 2716  946
cat("Catalog_Phone:\n"); table(pcmall$Catalog_Phone)
## Catalog_Phone:
## 
##    0    1 
## 2986  676
cat("Catalog_Online:\n"); table(pcmall$Catalog_Online)
## Catalog_Online:
## 
##    0    1 
## 2745  917
cat("Q1.4 - Influenced by catalog:\n")
## Q1.4 - Influenced by catalog:
table(pcmall$Catalog)
## 
##    0    1 
## 1394 2219
cat("Q1.5 - Satisfaction with current catalog frequency:\n")
## Q1.5 - Satisfaction with current catalog frequency:
table(pcmall$SatCatFreq)
## 
##    1    2    3    4    5    6    7    8 
##   33   27   86 1620  599  598  469  141
cat("Q1.6 - Preferred catalog frequency:\n")
## Q1.6 - Preferred catalog frequency:
table(pcmall$PrefCatFreq)
## 
##                    Annually       Monthly          None     Quarterly 
##           174            18          1759           268          1184 
## Semi_Annually        Weekly 
##           140           201

Pie Chart for Purchase Quantities (Q1.1)

PCBuyFreq <- c(1.28, 5.69, 36.22, 33.6, 23.21)
LabBuyFreq <- c("0", "1", "2 to 4", "5 to 10", "+11")
pie(PCBuyFreq, col=1:5, main='Purchase Quantities', labels=paste(PCBuyFreq, "%", sep=" "))
legend("topright", LabBuyFreq, fill=1:5)

Bar Chart for Purchase Methods (Q1.3)

PurMeth <- c(79.36,25.83,18.46,25.04)
names(PurMeth) <- c("Web_Online","Web_phone","Catalog_Phone","Catalog_Online")
bar <- barplot(PurMeth, col=2:5, ylim=c(0,max(PurMeth)+5), main='Purchase Methods')
text(bar, PurMeth + 2.5 , paste(round(PurMeth),"%",sep=""))

Interpretation:

Q1.1 – Number of Products Purchased in the Past Year: Most customers have purchased between 2 to 10 products in the past year. Specifically, 36.22% purchased 2–4 items, 33.6% purchased 5–10, and 23.21% purchased 11 or more. Only a small portion (1.28%) reported making no purchases. This indicates an overall active customer base with strong purchasing behavior.

Q1.2 – Businesses Purchased From: The majority of respondents (63.5%) are MacMall users, followed by 19.3% who purchased from both PCMall and MacMall, and 17.2% who purchased from PCMall only. This suggests MacMall has a broader reach or more loyal customer base than PCMall alone.

Q1.3 – Purchase Methods: The most common purchase method is through the website (Web_Online) at 79%. Phone orders via web or catalog were used by about 26% and 18%, respectively, while 25% used catalog-based online orders. This confirms that while web ordering dominates, catalogs and phone support still play a notable supporting role.