حاسبة توزيع الأسماك
ف(س = 3 ): 0.14037
ف(س < 3 ): 0.12465
ف(س ≥ 3 ): 0.26503
ف(س > 3 ): 0.73497
ف(X ≥ 3 ): 0.87535
function calc() {
//get input values var x = +document.getElementById('x').value; var mean = +document.getElementById('mean').value;
//calculate SE var exactP = jStat.poisson.pdf(x, mean); var lessP = jStat.poisson.cdf(x-1, mean); var lessEP = jStat.poisson.cdf(x, mean); var greatP = 1-jStat.poisson.cdf(x, mean); var greatEP = 1-jStat.poisson.cdf(x-1, mean);
//output probabilities document.getElementById('exactP').innerHTML = exactP.toFixed(5); document.getElementById('lessP').innerHTML = lessP.toFixed(5); document.getElementById('lessEP').innerHTML = lessEP.toFixed(5); document.getElementById('greatP').innerHTML = greatP.toFixed(5); document.getElementById('greatEP').innerHTML = greatEP.toFixed(5);
document.getElementById('x1').innerHTML = x; document.getElementById('x2').innerHTML = x; document.getElementById('x3').innerHTML = x; document.getElementById('x4').innerHTML = x; document.getElementById('x5').innerHTML = x; }