Home > Common Problem > body text

What is trimmean function?

(*-*)浩
Release: 2020-01-07 12:01:02
Original
7770 people have browsed it

What is trimmean function?

trimmean function returns the internal mean of the data set.               (Recommended learning: phpstorm)

The function TRIMMEAN first removes a certain percentage of data points from the head and tail (highest value and lowest value) of the data set, and then Then find the average.

This function can be used when you want to eliminate the calculation of a part of the data in the analysis.

Syntax

TRIMMEAN(array, percent)
Copy after login

Parameters

##Array is the array or data area that needs to be sorted and averaged .

Percent is the proportion of data points to be removed during calculation. For example, if Percent = 0.2, in a set of 10 data points, 2 data points (10 x 0.2) must be removed: head removal 1 piece, remove 1 piece from the tail, 2 pieces in total.

Explanation

(1) Percent < 0 or Percent > 1, the function TRIMMEAN returns the error value #NUM!;

(2) The general formula of the Percent parameter: Percent=1÷Total number of data×Total number of removed; [1]

(3) TRIMMEAN rounds down the number of removed data points to the nearest multiple of 2.

If Percent = 0.1, 10% of 30 data points equals 3 data points. The function TRIMMEAN will symmetrically remove one item from the head and one item from the tail of the data set.

The above is the detailed content of What is trimmean function?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!