Checking the median of a dataset
The median is the middle value within a sorted dataset (ascending or descending order). Half of the data points in the dataset are less than the median, and the other half of the data points are greater than the median. The median is like the mean because it is also typically used on tabular data, and the “middle value” provides us with a sense of where the center of a dataset lies.
However, unlike the mean, the median is not sensitive to outliers. Outliers are unusually high or unusually low data points in our dataset, which can result in misleading analysis. The median isn’t heavily influenced by outliers because it doesn’t require the sum of all datapoints as the mean does; it only selects the middle value from a sorted dataset. To calculate the median, we sort the dataset and select the middle value if the number of datapoints is odd. If it is even, we select the two middle values and find the average to get the median...