Kalkulator uji mann-whitney u
Uji Mann-Whitney U digunakan untuk membandingkan perbedaan antara dua sampel independen ketika distribusi sampel tidak terdistribusi normal dan ukuran sampel kecil (n <30). Uji ini dianggap setara dengan uji t dua sampel independen.
Tutorial: Tes Mann-Whitney U
Untuk melakukan uji Mann-Whitney U untuk dua sampel independen, cukup masukkan nilai data di bawah ini dan klik tombol “Hitung”.
//create function that performs t test calculations function calc() {
var x = document.getElementById('x').value.match(/\d+/g).map(Number); var y = document.getElementById('y').value.match(/\d+/g).map(Number);
//calculate critical value U and p-value using script from https://gist.githubusercontent.com/gungorbudak/1c3989cc26b9567c6e50/raw/f8f2918a366798793f5fb7e92de0df9142feb737/mannwhitneyu.js var t = mannwhitneyu.test(x, y, alternative = 'two-sided');
var critical_value_U = t[Object.keys(t)[0]]; var p_value_one_tail = (t[Object.keys(t)[1]]) / 2; var p_value_two_tail = t[Object.keys(t)[1]];
//--------------OUTPUT RESULTS-----------// document.getElementById('U').innerHTML = "Test statistic U: " + critical_value_U.toFixed(1); document.getElementById('p_value_one_tail').innerHTML = "One-tailed P value: " + p_value_one_tail.toFixed(5); document.getElementById('p_value_two_tail').innerHTML = "Two-tailed P value: " + p_value_two_tail.toFixed(5); }