ucla_textbooks_f18 | R Documentation |
A sample of courses were collected from UCLA from Fall 2018, and the corresponding textbook prices were collected from the UCLA bookstore and also from Amazon.
ucla_textbooks_f18
A data frame with 201 observations on the following 20 variables.
Year the course was offered
Term the course was offered
Subject
Subject abbreviation, if any
Course name
Course number, complete
Course number, numeric only
Boolean for if this is a seminar course.
Boolean for if this is some form of independent study
Boolean for if this is an apprenticeship
Boolean for if this is an internship
Boolean for if this is an honors contracts course
Boolean for if this is a lab
Boolean for if this is any of the special types of courses listed
Textbook ISBN
New price at the UCLA bookstore
Used price at the UCLA bookstore
New price sold by Amazon
Used price sold by Amazon
Any relevant notes
A past dataset was collected from UCLA courses in Spring 2010, and Amazon at that time was found to be almost uniformly lower than those of the UCLA bookstore's. Now in 2018, the UCLA bookstore is about even with Amazon on the vast majority of titles, and there is no statistical difference in the sample data.
The most expensive book required for the course was generally used.
The reason why we advocate for using raw amount differences instead of percent differences is that a 20\ to a 20\ price difference on low-priced books would balance numerically (but not in a practical sense) a moderate but important price difference on more expensive books. So while this tends to result in a bit less sensitivity in detecting some effect, we believe the absolute difference compares prices in a more meaningful way.
Used prices contain the shipping cost but do not contain tax. The used prices are a more nuanced comparison, since these are all 3rd party sellers. Amazon is often more a marketplace than a retail site at this point, and many people buy from 3rd party sellers on Amazon now without realizing it. The relationship Amazon has with 3rd party sellers is also challenging. Given the frequently changing dynamics in this space, we don't think any analysis here will be very reliable for long term insights since products from these sellers changes frequently in quantity and price. For this reason, we focus only on new books sold directly by Amazon in our comparison. In a future round of data collection, it may be interesting to explore whether the dynamics have changed in the used market.
https://sa.ucla.edu/ro/public/soc
textbooks
, ucla_f18
library(ggplot2)
library(dplyr)
ggplot(ucla_textbooks_f18, aes(x = bookstore_new, y = amazon_new)) +
geom_point() +
geom_abline(slope = 1, intercept = 0, color = "orange") +
labs(
x = "UCLA Bookstore price", y = "Amazon price",
title = "Amazon vs. UCLA Bookstore prices of new textbooks",
subtitle = "Orange line represents y = x"
)
# The following outliers were double checked for accuracy
ucla_textbooks_f18_with_diff <- ucla_textbooks_f18 |>
mutate(diff = bookstore_new - amazon_new)
ucla_textbooks_f18_with_diff |>
filter(diff > 20 | diff < -20)
# Distribution of price differences
ggplot(ucla_textbooks_f18_with_diff, aes(x = diff)) +
geom_histogram(binwidth = 5)
# t-test of price differences
t.test(ucla_textbooks_f18_with_diff$diff)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.