Ein-proportion-z-test-rechner
- p = beobachteter Probenanteil
- p 0 = hypothetischer Anteil der Bevölkerung
- n = Stichprobengröße
Z-Statistik: 0,55487
p-Wert (einseitig): 0,28949
p-Wert (2-seitig): 0,57898
95 %-KI = [ 0,2914 , 0,6486 ]
function calc() {
//get input values var p0 = +document.getElementById('p0').value; var p = +document.getElementById('p').value; var n = +document.getElementById('n').value;
//calculate stuff var z = (p-p0)/(Math.sqrt(p0*(1-p0)/n));
//calculate p-value if (z<0) { var p1 = jStat.normal.cdf(z, 0, 1); var p2 = p1*2; } else { var p1 = 1-jStat.normal.cdf(z, 0, 1); var p2 = p1*2; } //calculate C.I. var zCrit = Math.abs(jStat.normal.inv(.975, 0, 1)); var se = Math.sqrt(p*(1-p)/n); var low = p - (zCrit*se); var high = p - (-1*zCrit*se); //output probabilities document.getElementById('z').innerHTML = z.toFixed(5); document.getElementById('p1').innerHTML = p1.toFixed(5); document.getElementById('p2').innerHTML = p2.toFixed(5); document.getElementById('low').innerHTML = low.toFixed(4); document.getElementById('high').innerHTML = high.toFixed(4); }