Калькулятор асимметрии и эксцесса

@import url('https://fonts.googleapis.com/css?family=Droid+Serif|Raleway');

.axis--y .domain { display: none; }

h1 { color: black; text-align: center; margin-bottom: 0px; margin-top: 15px; font-family: 'Raleway', sans-serif; }

p { color: black; text-align: center; margin-bottom: 15px; margin-top: 15px; font-family: 'Raleway', sans-serif; }

words {

color: black; font-family: Raleway; max-width: 550px; margin: 25px auto; line-height: 1.75; padding-left: 100px; }

words_text {

color: black; font-family: Raleway; max-width: 550px; margin: 25px auto; line-height: 1.75; }

words_text_area {

display:inline-block; color: black; font-family: Raleway; max-width: 550px; margin: 25px auto; line-height: 1.75; padding-left: 100px; }

calcTitle {

text-align: center; font-size: 20px; margin-bottom: 0px; font-family: 'Raleway', serif; }

hr_top {

width: 30%; margin-bottom: 0px; border: none; height: 2px; color: black; background-color: black; }

hr_bottom {

width: 30%; margin-top: 15px; border: none; height: 2px; color: black; background-color: black; }

words label, input {

display: inline-block; vertical-align: baseline; width: 350px; }

#button { border: 1px solid; border-radius: 10px; margin-top: 20px; padding: 10px 10px; cursor: pointer; outline: none; background-color: white; color: black; font-family: 'Work Sans', sans-serif; border: 1px solid grey; /* Green */ }

#button:hover { background-color: #f6f6f6; border: 1px solid black; }

.label_radio { text-align: center; }

td, tr, th { border: 1px solid black; } table { border-collapse: collapse; } td, th { min-width: 50px; height: 21px; } .table_span_x, .table_span_y { width: 100%; display: block; }

words_table {

color: black; font-family: Raleway; max-width: 350px; margin: 25px auto; line-height: 1.75; padding-left: 20px; }

summary_table {

color: black; font-family: Raleway; max-width: 550px; margin: 25px auto; line-height: 1.75; padding-left: 20px; }

.label_radio { text-align: center; }

text_area_input {

padding: 0 50px; }

textarea, textarea:focus { outline: 1px solid #aeaeae; } Асимметрия — это мера асимметрии набора данных или распределения. Это значение может быть положительным или отрицательным. Отрицательная асимметрия обычно указывает на то, что хвост находится в левой части распределения. Положительное значение обычно указывает на то, что хвост находится справа.

Эксцесс — это просто мера «хвостости» набора данных или распределения. Формула эксцесса, используемая этим калькулятором, идентична формуле, используемой в Excel, которая находит так называемый избыточный эксцесс .

Чтобы найти асимметрию и эксцесс набора данных, просто введите значения, разделенные запятыми, в поле ниже, затем нажмите кнопку «Рассчитать».

//define addition function function add(a, b) { return a + b; }

//create function that performs t test calculations function calc() {

//get user input data var input_data = document.getElementById('input_data').value.match(/\d+/g).map(Number);

//find summary statistics var n = input_data.length; var total_mean = math.mean(input_data); var total_var = math.var(input_data) var total_sd = Math.sqrt(total_var);

//calculate skewness var term1 = n / ( (n-1)*(n-2) ); var term2 = (input_data.map(function(x) { return Math.pow((x-total_mean) / total_sd, 3); })).reduce(add, 0) var skewness = term1 * term2;

//calculate kurtosis var term1 = ( n*(n+1) ) / ( (n-1)*(n-2)*(n-3) ); var term2 = ( (input_data.map(function(x) { return Math.pow(x-total_mean, 4); })).reduce(add, 0) ) / ( Math.pow(total_var, 2) ); var term3 = ( 3 * (Math.pow(n-1, 2)) ) / ( (n-2)*(n-3) ); var kurtosis = term1 * term2 - term3;

//output results document.getElementById('skewness').innerHTML = "Skewness: " + skewness.toFixed(5); document.getElementById('kurtosis').innerHTML = "Kurtosis: " + kurtosis.toFixed(5);

}