quartile
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
quartile [2019/09/19 10:42] – [e.g. 2] hkimscil | quartile [2019/09/24 10:29] – [e.g. 1] hkimscil | ||
---|---|---|---|
Line 12: | Line 12: | ||
====== Finding lower and upper quartile ====== | ====== Finding lower and upper quartile ====== | ||
- | ===== e.g. 1 ===== | + | ===== e.g. 1, Head First method |
< | < | ||
Line 60: | Line 60: | ||
* Use the median to divide the ordered data set into two halves. | * Use the median to divide the ordered data set into two halves. | ||
* If there are an odd number of data points in the original ordered data set, include the median (the central value in the ordered list) in both halves. | * If there are an odd number of data points in the original ordered data set, include the median (the central value in the ordered list) in both halves. | ||
+ | < | ||
+ | jh1 <- c(6, 7, 15, 36, 39, 40) | ||
+ | (15+36)/ | ||
+ | jh2 <- c(40, 41, 42, 43, 47, 49) | ||
+ | (42+43)/2 | ||
+ | </ | ||
+ | |||
* If there are an even number of data points in the original ordered data set, split this data set exactly in half. | * If there are an even number of data points in the original ordered data set, split this data set exactly in half. | ||
* The lower quartile value is the median of the lower half of the data. The upper quartile value is the median of the upper half of the data. | * The lower quartile value is the median of the lower half of the data. The upper quartile value is the median of the upper half of the data. | ||
* The values found by this method are also known as " | * The values found by this method are also known as " | ||
+ | |||
+ | ??? | ||
+ | < | ||
+ | > k <- c(6, 7, 15, 36, 39, 40, 41, 42, 43, 47, 49, 50) | ||
+ | > ks <- sort(k) | ||
+ | > ks | ||
+ | | ||
+ | > length(ks) | ||
+ | [1] 12 | ||
+ | > quantile(ks) | ||
+ | | ||
+ | 6.00 30.75 40.50 44.00 50.00 | ||
+ | > | ||
+ | </ | ||
+ | |||
---- | ---- | ||
in r | in r |
quartile.txt · Last modified: 2023/09/11 08:42 by hkimscil