官术网_书友最值得收藏!

Central tendency

There are three descriptive measures of central tendency—the mean, the median, and the mode, but SQL Server does not have a way to calculate anything other than the mean directly. The arithmetic mean, or simply the mean (there are more types of mean in the central tendency), is the sum of all measurements divided by the number of observations in the dataset. The median is the middle value that separates the higher half from the lower half of the dataset. The median and the mode are the only measures of the central tendency that can be used for ordinal data, in which values are ranked relative to one another but are not measured absolutely. The mode is the most frequent value in the dataset. This is the only central tendency measure that can be used with nominal data, which has purely qualitative category assignments. For looking into such values with SQL Server, we will either need to define our own assembly with a custom aggregate or use complex T-SQL constructs to bypass the missing statistical functions. Another option would be to use the Python code or the R code; the code can be running inside the SQL Server, and you can pass the result set as the argument to the Python code or the R code to work on the descriptive statistics.

主站蜘蛛池模板: 左贡县| 余庆县| 资中县| 铁岭市| 东辽县| 陇南市| 德令哈市| 娱乐| 隆子县| 青州市| 迁西县| 收藏| 林州市| 抚松县| 桂阳县| 崇信县| 泗阳县| 雅安市| 肥乡县| 台中县| 波密县| 曲靖市| 阿瓦提县| 微山县| 衡南县| 肇庆市| 鄱阳县| 宜都市| 九江市| 浦东新区| 曲沃县| 镇赉县| 昭苏县| 富蕴县| 比如县| 松阳县| 四川省| 沐川县| 乐山市| 平原县| 北安市|