A truncated mean or trimmed mean is a statistical measure of central tendency, much like the mean and median. It involves the calculation of the mean after discarding given parts of a probability distribution or sample at the high and low end, and typically discarding an equal amount of both. This number of points to be discarded is usually given as a percentage of the total number of points, but may also be given as a fixed number of points.Write a program calculate trimmed mean with discarding 3 number from high and low.
Write in C Language
Description
A truncated mean or trimmed mean is a statistical measure of central tendency, much like the mean and median. It involves the calculation of the mean after discarding given parts of a probability distribution or sample at the high and low end, and typically discarding an equal amount of both. This number of points to be discarded is usually given as a percentage of the total number of points, but may also be given as a fixed number of points.Write a program calculate trimmed mean with discarding 3 number from high and low.
Input
Input start with a integer N(N > 6) represent the number of sample, fellow by N integer represent the sample.
Output
Output trimmed mean round down to second decimal place.
Sample Input 1
7 1 2 3 4 5 6 7Sample Output 1
4.00Sample Input 2
8 1 2 3 4 5 6 7 8Sample Output 2
4.50Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images