suppose we have the following data set (length 24):
x <- c(30L, 49L, 105L, 115L, 118L, 148L, 178L, 185L, 196L, 210L, 236L, 236L,
278L, 287L, 329L, 362L, 366L, 399L, 430L, 434L, 451L, 451L, 477L, 488L, 508L,
531L, 533L, 542L)
If we calculate the five-number summary: Minimum is 30, Maximum: 542, Median: (287 + 329) /2 = 308...that was the easy part!
- Q1 is the median of the subset [30, 49,105,....287], length 14 --> Q1 = [178 + 185]/2 = 181.5
- Q3 " " " " [329,362,...,542] = [451 + 451] / 2 = 451
Now if we check that with function summary(dataset)
... we get:
Min. 1st Qu. Median Mean 3rd Qu. Max.
30.0 183.2 308.0 309.7 451.0 542.0
Why do we get a different Q1? How does the function summary
calculate Q1?