### Theory:

Median is also one of the ways to measure the central tendency of the given set of data.

Median:
When a set of numbers is arranged in ascending order or descending order, the middle term constitutes the set's median.
Steps to find the median:
Step $$1$$: Arrange the numbers in ascending or descending order.

Step $$2$$: Count the number of entries, $$N$$, on that set.

Step $$3$$: Find the middle term using the formulae given below.

If $$N$$ is odd, then:

$$\text{Median} =$$ ${\left(\frac{N\phantom{\rule{0.147em}{0ex}}+\phantom{\rule{0.147em}{0ex}}1}{2}\right)}^{\mathit{th}}$ $$term$$

If $$N$$ is even, then the median is the average ${\left(\frac{N\phantom{\rule{0.147em}{0ex}}}{2}\right)}^{\mathit{th}}$ and ${\left(\frac{N}{2}\phantom{\rule{0.147em}{0ex}}+\phantom{\rule{0.147em}{0ex}}1\right)}^{\mathit{th}}$ terms.

That is, $$\text{Median} =$$ $$\frac{1}{2}$$$$\Bigg[$$${\left(\frac{N}{2}\right)}^{\mathit{th}}\phantom{\rule{0.147em}{0ex}}\mathit{term}\phantom{\rule{0.147em}{0ex}}+\phantom{\rule{0.147em}{0ex}}{\left(\frac{N}{2}\phantom{\rule{0.147em}{0ex}}+\phantom{\rule{0.147em}{0ex}}1\right)}^{\mathit{th}}\phantom{\rule{0.147em}{0ex}}\mathit{term}$$$\Bigg]$$