2024-04-15

Data Set Background:

The “Amazon Kindle Books” 2023 data set was created by Kaggle user Asaniczka.The set is composed of data collected about 130,000 Amazon Kindle Books. Columns include: Title, Author, Publisher, Stars, No. of Reviews, Book Price, Accolades, Publish Date, and Genre.

Asaniczka. (2023). Amazon Kindle Books Dataset 2023 (130k Books). Kaggle. https://www.kaggle.com/datasets/asaniczka/amazon-kindle-books-dataset-2023-130k-books.

kindleBooks_dataset <- read.csv("C:/Users/seren/OneDrive/Desktop/Coding/Project 1/kindle_data-v2.csv")

Problem Definition:

This project will explore the relationship between book price and star ratings, while identifying Kindles most profitable/popular publishers and genres. The purpose of this exploration is to recommend a plan of action that will assist Kindle in growing profit.

Relationship Between Stars & Price : Raw

Relationship Between Stars & Price : Cleaned (Non-Textbook)

Prices and ratings equal to zero were removed. Genres which appeared to be textbooks were also removed.

Code: Relationship Between Stars & Price

filtered_dataset <- kindleBooks_dataset[kindleBooks_dataset$price != 0 & 
                                        kindleBooks_dataset$stars > 0 &
                                        !kindleBooks_dataset$category_name %in% 
c("Science & Math", "Law", "Medical", "Engineering & Transportation",
  "Computers & Technology","Reference","Business & Money","Politics & Social Sciences",
  "Education & Teaching", "History","Foreign Language"),]
g_price <- ggplot(filtered_dataset, aes(x=stars, y=price, color=category_name))+
geom_point()+
  geom_smooth(method="lm", color="black",se=F,show.legend = T)+
  labs(x="Star Rating)", y="Price (USD)", title="Price in Relation to Stars")+
  theme(plot.title = element_text(hjust=0.5, face = "bold"))+
  scale_y_continuous(breaks = seq(5,150, by=20 ))+
  scale_x_continuous(breaks = seq(1,5, by= .5))
ggplotly(g_price)

Linear Regression: Price VS Stars

price_starLM <- lm(price~stars,filtered_dataset)

Call: lm(formula = price ~ stars, data = filtered_dataset)

Residuals: Min 1Q Median 3Q Max -10.22 -4.65 -0.93 2.51 415.83

Coefficients: Estimate Std. Error t value Pr(>|t|)
(Intercept) -3.2281 0.5105 -6.323 2.57e-10 stars 2.8883 0.1127 25.621 < 2e-16 — Signif. codes: 0 ‘’ 0.001 ’’ 0.01 ’’ 0.05 ‘.’ 0.1 ’ ’ 1

Residual standard error: 8.165 on 80982 degrees of freedom Multiple R-squared: 0.008041, Adjusted R-squared: 0.008029 F-statistic: 656.4 on 1 and 80982 DF, p-value: < 2.2e-16

Linear Regression: Explained

  • The model’s slope, indicates a $2.8883 rise in price for each unit increase in star rating.
  • The small p-value, <2e-16, provides insight into the likelihood into the of the statement above.
  • The coefficient of determination depicts that only .8% of price is effected by stars

It’s highly likely that stars effect price, but because it only accounts for a small percentage of change in price. We will evaluate more variables to provide Amazon Kindle with a well-rounded understanding on how to improve sales.

Publishers vs. Prices

Publishers with high books prices seem to also have the most variability in prices which allows for accessibility and potentially higher brand awareness with consumers from all economic statuses. Data points are also concentrated around these publishers

Code: Publishers vs. Prices

PublisherProfit_df <- select(filtered_dataset,price,soldBy,stars)

fill_colors <- ifelse(PublisherProfit_df$soldBy == "Amazon.com Services LLC" |
PublisherProfit_df$soldBy == "HarperCollins Publishers" | 
PublisherProfit_df$soldBy =="JOHN WILEY AND SONS INC" |
PublisherProfit_df$soldBy =="Macmillan" | 
PublisherProfit_df$soldBy =="W. W. Norton & Company", "lightgreen","black")

g_publisher <- ggplot(PublisherProfit_df, aes(x=soldBy, y=price, color=fill_colors))+
geom_point()+
  labs(y="Price (USD)", x="Publisher", title="Price in Relation to Publisher")+
  theme(plot.title = element_text(hjust=0.5, face = "bold"))+
  scale_y_continuous(breaks = seq(10,250, by=20 ))+
  theme(axis.text.x = element_text(angle = 50, hjust =3))+
  guides(color=FALSE)
ggplotly(g_publisher)

Publishers vs. Stars

Although these publishers seem to control more of the data set and have a high variability in prices, they also on average (which will be seen in the next slide) have lower star ratings.

