> ## 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 Position

## z score

The `standard score` or `z score` for a value is obtained by subtracting the mean from the value and dividing the result by the standard deviation.

> nilai standard atau z score untuk suatu nilai diperoleh dengan mengurangkan nilai tersebut dengan rata-rata dan membagi hasilnya dengan standar deviasi.

<Info>The symbol `z` is used for the `z score`.</Info>

The z score represents the number of standard deviations a data value falls above or below the mean.

> z score mewakili jumlah standar deviasi nilai data jatuh di atas atau di bawah rata-rata.

<Card>
  For samples:

  <br />

  $z = \dfrac{X - \overline{\rm X}}{s}$

  <br />

  For populations:

  <br />

  $z = \dfrac{X - \mu}{\sigma}$
</Card>

### z score - Example

<Card>
  A student scored 65 on a statistics exam that had a mean of 50 and a standard deviation of 10. Compute the z-score.

  <br />

  $z = \dfrac{65 - 50}{10} = 1.5$

  <br />

  That is, the score of 65 is 1.5 standard deviations `above` the mean.

  <br />

  `Above` - since the z-score is positive.
</Card>

## Percentiles

Percentiles divide the distribution into 100 groups.

> Persentil membagi distribusi menjadi 100 kelompok.

The $P_k$ percentile is defined to be that numerical value such that at most k% of the values are smaller than $P_k$ and at most (100 - k)% are larger than $P_k$ in an ordered data set.

> Persentil $P_k$ didefinisikan sebagai nilai numerik sedemikian rupa sehingga paling banyak k% dari nilai-nilai lebih kecil dari $P_k$ dan paling banyak (100 - k)% lebih besar dari $P_k$ dalam kumpulan data yang diurutkan.

The percentile corresponding to a given value (X) is computed by using the formula:

<Card>
  $Percentile = \dfrac{Number of values below X + 0.5}{Total number of values} \times 100$
</Card>

### Percentiles - Example

<Card>
  A teacher gives a 20-point test to 10 students. Find the percentile rank of a score of 12.

  <br />

  Scores: 18, 15, 12, 6, 8, 2, 3, 5, 20, 10.

  <br />

  Ordered set: 2, 3, 5, 6, 8, 10, 12, 15, 18, 20.

  <br />

  Percentile = $\dfrac{6 + 0.5}{10} \times 100 = 65$th percentile.

  Student did better than 65% of the class.
</Card>

### Finding the value Corresponding to a Given Percentile - Example

Find the value of the 25th percentile for the following data set: 2, 3, 5, 6, 8, 10, 12, 15, 18, 20.

`Procedure`: Let ***p*** be the percentile and ***n*** the sample size.

<Steps>
  <Step title="Arrange the data in order.">
    the data set is already ordered.\
    data set: 2, 3, 5, 6, 8, 10, 12, 15, 18, 20.
  </Step>

  <Step title="Compute c = (np)/100.">
    n = 10, p = 25, so $c = (10 \bullet 25)/100 = 2.5$.
  </Step>

  <Step title="Check c">
    Hence round up to c = 3.

    <Info>
      If c is not a whole number, round up to the next whole number.<br />
      If c is a whole number, use the value halfway between c and c+1.
    </Info>
  </Step>

  <Step title="The value of c is the position value of the required percentile.">
    data set: 2, 3, `5`, 6, 8, 10, 12, 15, 18, 20.  $\longmapsto c = 3$ \
    Thus, the value of the 25th percentile is the value X = 5.

    Find the 80th percentile.
    $~~~~ c = \dfrac{10 \bullet 80}{100} = 8$.

    Thus the value of the 80th percentile is the average of the 8th and 9th values. \
    Thus, the 80th percentile for the data set is (15 + 18)/2 = 16.5.
  </Step>
</Steps>

### Special Percentiles - Deciles and Quartiles

`Deciles` divide the data set into 10 groups.

> Deciles membagi kumpulan data menjadi 10 kelompok.

<Info>
  Deciles are denoted by $D_1,~ D_2,~ ...,~ D_9$ with the corresponding percentiles being $P_{10},~ P_{20},~ ...,~ P_{90}$
</Info>

`Quartiles` divide the data set into 4 groups.

> Quartiles membagi kumpulan data menjadi 4 kelompok.

<Info>
  Quartiles are denoted by $Q_1,~ Q_2,~ and~ Q_3$ with the corresponding percentiles being $P_{25},~ P_{50},~ and~ P_{75}.$

  The median is the same as $P_{50} ~ or ~ Q_2$
</Info>

### Outliers and the Interquartile Range (IQR)

An `outlier` is an extremely high or an extremely low data value when compared with the rest of the data values.

> `Outlier` adalah nilai data yang sangat tinggi atau sangat rendah jika dibandingkan dengan nilai data lainnya.

The `Interquartile Range`,
$IQR = Q_3 - Q_1$

#### Outliers and the Interquartile Range (IQR) - Example

To determine whether a data value can be considered as an outlier:

Given the data set 5, 6, 12, 13, 15, 18, 22, 50, can the value of 50 be considered as an outlier?

<Steps>
  <Step title="Compute Q1 and Q3">
    $Q_1 = 9,~ Q_3 = 20$

    <Tip>
      To find Q1 and Q3, first find the median.\
      If the number of data values is odd, the median is the middle value.\
      If the number of data values is even, the median is the average of the two middle values.

      For the data set 5, `6, 12`, `13, 15`, `18, 22`, 50, the median is `13, 15`.\
      The lower quartile $Q_1$ is the median of the lower half of the data set, which is `(6 + 12)/2 = 9`.\
      The upper quartile $Q_3$ is the median of the upper half of the data set, which is `(15 + 18)/2 = 20`.
    </Tip>
  </Step>

  <Step title="Find the IQR = Q3 - Q1">
    $IQR = Q_3 - Q_1 = 20 - 9 = 11$
  </Step>

  <Step title="Compute (1.5)(IQR)">
    $(1.5)(IQR) = (1.5)(11) = 16.5$
  </Step>

  <Step title="Compute Q1 - (1.5)(IQR) and Q3 + (1.5)(IQR)">
    $Q_1 - (1.5)(IQR) = 9 - 16.5 = -7.5$ \
    $Q_3 + (1.5)(IQR) = 20 + 16.5 = 36.5$
  </Step>

  <Step title="Compare the data value">
    The value of 50 is outside the range -7.5 to 36.5, and the value of 50 can be considered as an outlier.

    <Tip>
      Compare the data value (say X) with Q1 - (1.5)(IQR) and Q3 + (1.5)(IQR).

      If X \< Q1 - (1.5)(IQR) or\
      if X > Q3 + (1.5)(IQR), then X is considered an outlier.
    </Tip>
  </Step>
</Steps>
