Introduction

Dataset: Women’s E-Commerce Clothing Reviews

Source: Kaggle

Research Question:

What factors most influence customer ratings and recommendations for women’s clothing products?

Load Dataset

The dataset was loaded into R using the following code.

clothing <- read.csv("/Users/macuser/Desktop/Advanced Data Analytics/Womens Clothing E-Commerce Reviews.csv")

head(clothing)
##   X Clothing.ID Age                   Title
## 1 0         767  33                        
## 2 1        1080  34                        
## 3 2        1077  60 Some major design flaws
## 4 3        1049  50        My favorite buy!
## 5 4         847  47        Flattering shirt
## 6 5        1080  49 Not for the very petite
##                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Review.Text
## 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                Absolutely wonderful - silky and sexy and comfortable
## 2                                                                                                                                                                                                      Love this dress!  it's sooo pretty.  i happened to find it in a store, and i'm glad i did bc i never would have ordered it online bc it's petite.  i bought a petite and am 5'8".  i love the length on me- hits just a little below the knee.  would definitely be a true midi on someone who is truly petite.
## 3 I had such high hopes for this dress and really wanted it to work for me. i initially ordered the petite small (my usual size) but i found this to be outrageously small. so small in fact that i could not zip it up! i reordered it in petite medium, which was just ok. overall, the top half was comfortable and fit nicely, but the bottom half had a very tight under layer and several somewhat cheap (net) over layers. imo, a major design flaw was the net over layer sewn directly into the zipper - it c
## 4                                                                                                                                                                                                                                                                                                                                                                                         I love, love, love this jumpsuit. it's fun, flirty, and fabulous! every time i wear it, i get nothing but great compliments!
## 5                                                                                                                                                                                                                                                                                                                     This shirt is very flattering to all due to the adjustable front tie. it is the perfect length to wear with leggings and it is sleeveless so it pairs well with any cardigan. love this shirt!!!
## 6             I love tracy reese dresses, but this one is not for the very petite. i am just under 5 feet tall and usually wear a 0p in this brand. this dress was very pretty out of the package but its a lot of dress. the skirt is long and very full so it overwhelmed my small frame. not a stranger to alterations, shortening and narrowing the skirt would take away from the embellishment of the garment. i love the color and the idea of the style but it just did not work on me. i returned this dress.
##   Rating Recommended.IND Positive.Feedback.Count  Division.Name Department.Name
## 1      4               1                       0      Initmates        Intimate
## 2      5               1                       4        General         Dresses
## 3      3               0                       0        General         Dresses
## 4      5               1                       0 General Petite         Bottoms
## 5      5               1                       6        General            Tops
## 6      2               0                       4        General         Dresses
##   Class.Name
## 1  Intimates
## 2    Dresses
## 3    Dresses
## 4      Pants
## 5    Blouses
## 6    Dresses

Question 1: Graphical Visualization

To examine the relationship between customer age and product ratings, I created a scatter plot.

plot(clothing$Age,
     clothing$Rating,
     main = "Customer Age vs Product Rating",
     xlab = "Customer Age",
     ylab = "Product Rating",
     col = "blue",
     pch = 19)

Explanation:

This scatter plot shows the relationship between customer age and product ratings. Each point represents a customer review. The graph helps visualize whether customer age appears to influence product ratings.

Question 2: Descriptive Statistics

To summarize the ratings, I calculated the mean, median, and standard deviation.

mean(clothing$Rating)
## [1] 4.196032
median(clothing$Rating)
## [1] 5
sd(clothing$Rating)
## [1] 1.110031

Explanation:

The mean rating represents the average customer rating. The median represents the middle rating value. The standard deviation measures how much ratings vary from the average rating.

Question 3: Correlation and Regression Analysis

First, I measured the relationship between customer age and rating using correlation analysis.

cor.test(clothing$Age,
         clothing$Rating)
## 
##  Pearson's product-moment correlation
## 
## data:  clothing$Age and clothing$Rating
## t = 4.1131, df = 23484, p-value = 3.917e-05
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.01404607 0.03960631
## sample estimates:
##        cor 
## 0.02683057

Next, I applied a linear regression model.

model1 <- lm(Rating ~ Age,
             data = clothing)

summary(model1)
## 
## Call:
## lm(formula = Rating ~ Age, data = clothing)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.3192 -0.2319  0.7608  0.8117  0.8651 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 4.0912581  0.0264821 154.492  < 2e-16 ***
## Age         0.0024254  0.0005897   4.113 3.92e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.11 on 23484 degrees of freedom
## Multiple R-squared:  0.0007199,  Adjusted R-squared:  0.0006773 
## F-statistic: 16.92 on 1 and 23484 DF,  p-value: 3.917e-05

Finally, I created a scatter plot with a regression line.

plot(clothing$Age,
     clothing$Rating,
     main = "Age and Rating Relationship",
     xlab = "Age",
     ylab = "Rating",
     col = "blue",
     pch = 19)

abline(model1,
       col = "red",
       lwd = 2)

Explanation:

The correlation coefficient measures the strength of the relationship between Age and Rating. The regression analysis determines whether Age significantly predicts customer ratings. The red regression line shows the overall relationship between the variables.

Question 4: Histogram

To examine the distribution of ratings, I created a histogram.

hist(clothing$Rating,
     main = "Distribution of Customer Ratings",
     xlab = "Rating",
     col = "lightblue",
     border = "black")

Explanation:

The histogram shows the distribution of customer ratings. This helps determine whether ratings are normally distributed or concentrated around certain values.

Question 5: T-Test

To determine whether ratings differ between customers who recommended a product and those who did not, I divided the dataset into two groups and performed a t-test.

recommended <- subset(clothing,
                      Recommended.IND == 1)

not_recommended <- subset(clothing,
                          Recommended.IND == 0)

t.test(recommended$Rating,
       not_recommended$Rating)
## 
##  Welch Two Sample t-test
## 
## data:  recommended$Rating and not_recommended$Rating
## t = 165.07, df = 5213.3, p-value < 2.2e-16
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  2.273774 2.328433
## sample estimates:
## mean of x mean of y 
##  4.604794  2.303691

Explanation:

The t-test compares the average ratings of customers who recommended a product versus customers who did not recommend a product. A p-value less than 0.05 indicates a statistically significant difference between the groups.

Conclusion

This analysis examined customer ratings and recommendations using the Women’s E-Commerce Clothing Reviews dataset. Graphical analysis, descriptive statistics, correlation analysis, linear regression, histograms, and a t-test were used to better understand customer behavior and product satisfaction. The results provide insight into factors that may influence ratings and recommendations within women’s clothing products.