Exercise

# Deriving Compa-ratio

Employees always expect that they are paid fairly compared to their co-workers, and hence, maintaining internal pay parity is important.

Competitiveness of each employee's pay can be assessed by Compa-ratio. In this exercise, you'll derive compa-ratio as:

$$\text{Compa-ratio} = \frac{\text{Actual compensation}}{\text{Median compensation}}$$

Median compensation is used by organizations to estimate the typical pay for any role/level. This metric helps the organization to correct the compensation of employees who are way below the median compensation.

*Note: Remember, median is also known as the 50th percentile. Exactly 50 percent of people make less than the median and 50 percent make more.*

Instructions

**100 XP**

- For each level, calculate the median compensation (
`median_compensation`

) and compa-ratio (`compa_ratio`

). - Print the median compensation for each level.