R Tutorials
R Data Structures
R Graphics
R Statistics
R Examples
Percentiles used in mathematics to give you a number that describes the value that the given percentage is less than that.
If we look at the wt
(weight) variable values from the mtcars
data set:
1.513 | 1.615 | 1.835 | 1.935 | 2.140 | 2.200 | 2.320 | 2.465 |
2.620 | 2.770 | 2.780 | 2.875 | 3.150 | 3.170 | 3.190 | 3.215 |
3.435 | 3.440 | 3.440 | 3.440 | 3.460 | 3.520 | 3.570 | 3.570 |
3.730 | 3.780 | 3.840 | 3.845 | 4.070 | 5.250 | 5.345 | 5.424 |
What is 75. motor weight percentile? The answer is 3.61 or 3 610 lbs, which means that 75% or cars weigh 3 310 lbs or less:
75% 3.61
If you use a quantile()
function without specifying a parameter c()
, you will get 0, 25, 50, 75 and 100 percent:
0% 25% 50% 75% 100% 1.51300 2.58125 3.32500 3.61000 5.42400
The quartiles are data divided into four parts, which are arranged in ascending order:
Use the quantile()
function to get the quartiles.