xxMsJojoxx
Junior Member
- Joined
- Oct 6, 2020
- Messages
- 54
There are several different definitions of quartiles; you are using a different definition than R uses. I happen to prefer theirs; but if you did what you were taught, then you should do that in class (while being aware that R will often disagree with your results).I have a set of numbers: (-18,-14,-12,-8,-7,-6,-4,0,1,2,3,4,5,8,9,14,15)
In R Program, I get the following information.
View attachment 23581
But with my own calculation, I got 1st quartile as -7.5, and 3rd quartile as 6.5.
What am i doing wrong? Or is there a reason for the discrepancy?
The median is 1. And the median of the upper range is 6.5 = (5+8)/2, which I got as the 3rd quartile. The median of the lower rannge is -7.5 = (-8+-7)/2, which I got as the 1st quartile.Please show us your work so we can see where you made your mistake.
Thank you, Dr. Peterson. I also read your blog, to get a better understanding.There are several different definitions of quartiles; you are using a different definition than R uses. I happen to prefer theirs; but if you did what you were taught, then you should do that in class (while being aware that R will often disagree with your results).
For a too-long discussion of this issue (and references to others), see my blog: The Many Meanings of “Quartile”
What they are presumably doing is including the median as part of both lower and upper halves, whereas you are excluding it, as I expected. Both definitions are taught and used. For large data sets, this is less important than in small data sets used in class.The median is 1. And the median of the upper range is 6.5 = (5+8)/2, which I got as the 3rd quartile. The median of the lower rannge is -7.5 = (-8+-7)/2, which I got as the 1st quartile.
Looks good to me.The median is 1. And the median of the upper range is 6.5 = (5+8)/2, which I got as the 3rd quartile. The median of the lower rannge is -7.5 = (-8+-7)/2, which I got as the 1st quartile.