Report on diamond prices

Test the hypothesis that the average price of diamonds in the available data is larger than $4500 after filtering out the cheapest diamonds (< $1000)

Single mean test
Data     : diamonds 
Filter   : price > 1000 
Variable : price 
Null hyp.: the mean of price = 4500 
Alt. hyp.: the mean of price is > 4500 

     mean t.value p.value   df     2.5% 97.5%       sd    n
 5104.718   7.016  < .001 2183 4962.883   Inf 4028.095 2184

plot of chunk unnamed-chunk-1

Compare diamond prices by the quality of the 'cut'. It seems that diamonds with an ideal cut cost less than than diamonds with a premium cut. Seems strange. Perhaps we should use regression to control for the carats of the diamond. Try it!

Pairwise comparisons (no adjustment)
Data     : diamonds 
Filter   : price > 1000 
Variables: cut, price 
Samples  : independent 

               mean   n       sd      se      ci
      Fair 4701.771  96 3742.952 382.013 758.393
      Good 5141.244 213 3663.915 251.047 494.869
 Very Good 5206.187 492 3897.686 175.721 345.258
   Premium 5469.652 592 4261.311 175.139 343.970
     Ideal 4807.550 791 4038.235 143.583 281.850

 Alt. hyp.                        Null hyp.             diff     p.value
 Fair not equal to Good           Fair = Good           -439.473 0.338  
 Fair not equal to Very Good      Fair = Very Good      -504.416 0.232  
 Fair not equal to Premium        Fair = Premium        -767.881 0.07   
 Fair not equal to Ideal          Fair = Ideal          -105.779 0.796  
 Good not equal to Very Good      Good = Very Good       -64.943 0.832  
 Good not equal to Premium        Good = Premium        -328.408 0.284  
 Good not equal to Ideal          Good = Ideal           333.694 0.249  
 Very Good not equal to Premium   Very Good = Premium   -263.465 0.288  
 Very Good not equal to Ideal     Very Good = Ideal      398.637 0.079  
 Premium not equal to Ideal       Premium = Ideal        662.102 0.004  



 . 





 . 
 **

Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

plot of chunk unnamed-chunk-2

Visualize the relationship between diamond prices, carats, and the cut of the diamond.

plot of chunk unnamed-chunk-3