Module 3. Assignment

> set1 <- c( 10, 2, 3, 2, 4, 2, 5)
> set2 <- c(20, 12, 13, 12, 14, 12, 15)
> mean(set1)
[1] 4
> mean(set2)
[1] 14
> median(set1)
[1] 3
> median(set2)
[1] 13
> getmode(set1)  
[1] 2
> getmode(set2)
[1] 12
> range(set1)
[1]  2 10
> range(set2)
[1] 12 20
> var(set1)
[1] 8.333333
> var(set2)
[1] 8.333333
> sd(set1)
[1] 2.886751
> sd(set2)
[1] 2.886751
> quantile(set1)
  0%  25%  50%  75% 100% 
 2.0  2.0  3.0  4.5 10.0 
> quantile(set2)
  0%  25%  50%  75% 100% 
12.0 12.0 13.0 14.5 20.0 
> summary(set1)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
    2.0     2.0     3.0     4.0     4.5    10.0 
> summary(set2)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
   12.0    12.0    13.0    14.0    14.5    20.0 



Set#2's values are much larger than Set#1's. 
Set#1 has a lower mean, median, and mode. Both sets,
however, share the same range, meaning they have the same spread or difference 
between the maximum and minimum values. Additionally, both sets have the same
variance and standard deviation, showing that their data points are more spread
out around their means. As for quartiles, Set#2 has a higher minimum, median, 
and maximum value than Set#1. 








Comments