Z スコアの比較計算ツール
- x: 個別のデータ値
- μ: 母集団平均
- σ: 母集団標準偏差
最初の値の Z スコア = ( 19 – 15 ) / 4.2 = 0.9524
2 番目の値の Z スコア = ( 17 – 14 ) / 2.6 = 1.1538
function calc() {
//get input values var x1 = +document.getElementById('x1').value; var s1 = +document.getElementById('s1').value; var v1 = +document.getElementById('v1').value; var x2 = +document.getElementById('x2').value; var s2 = +document.getElementById('s2').value; var v2 = +document.getElementById('v2').value;
//calculate stuff var z1 = (v1-x1)/s1; var z2 = (v2-x2)/s2;
//output results document.getElementById('v1out').innerHTML = v1; document.getElementById('x1out').innerHTML = x1; document.getElementById('s1out').innerHTML = s1; document.getElementById('z1').innerHTML = z1.toFixed(4); document.getElementById('v2out').innerHTML = v2; document.getElementById('x2out').innerHTML = x2; document.getElementById('s2out').innerHTML = s2; document.getElementById('z2').innerHTML = z2.toFixed(4); }