Module 3 Assignment

 Daniel Tafmizi

Lis 4273

Dr. Ajani (Sorry for calling you Friedman twice, it is my pleasure to have another class with you:)

January 28, 2024

Module 3 Assignment

Question 3:

The central tendency measures show a similarity between set 1 and set 2. The numbers in set 2 are each 10 greater than in set 1. Thus, the measures of central tendency of set 2 are each 10 greater than Set 1. This relationship is caused by the distribution and similarity of the numbers. 

The variation measures follow a similar path as the central tendency measures. The range, IQR, variance, and standard deviation are the same between the two sets. The quantile follows the same path as the central tendency measures, in which the numbers in set 2 are each 10 greater than in set 1. The variance and SD are the same because the dispersion of the integers is the same. 

I am starting to get used to R. It seems to be a better solution than my graphing calculator. Oh, how I dreaded using that calculator. My professor would always use large data sets. Typing them is much easier. Also, unlike the calculator, R allows me to modify the syntax of the function. I am excited to do more advanced arithmetic using R.

Question 1:

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

> mean(Set1)
[1] 4

> median(Set1)
[1] 3

> a<-table(Set1) #puts Set1 in table format
> print (a)
Set1
 2  3  4  5 10 
 3  1  1  1  1 
> mode1<-names(a)[which(a == max(a))] #Scans table and finds most common number
> print(mode1)
[1] "2"

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

> mean(Set2)
[1] 14

> median(Set2)
[1] 13

> b<-table(Set2)
> print(b)
Set2
12 13 14 15 20 
 3  1  1  1  1 
> Mode2<-names(b)[which(b == max(b))]
> print(Mode2)
[1] "12"

Question 2:

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

> range(Set1)
[1]  2 10

> IQR(Set1)
[1] 2.5

> quantile(Set1)
  0%  25%  50%  75% 100% 
 2.0  2.0  3.0  4.5 10.0 

> var(Set1)
[1] 8.333333

> sd(Set1)
[1] 2.886751

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

> range(Set2)
[1] 12 20

> IQR(Set2)
[1] 2.5

> quantile(Set2)
  0%  25%  50%  75% 100% 
12.0 12.0 13.0 14.5 20.0 

> var(Set2)
[1] 8.333333

> sd(Set2)
[1] 2.886751

Comments

Popular posts from this blog

First Day Assignment

Module 10 Assignment

Final Project