LIS 4273 Module #3 Assignment

Hello,

I was given two data sets:

Set #1:  10, 2, 3, 2, 4, 2, 5
Set #2:  20, 12, 13, 12, 14, 12, 15

R Code:

> 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
> 
> modeset1<- 2
> 
> modeset2 <- 12
> 
> diff(range(set1))
[1] 8
> 
> diff(range(set2))
[1] 8
> 
> IQR(set1)
[1] 2.5
> 
> IQR(set2)
[1] 2.5
> 
> var(set1)
[1] 8.333333
> 
> var(set2)
[1] 8.333333
> 
> sd(set1)
[1] 2.886751
> 
> sd(set2)
[1] 2.886751

Comparisons:

Mean:

  • Set #1: The mean is 4.
  • Set #2: The mean is 14.

Comparison: Set #2 has a significantly higher mean, indicating that the values in Set #2 are generally higher than those in Set #1.

Median:
  • Set #1: The median is 3.
  • Set #2: The median is 13.

Comparison: Similar to the mean, the median in Set #2 is much higher, suggesting that the middle value of Set #2 is also larger than that of Set #1. This further emphasizes that set #2 contains higher values.

Mode:
  • Set #1: The mode is 2.
  • Set #2: The mode is 12.

Comparison: The most frequent value in Set #2 is also much higher than in Set #1. This difference again reflects that Set #2 consists of larger numbers overall.

Range:

  • Both sets have a range of 8, indicating that the spread between both sets' maximum and minimum values is the same.

  • Interquartile Range (IQR)
    :

  • Both sets have an IQR of 2.5, which means that the spread of the middle 50% of the data is identical in both sets. Despite the difference in absolute values, the relative dispersion in both sets is comparable.

  • Variance
    :

  • Both sets have the same variance of 8.33, showing that the overall variability of values around the mean is identical between the two sets. This indicates that while set #2 has higher values overall, the degree of variation within each set is similar.


  • Standard Deviation:

    • Both sets have a standard deviation of approximately 2.89, confirming that the spread of values around the mean is the same for both sets.

    Comments

    Popular posts from this blog

    LIS 4273 Module #5 Assignment