Mann-Whitney U Test Calculator

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

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

h1 {
text-align: center;
font-size: 50px;
margin-bottom: 0px;
font-family: ‘Raleway’, 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-left: 35%;
float: left;
}

textarea, textarea:focus {
margin-right: 5px;
width: 85px;
outline: 1px solid #aeaeae;
}

A Mann-Whitney U test is used to compare the differences between two independent samples when the sample distributions are not normally distributed and the sample sizes are small (n

Tutorial:

To conduct a Mann-Whitney U test for two independent samples, simply enter the data values below and click the “Calculate” button.

Sample 1 || Sample 2

//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);
}

x
Scroll to Top