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.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

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 7

Sample Output 1

4.00

Sample Input 2 

8 1 2 3 4 5 6 7 8

Sample Output 2

4.50
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 give
n 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.
會先輸入一個正整數 N(N > 6) 表示樣本數,接下來N個數為要計算的樣本。
Output
Output trimmed mean round down to second decimal place
輸出裁減平均值到小數後第二位
Sample Input 1 E
Sample Output 1
7 1 2 3 4 5 6 7
4.00
Sample Input 2 É
Sample Output 2
8 12 3 4 5 67 8
4.50
Transcribed Image Text: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 give n 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. 會先輸入一個正整數 N(N > 6) 表示樣本數,接下來N個數為要計算的樣本。 Output Output trimmed mean round down to second decimal place 輸出裁減平均值到小數後第二位 Sample Input 1 E Sample Output 1 7 1 2 3 4 5 6 7 4.00 Sample Input 2 É Sample Output 2 8 12 3 4 5 67 8 4.50
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education