Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

i know that in five number summary :

25% of a data set lies between Min & 1st quartile.

50% of a data set lies between Min & 2nd quartile, that is, Median.

75% of a data set lies between Min & 3rd quartile.

& 100% of a data set lies between Min & Max.

But my cocept is contradicting as i run a data set in R Programming Language.

while i wrote the command fivenum(x) & quantile(x) the percentiles are not matching that is, "the 1st quartile of fivenum(x)" is not "the the value below which 25% of the data fall in quantile(x)"

the commands that i have run in R console:

y <- c(7,12,9,1)

fivenum(y)

[1] 1.0 4.0 8.0 10.5 12.0

quantile(y)

0% 25% 50% 75% 100%

1.00 5.50 8.00 9.75 12.00

by which points am i being misleading?

share|improve this question

1 Answer 1

$\frac{n+1}{2}\times 25\% =1.25\\ \frac{n+1}{2}\times 75\% =3.75$

The fivenum command takes the $25^{th}$ percentile as the number half way between $1$ and $7$ and the $75^{th}$ as the number half way between $9$ and $12$, whereas the quantile command may have been an attempt to produce the numbers $0.25$ of the way between $1$ and $7$ and $0.75$ of the way between $9$ and $12$ that contained an error and ended up giving the numbers $0.25$ of the way between 7 and 1 and $0.75$ of the way between $12$ and $9$.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.