The Two Sample Z-Test Calculator is a statistical tool used to compare the means of two independent samples. It calculates the z-score, a measure of how many standard deviations a data point is away from the mean, for each sample and determines whether there is a significant difference between the two means. This calculator is commonly used in research and data analysis to determine if there is a significant difference between two groups or populations, and to make conclusions about the effectiveness of a particular intervention or treatment. It is a useful tool for making informed decisions in various fields such as healthcare, business, and social sciences.
Two Sample Z-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;
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_calc {
color: black;
font-family: Raleway;
max-width: 550px;
margin: 25px auto;
line-height: 1.75;
padding-left: 100px;
}
#words_calc input {
display: inline-block;
vertical-align: baseline;
width: 350px;
max-height: 35px;
}
#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, #words input {
display: inline-block;
vertical-align: baseline;
width: 350px;
max-height: 35px;
}
#buttonCalc {
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 */
}
#buttonCalc:hover {
background-color: #f6f6f6;
border: 1px solid black;
}
#words_output {
text-align: center;
}
#solution_div {
text-align: center;
}
#words_intro {
color: black;
font-family: Raleway;
max-width: 550px;
margin: 25px auto;
line-height: 1.75;
}
#words_table {
color: black;
font-family: Raleway;
max-width: 350px;
margin: 25px auto;
line-height: 1.75;
}
.text_areas {
color: black;
font-family: Raleway;
max-width: 350px;
margin: 25px auto;
line-height: 1.75;
}
.label_radio {
text-align: center;
}
Sample 1
Sample 2
z = -1.608761
p-value (one-tailed) = 0.060963
p-value (two-tailed) = 0.121926
//set summary table to hidden to start
var summary_display = document.getElementById(“summary_table”);
summary_display.style.display = “none”;
//find which radio button is checked
function check() {
if (document.getElementById(‘raw’).checked) {
var table_display = document.getElementById(“words_table”);
table_display.style.display = “block”;
var summary_display = document.getElementById(“summary_table”);
summary_display.style.display = “none”;
} else {
var table_display = document.getElementById(“words_table”);
table_display.style.display = “none”;
var summary_display = document.getElementById(“summary_table”);
summary_display.style.display = “block”;
}
} //end check
//perform one-sample z-test
function calc() {
if (document.getElementById(‘summary’).checked) {
var x1 = +document.getElementById(‘x1’).value;
var s1 = +document.getElementById(‘s1’).value;
var n1 = +document.getElementById(‘n1’).value;
var x2 = +document.getElementById(‘x2’).value;
var s2 = +document.getElementById(‘s2’).value;
var n2 = +document.getElementById(‘n2’).value;
var z = (x1-x2)/(Math.sqrt((s1*s1)/n1 – (-1*(s2*s2)/n2)));
var p1 = jStat.ztest(z)/2;
var p2 = p1*2;
document.getElementById(‘z’).innerHTML = z.toFixed(6);
document.getElementById(‘p1’).innerHTML = p1.toFixed(6);
document.getElementById(‘p2’).innerHTML = p2.toFixed(6);
} else {
var raw1 = document.getElementById(‘rawData1’).value.split(‘,’).map(Number);
var raw2 = document.getElementById(‘rawData2’).value.split(‘,’).map(Number);
var x1 = math.mean(raw1)
var s1 = +document.getElementById(‘s1’).value;
var n1 = raw1.length;
var x2 = math.mean(raw2)
var s2 = +document.getElementById(‘s2’).value;
var n2 = raw2.length;
var z = (x1-x2)/(Math.sqrt((s1*s1)/n1 – (-1*(s2*s2)/n2)));
var p1 = jStat.ztest(z)/2;
var p2 = p1*2;
document.getElementById(‘z’).innerHTML = z.toFixed(6);
document.getElementById(‘p1’).innerHTML = p1.toFixed(6);
document.getElementById(‘p2’).innerHTML = p2.toFixed(6);
}
//output results
}
Cite this article
stats writer (2024). What is the Two Sample Z-Test Calculator used for?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/what-is-the-two-sample-z-test-calculator-used-for/
stats writer. "What is the Two Sample Z-Test Calculator used for?." PSYCHOLOGICAL SCALES, 27 Jun. 2024, https://scales.arabpsychology.com/stats/what-is-the-two-sample-z-test-calculator-used-for/.
stats writer. "What is the Two Sample Z-Test Calculator used for?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/what-is-the-two-sample-z-test-calculator-used-for/.
stats writer (2024) 'What is the Two Sample Z-Test Calculator used for?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/what-is-the-two-sample-z-test-calculator-used-for/.
[1] stats writer, "What is the Two Sample Z-Test Calculator used for?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.
stats writer. What is the Two Sample Z-Test Calculator used for?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.
