3 DescriptiveStatistics
3 DescriptiveStatistics
3. Descriptive Statistics
Descriptive Statistics
Explore a dataset:
● What's in the dataset?
● What does it mean?
● What if there's a lot of it?
Basic statistical
functions in R
median(h) = 2
> h <- c(3, 1, 2)
> median(h)
[1] 2
median()
Even number of values: need to find mean()
f f' f'
find
1 3 sort 1 1 center 1 1
2 2 2 2 2 2 median(f)
3 4 3 3 3 3 = mean(c(2,3))
= 2.5
4 1 4 4 4 4
Sample variance
Price = Dependent
Variable ↑
D E F G H I J
Fair 163 224 312 314 303 175 119
Good 662 933 909 871 702 522 307
Very Good 1513 2400 2164 2299 1824 1204 678
Premium 1603 2337 2331 2924 2360 1428 808
Ideal 2834 3903 3826 4884 3115 2093 896
Diamond Color and Cut