Kalkulator przerw w pakiecie
Próbka 1
Próbka 2
Połączona wariancja = 59,905303
//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 t-test function calc() { if (document.getElementById('summary').checked) { var s1 = +document.getElementById('s1').value; var n1 = +document.getElementById('n1').value; var s2 = +document.getElementById('s2').value; var n2 = +document.getElementById('n2').value;
var df = n1-(-1*n2)-2; var pooled = Math.sqrt(((n1-1)*Math.pow(s1,2) - (-1*((n2-1)*Math.pow(s2,2))))/df); var pooled2 = pooled*pooled;
document.getElementById('pooled').innerHTML = pooled2.toFixed(6); } else { var raw1 = document.getElementById('rawData1').value.split(',').map(Number); var raw2 = document.getElementById('rawData2').value.split(',').map(Number); var s1 = math.std(raw1); var n1 = raw1.length; var s2 = math.std(raw2); var n2 = raw2.length;
var df = n1-(-1*n2)-2; var pooled = Math.sqrt(((n1-1)*Math.pow(s1,2) - (-1*((n2-1)*Math.pow(s2,2))))/df); var pooled2 = pooled*pooled;
document.getElementById('pooled').innerHTML = pooled2.toFixed(6); }
//output results }