ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Сборники > Array_and_Matrices > задача:


50215 - ZScore normalization

Задачи сборника

• 50205 - Secret Number
• 50206 - Club Presidency
• 50207 - Parking Place
• 50208 - Area of Triangle Revised
• 50209 - Number of Student Certificates
• 50210 - The largest Student Group
• 50212 - Buy the cheapest
• 50214 - Birthday Celebration
• 50215 - ZScore normalization
• 50216 - Top M Grades
• 50244 - Manhattan Distance
• 50245 - Trip to Korca
• 50249 - War Of Battleships
• 50252 - Selling Cars
• 50255 - Gaussian Elimination
• 50256 - Top popular m-students
• 50257 - Course Selection

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Question by Ibrahim Mesecan.

ZScore normalization

There are several methods to put the items in the same scale. In Z-score normalization arithmetic mean is subtracted from each data item and the result is divided by the standard deviation.

where μ is the arithmetic mean and σ is the standard deviation of the sequence.

Question: Write a program that reads a sequence of numbers and then normalizes them using ZScore.

Input specification
You will be first given a number (n) the number of numbers, where 0 ≤ n ≤ 5000. Then in the following line, you will be given n integers which are between -50,000 and 50,000.

Output specification:
Show the normalized sequence with two digits precision.

Sample Input I
5
9 7 10 5 8
Sample Output I
0.62 -0.42 1.14 -1.46 0.10

Explanation: There are 5 numbers given. And, arithmetic mean μ = 7.8 and σ = 1.9235. If μ is subtracted from all the numbers and then divided by σ, we have the given sequence.



Для отправки решений необходимо выполнить вход.

www.contester.ru