##   mean(stars, na.rm = T) mean(price, na.rm = T)
## 1                4.52137               9.830842
##   mean(stars, na.rm = T) mean(price, na.rm = T)
## 1               4.537204               36.40301
##   mean(stars, na.rm = T) mean(price, na.rm = T)
## 1               4.474884               12.93274
##   mean(stars, na.rm = T) mean(price, na.rm = T)
## 1               4.513408               8.372451
##   mean(stars, na.rm = T) mean(price, na.rm = T)
## 1               4.472662               12.04293
##   mean(stars, na.rm = T) mean(price, na.rm = T)
## 1               4.311765               45.08794

Star/Price Comparison (Publisher)

Only just slightly below the average star rating, price is significantly higher. Also, recall the amount of data points consumed by these publishers. If consumers are loyal to these brands, more on hand may result in an increased bottom line.

##   Avg. Stars Avg. Price      Publisher
## 1   4.521370   9.830842  Full Data Set
## 2   4.537204  36.403009     John Wiley
## 3   4.474884  12.932738 Harper Collins
## 4   4.472662  12.042930      MacMillan
## 5   4.311765  45.087941   W. W. Norton

Code: Star/Price Comparison (Publisher)

starPrice_compare <- bind_rows(Full_Dataset_Stats,JohnWiley,HarperCollins,Macmillan,W.W.Norton)

colnames(starPrice_compare) <- c("Avg. Stars","Avg. Price")
starPrice_compare <- starPrice_compare %>%
  mutate(Publisher = c("Full Data Set", "John Wiley", "Harper Collins", "MacMillan", "W. W. Norton"))

print(starPrice_compare)

Code: Averages (Publisher)

Full_Dataset_Stats <- filtered_dataset %>%
  select(price,stars)%>%
  summarize(mean(stars, na.rm=T),
            mean(price, na.rm=T))
print(Full_Dataset_Stats)

JohnWiley <- filtered_dataset %>%
  filter(soldBy == "JOHN WILEY AND SONS INC")%>%
  summarize(mean(stars, na.rm=T),
            mean(price, na.rm=T))
print(JohnWiley)

HarperCollins <- filtered_dataset %>%
  filter(soldBy == "HarperCollins Publishers")%>%
  summarize(mean(stars, na.rm=T),
            mean(price, na.rm=T))
print(HarperCollins)

AmazonServices <- filtered_dataset %>%
  filter(soldBy == "Amazon.com Services LLC")%>%
  summarize(mean(stars, na.rm=T),
            mean(price, na.rm=T))
print(AmazonServices)

Macmillan <- filtered_dataset %>%
  filter(soldBy == "Macmillan")%>%
  summarize(mean(stars, na.rm=T),
            mean(price, na.rm=T))
print(Macmillan)

W.W.Norton <- filtered_dataset %>%
  filter(soldBy == "W. W. Norton & Company")%>%
  summarize(mean(stars, na.rm=T),
            mean(price, na.rm=T))
print(W.W.Norton)

Price vs. Genre

Star/Price Comparison (Genre)

Typically higher price and rating than average.

##   Avg. Stars Avg. Price                                          Genre
## 1   4.521370   9.830842                                   Full Dataset
## 2   4.528712  15.292521                             Arts & Photography
## 3   4.662716   9.914779                              Children'S eBooks
## 4   4.545161  11.758858                          Crafts,Hobbies & Home
## 5   4.574819  18.548757 Health, \n                   Fitness & Dieting
## 6   4.546586  10.510483                      Parenting & Relationships
## 7   4.659529   9.776835                        Religion & Spirituality
## 8   4.514053  11.995426                              Sports & Outdoors

Summary

According to the initial linear model, higher priced books often had higher star ratings. In the last slide, we saw that this was evident in many of the genres which had book prices far above average and ratings around or above average. Also, publishers that contained the most data points (most popular/purchased) and the highest prices usually had star ratings lower than average.

Outliers: Children’s eBooks , Religion & Spirituality Books

Most Profitable/Popular Genres: Arts & Photography, Children’s eBooks, Health & Fitness, Parenting & Relationships, Religion & Spirituality, and Sports & Outdoors. Most Profitable/Popular Publishers: John Wiley, Amazon Services, Macmillan, W.W. Norton, and Harper Collins

Recommendation

To grow profits Amazon Kindle could focus on bringing in more books from popular genres specifically from the most popular publishers. Also, they might consider raising the price of Children’s eBooks and Religion and Spirituality books to match the prices of the other most popular genres. While these tactics enhance what is already profitable, they may also consider taking their least profitable genre and purchasing it from one of their most popular publisher, by doing this consumers who are loyal to that publisher may be more willing to support the genre.