Summary Statistics: Difference between revisions
No edit summary |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
When we investigate | When we investigate a dataset, two things are used to ''summarizing'' the dataset: the ''center'' and the ''spread''. | ||
= Measuring Center = | = Measuring Center = | ||
Line 42: | Line 42: | ||
== Interquartile Range (IQR) == | == Interquartile Range (IQR) == | ||
The '''interquartile range''' (IQR) is the middle 50% of the dataset. | The '''interquartile range''' (IQR) is the middle 50% of the dataset. It is just from Q<sub>1</sub> to Q<sub>3</sub>. | ||
== Variance == | == Variance == | ||
Line 52: | Line 52: | ||
<math>s^2 = \frac{1}{n - 1} \sum (x_i - \bar{x})^2 = \frac{1}{n - 1} \left( \sum x_i^2 - n \bar{x}^2 \right)</math> | <math>s^2 = \frac{1}{n - 1} \sum (x_i - \bar{x})^2 = \frac{1}{n - 1} \left( \sum x_i^2 - n \bar{x}^2 \right)</math> | ||
Without going into too much detail, the reason we use <math>n - 1</math> is because when only <math>n</math> is used, we ''always'' underestimates variance when we use the sample mean instead of the true mean | |||
== Standard Deviation == | |||
Variance is difficult to interpret due to it being squared. Naturally then, we can take the square root of variance and get '''standard deviation''': the typical deviation of a data point to its mean. | |||
== Outliers == | |||
'''Outliers''' are observations that appears extreme relative to the dataset. We use the following metric to determine outliers: | |||
Upper cutoff: <math>> Q_3 + 1.5(IQR)</math> | |||
Lower cutoff: <math>< Q_1 - 1.5(IQR)</math> | |||
=== Robustness === | |||
We call a statistic '''robust''' if it is not strongly affected by outliers. | |||
Robust statistics include median and IQR | |||
Non-robust statistics include mean, range, and standard deviation. | |||
= Others = | |||
Besides the listed above, there are other statistics used to measure center and spread: | |||
'''Spread:''' | |||
* [[Bivariate|Bivariate data]]: covariance, correlation | |||
[[Category: Statistics]] | [[Category: Statistics]] |
Latest revision as of 01:12, 19 March 2024
When we investigate a dataset, two things are used to summarizing the dataset: the center and the spread.
Measuring Center
There are two ways to measure center: the mean and the median.
Mean
The mean is the average/expected value of a variable. The sample mean is denoted as , whereas the population mean is denoted as .
where is the sample size.
Median/Percentiles/Quartiles
The median tell us the literal center of the dataset: 50% of statistics are on the left, 50% on the right. It is denoted with
The quartiles is the same, except at 25% for the first quartile, 50% for the second (also the median), and 75% for the third. They are denoted with
The percentiles is also the same, except at a particular percentage. For example, the 80th percentile has 80% of data before it.
To calculate the P-th percentile (and thereby calculating all the other something-tiles), we have
where is the sample size.
Mode
The mode is the most frequently occurring value. It's pretty neglected lol.
Measuring Spread
There are three main ways to measure the spread of the dataset: range, interquartile range, and variance.
Range
The range of a variable is the interval between the first statistic and the last statistic (after being ordered).
Interquartile Range (IQR)
The interquartile range (IQR) is the middle 50% of the dataset. It is just from Q1 to Q3.
Variance
The variance measures how much the dataset deviate from the mean. To be exact, it measures the average squared difference from the mean.
The reason we take the squared difference is because we want both statistics smaller than the mean and those greater than the mean to contribute to the variance.
The same variance is denoted as and the population variance is denoted as . We have
Without going into too much detail, the reason we use is because when only is used, we always underestimates variance when we use the sample mean instead of the true mean
Standard Deviation
Variance is difficult to interpret due to it being squared. Naturally then, we can take the square root of variance and get standard deviation: the typical deviation of a data point to its mean.
Outliers
Outliers are observations that appears extreme relative to the dataset. We use the following metric to determine outliers:
Upper cutoff:
Lower cutoff:
Robustness
We call a statistic robust if it is not strongly affected by outliers.
Robust statistics include median and IQR
Non-robust statistics include mean, range, and standard deviation.
Others
Besides the listed above, there are other statistics used to measure center and spread:
Spread:
- Bivariate data: covariance, correlation