Module 2 Advanced Statistics

Advanced Statistics- First Assignment 

 

Here is the results I got for the first assignment.

1)

 

> set1<- c(10,2,3,2,4,2,5)

> set2<- c(20,12,13,12,14,12,15)

> mean(set1)

[1] 4

> median(set1)

[1] 3

> mode(set1)

[1] “numeric”

> mode(set1)

[1] “numeric”

> mode(set2)

[1] “numeric”

> mean(set2)

[1] 14

> median(set2)

[1] 13

> mode(set2)

[1] “numeric”

 

2)

 

> range(set1)

[1]  2 10

> summary(set1)

Min. 1st Qu.  Median    Mean 3rd Qu.    Max.

2.0     2.0     3.0     4.0     4.5    10.0

> var(set1)

[1] 8.333333

> sd(set1)

[1] 2.886751

> range(set2)

[1] 12 20

> summary(set2)

Min. 1st Qu.  Median    Mean 3rd Qu.    Max.

12.0    12.0    13.0    14.0    14.5    20.0

> var(set2)

[1] 8.333333

> sd(set2)

[1] 2.886751

 

 

 

3)

It seems like the summary is different by 10 for the two date sets.

The variance for both data sets are the same. Variance= 8.333333 and st dev= 2.886751.

Noticed the results from set 2 were the same as set 1 just added 10. Did not notice this while looking and writing the data set.

I am not sure why the mode shows “Numeric”, went back to the video but it was also showing “Numeric” for him. Not sure if I am missing something.

 

Leave a comment