- Hands-On Data Science and Python Machine Learning
- Frank Kane
- 167字
- 2021-07-15 17:15:08
Median
Median is a little bit different. The way you compute the median of the dataset is by sorting all the values (in either ascending or descending order), and taking the one that ends up in the middle.
So, for example, let's use the same dataset of children in my neighborhood
0, 2, 3, 2, 1, 0, 0, 2, 0
I would sort it numerically, and I can take the number that's slap dab in the middle of the data, which turns out to be 1.
0, 0, 0, 0, 1, 2, 2, 2, 3
Again, all I do is take the data, sort it numerically, and take the center point.
If you have an even number of data points, then the median might actually fall in between two data points. It wouldn't be clear which one is actually the middle. In that case, all you do is, take the average of the two that do fall in the middle and consider that number as the median.
推薦閱讀
- Vue.js 3.x快速入門
- 流量的秘密:Google Analytics網(wǎng)站分析與優(yōu)化技巧(第2版)
- Mastering Ember.js
- Python零基礎(chǔ)快樂學(xué)習(xí)之旅(K12實戰(zhàn)訓(xùn)練)
- Android NDK Beginner’s Guide
- Internet of Things with the Arduino Yún
- 自制編程語言
- Oracle從入門到精通(第5版)
- WordPress 4.0 Site Blueprints(Second Edition)
- INSTANT Adobe Edge Inspect Starter
- Mastering Web Application Development with AngularJS
- Kubernetes進階實戰(zhàn)
- 零基礎(chǔ)學(xué)Python編程(少兒趣味版)
- Application Development with Swift
- 一步一步學(xué)Spring Boot:微服務(wù)項目實戰(zhàn)(第2版)