Diamond Dataset Output
Diamond Dataset Output
01/11/2019
Question 1
##
## Attaching package: zoo
1
## Median :57.00 Median : 5.700 Median : 5.720 Median : 3.53
## Mean :57.46 Mean : 5.732 Mean : 5.734 Mean : 3.54
## 3rd Qu.:59.00 3rd Qu.: 6.540 3rd Qu.: 6.530 3rd Qu.: 4.03
## Max. :95.00 Max. :10.230 Max. :31.800 Max. :31.80
##
## depth price
## Min. : 0.00 Min. : 326
## 1st Qu.: 61.03 1st Qu.: 954
## Median : 61.84 Median : 2426
## Mean : 61.77 Mean : 3939
## 3rd Qu.: 62.54 3rd Qu.: 5315
## Max. :619.28 Max. :18823
##
Question 2
2
Cut − Pie Chart
Ideal
Good
Fair
Very Good
Premium
Very Geod
3
Color − Bar Chart
10000
Frequency
6000
2000
0
D E F G H I J
Colors
4
Histogram − Depth
50000
30000
Frequency
10000
0
Depths
5
Scatterplot − Carats vs Depth
500
Depth
300
100
0
0 10 20 30 40 50
Carats
## Question 3 ### Part A Histogram of price along with the summary Statistics
6
Histogram of Price
12000
8000
Distribution
4000
0
Price
The Histogram indicates that the distribution is positively skewed, and concentrated to the left. It also
indicates that the price is not a normal distribtion, and the higest number of units lie in the distribution
that is less than 5000 price. The summary statistics indicate that mean is 3938.64, and the media is 2401.
Moreover the standard deviation is 3994.8.
Part B
7
# Summary statistics for low, medium and high
summary(low)
summary(med)
8
##
summary(high)
Part C
9
Price distribution of cuts
15000
10000
Prices
5000
0
Cuts
Part D
10
Question 4
##
## Attaching package: ggplot2
11
50
40
cut
30 Fair
Good
carat
Ideal
20 Premium
Very Good
10
12
50
40
clarity
I1
IF
30
SI1
carat
SI2
VS1
20
VS2
VVS1
VVS2
10
13
40000
30000
price
20000
10000
Part B
14
50
40
30
carat
20
10
Part C
15
75
table
50
25
## x y z volume price
## x 1.00000000 0.98714681 0.9629605 0.97326375 0.8801776
## y 0.98714681 1.00000000 0.9570021 0.97176259 0.8756857
## z 0.96296045 0.95700213 1.0000000 0.96191265 0.8541778
## volume 0.97326375 0.97176259 0.9619127 1.00000000 0.9162446
## price 0.88017761 0.87568573 0.8541778 0.91624455 1.0000000
## carat 0.22301129 0.22141809 0.2147432 0.22671334 0.2132887
## table 0.19389482 0.18654068 0.1495847 0.17033926 0.1270487
## depth -0.03823714 -0.05000733 0.2204312 0.03456058 -0.0207707
## carat table depth
## x 0.223011294 0.1938948 -0.038237138
## y 0.221418092 0.1865407 -0.050007328
## z 0.214743207 0.1495847 0.220431188
## volume 0.226713342 0.1703393 0.034560579
## price 0.213288669 0.1270487 -0.020770698
## carat 1.000000000 0.0397613 -0.009724909
## table 0.039761303 1.0000000 -0.132510964
## depth -0.009724909 -0.1325110 1.000000000
16
90
80
table
70
60
50
17
90
80
table
70
60
50
18
90
80
table
70
60
50
0 10 20 30 40 50
carat
19