- 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.
推薦閱讀
- Learn ECMAScript(Second Edition)
- Visual FoxPro程序設計教程(第3版)
- Hands-On Image Processing with Python
- Oracle Database 12c Security Cookbook
- Unity Shader入門精要
- WordPress Plugin Development Cookbook(Second Edition)
- Learning Apache Kafka(Second Edition)
- 計算機應用基礎實踐教程
- C++從入門到精通(第5版)
- Mobile Device Exploitation Cookbook
- 響應式Web設計:HTML5和CSS3實戰(第2版)
- Java EE 7 with GlassFish 4 Application Server
- Developing Java Applications with Spring and Spring Boot
- MongoDB Cookbook
- Elasticsearch搜索引擎構建入門與實戰