Means and medians are two of the most common ways to "summarize" a group of numbers.
Click to play video
The mean (or "average") of a group of numbers is the sum divided by the count of those numbers.
For example, say we have the numbers 2, 5, 1, 6, 75:
2 + 5 + 1 + 6 + 75 = 89
89 / 5 = 17.8
The mean is 17.8.
The median of a group of numbers is the middle number after sorting them.
For example, say we have the numbers 2, 5, 1, 6, 75:
1, 2, 5, 6, 755, so the median is 5.If there is an even count of numbers, the median is the mean of the two middle numbers.
It feels like everyone always talks about averages... so you might think that the mean is the more useful "representative" value from a group of numbers. The problem is, as you can see above, a big outlier like 75 skews the mean, while the median is less affected by it.
As a rule of thumb, the median is often a more accurate representative number of a group, especially if there are outliers in the data. It can just be a bit more work to calculate because it involves sorting instead of simple arithmetic.
We now need a way to show our LockedIn influencers the average (mean) follower count of the people they follow. This will help them know if they're following people who are more or less popular than them.
Complete the average_followers function.
None.