1. LON-CAPA Logo
  2. Help
  3. Log In
 

Browsing resource, all submissions are temporary.


Diamonds

A diamond is often thought of as a cherished item with a personal value well in excess of its monetary value. The monetary value of a diamond is determined by its quality as defined by the 4 Cs: cut, color, clarity, and carat weight. The price (dollars) and the carat weight of a diamond are its two most known characteristics. In order to understand the role carat weight has in determining the price of a diamond, the carat weight and price of 20 loose round diamonds, all having the same color and clarity, were obtained on the internet on January 7, 2010. A csv file of the data can be downloaded here and then loaded to R using the command

diamonds <- read.csv("diamonds.csv")

The data has two columns. The first column is the carat weight and the second column is the price in dollar. This is again a very small data set and you should be able to view the entire data on your screen by just typing diamonds. Make a scatter plot of price versus carat weight. Notice the nonlinear relationship between the price and carat weight.

a. Let's first fit a linear model predicting the price from the carat weight, even though we know it's not going to be very good. Enter the intercept, slope and residual standard error to 4 significant figures.

Price = + (carat weight)

Residual standard error =

 Tries [_1]

b. From the scatter plot of price versus carat weight, it seems that the data can be better fit by a quadratic function: price = β0 + β1 (carat weight) + β2 (carat weight)2. Even though this is a quadratic function in (carat weight), we can still use the lm() function to fit this model because it is still linear in β0, β1, and β2. Enter the coefficients and residual standard error to 4 significant figures. [Note: you will need to use the I() function in the fitting formula, unless you want to create another vector to store (carat weight)2.]

Price = + ( ) (carat weight) + (carat weight)2

Residual standard error =

 Tries [_1]

c. Add the fitted lines of the models in (a) and (b) to the scatter plot of price versus carat weight. From the plot, which model is a better fit to the data?



 Tries [_1]

d. Use the model in (b) to predict the prices of three diamonds with carat weights 0.3, 0.59, 0.77 (and having the same characteristics as the 20 diamonds in the sample in cut, color and clarity). Give your answers to 3 significant figures.

Carat Weight Predicted Price (dollars)
0.3
0.59
0.77
 Tries [_1]