> ## Documentation Index
> Fetch the complete documentation index at: https://v1-learn.neoartd.my.id/llms.txt
> Use this file to discover all available pages before exploring further.

# Measures of Variation

## Range

The `range` is defined to be the highest value minus the lowest value. The symbol `R` is used for the range.

> `range` didefinisikan sebagai nilai tertinggi dikurangi nilai terendah. Simbol `R` digunakan untuk range.

<Info>R = highest value – lowest value. </Info>

Extremely large or extremely small data values can drastically affect the range.

> Nilai data yang sangat besar atau sangat kecil dapat mempengaruhi range secara drastis.

## Population Variance

<Card>
  The variance is the average of the squares of the distance each value is from the mean.\
  The symbol for the population variance is $\sigma^2$ ($\sigma$ is the Greek lowercase letter sigma)

  <br />

  $\sigma^2 = \dfrac{\Sigma (X-\mu)^2}{N}$, where

  <br />

  * $X$ = is individual value
  * $\mu$ = is population mean
  * $N$ = is population size
</Card>

### Example

<Card>
  Consider the following data to constitute the population: 10, 60, 50, 30, 40, 20.\
  Find the mean and variance.

  <br />

  The `mean` $\mu$ = (10 + 60 + 50 + 30 + 40 + 20)/6 = 210/6 = 35.

  <br />

  The `variance` $\sigma^2 = \dfrac{\Sigma (X-\mu)^2}{N} = \dfrac{1750}{6}$ = 291.67.

  <br />

  Table

  |  $X$  | $X-\mu$ | $(X-\mu)^2$ |
  | :---: | :-----: | :---------: |
  |   10  |   -25   |     625     |
  |   60  |    25   |     625     |
  |   50  |    15   |     225     |
  |   30  |    -5   |      25     |
  |   40  |    5    |      25     |
  |   20  |   -15   |     225     |
  | `210` |         |    `1750`   |
</Card>

### Population Standard Deviation

<Card>
  The standard deviation, denoted by $\sigma$, The standard deviation is the square root of the variance.

  <br />

  $\sigma = \sqrt{\sigma^2} = \sqrt{\dfrac{\Sigma (X-\mu)^2}{N}}$
</Card>

## Sample Variance

<Card>
  The unbiased estimator of the population variance or the sample variance is a statistic whose value approximates the expected value of a population variance.\
  It is denoted by $s^2$, where

  <br />

  $s^2 = \dfrac{\Sigma (X-\overline{\rm X})^2}{n-1}$, and

  <br />

  * $\overline{\rm X}$ = sample mean
  * $n$ = sample size
</Card>

### Example

<Card>
  Find the variance and standard deviation for the following sample: 16, 19, 15, 15, 14.

  <br />

  $\Sigma X$ = (16 + 19 + 15 + 15 + 14) = 79

  <br />

  $\Sigma X^2$ = (16^2 + 19^2 + 15^2 + 15^2 + 14^2) = 1263

  <br />

  $s^2 = \dfrac{\Sigma X^2 - (\Sigma X)^2 / n}{n-1}$

  <br />

  $~~~~ = \dfrac{1263 - (79)^2 / 5}{4} = 3.7$

  <br />

  $s = \sqrt{3.7} = 1.9$
</Card>

### Sample Standard Deviation

<Card>
  The sample standard deviation is the square root of the sample variance.

  <br />

  $s = \sqrt{s^2} = \sqrt{\dfrac{\Sigma (X-\overline{\rm X})^2}{n-1}}$

  <br />

  Shortcut Formula for the Sample Variance and the Standard Deviation

  <br />

  $s^2 = \dfrac{\Sigma X^2 - (\Sigma X)^2 / n}{n-1}$, or

  <br />

  $s = \sqrt{\dfrac{\Sigma X^2 - (\Sigma X)^2 / n}{n-1}}$
</Card>

### Sample Variance for Grouped and Ungrouped Data

For `grouped data`, use the class midpoints for the observed value in the different classes.

For `ungrouped data`, use the same formula with the class midpoints, $X_m$, replaced with the actual observed X value.

<Card>
  The sample variance for `grouped data`:

  <br />

  $s^2 = \dfrac{\Sigma f \bullet X_m^2 - [(\Sigma f \bullet X_m)^2 / n]}{n-1}$

  <Info>
    For `ungrouped data`, replace $X_m$ with the observe $X$ value.
  </Info>
</Card>

#### Sample Variance for Grouped Data - Example

| $X$ |    $f$   |    $f \bullet X$    |     $f \bullet X^2$    |
| :-: | :------: | :-----------------: | :--------------------: |
|  5  |     2    |          10         |           50           |
|  6  |     3    |          18         |           108          |
|  7  |     8    |          56         |           392          |
|  8  |     1    |          8          |           64           |
|  9  |     6    |          54         |           486          |
|  10 |     4    |          40         |           400          |
|     | $n = 24$ | $f \bullet X = 186$ | $f \bullet X^2 = 1500$ |

#### Sample Variance for Ungrouped Data - Example

<Card>
  The sample variance and standard deviation:

  <br />

  $s^2 = \dfrac{\Sigma f \bullet X^2 - [(\Sigma f \bullet X)^2 / n]}{n-1}$

  <br />

  $~~~~ = \dfrac{1500 - [(186)^2 / 24]}{23} = 2.54$

  <br />

  $s = \sqrt{2.54} = 1.6$
</Card>

## Coefficient of Variation

The `coefficient of variation` is defined to be the standard deviation divided by the mean. The result is expressed as a percentage.

> Koefisien variasi didefinisikan sebagai standar deviasi dibagi dengan rata-rata. Hasilnya dinyatakan dalam persentase.

<Card>
  $CVar = \dfrac{s}{\overline{\rm X}} \times 100$ or $CVar = \dfrac{\sigma}{\mu} \times 100$
</Card>

## Chebyshev's Theorem

The proportion of values from a data set that will fall within k standard deviations of the mean will be at least $1 - 1/k^2$, where k is any number greater than 1.

> Proporsi nilai dari kumpulan data yang akan jatuh dalam k standar deviasi dari rata-rata setidaknya $1 - 1/k^2$, di mana k adalah angka lebih besar dari 1.

For k = 2, 75% of the values will lie within 2 standard deviations of the mean. For k = 3, approximately 89% will lie within 3 standard deviations.

> Untuk k = 2, 75% nilai akan berada dalam 2 standar deviasi dari rata-rata. Untuk k = 3, sekitar 89% akan berada dalam 3 standar deviasi.

## The Empirical (Normal) Rule

For any bell shaped distribution:

> Untuk distribusi berbentuk lonceng:

* Approximately 68% of the data values will fall within one standard deviation of the mean.

  > Sekitar 68% nilai data akan berada dalam satu standar deviasi dari rata-rata.

* Approximately 95% will fall within two standard deviations of the mean.

  > Sekitar 95% akan berada dalam dua standar deviasi dari rata-rata.

* Approximately 99.7% will fall within three standard deviations of the mean.
  > Sekitar 99.7% akan berada dalam tiga standar deviasi dari rata-rata.

![Empirical Rule](https://i.ibb.co/9bX4hrX/Screenshot-2024-04-06-221315.png)
