Kalkulator dystrybucji f
function fPVALUE() {
//get input values var df1 = document.getElementById('df1').value*1; var df2 = document.getElementById('df2').value*1; var f = document.getElementById('f').value*1; var prob = document.getElementById('prob').value;
//assign probabilities to variable names var exactProb = 1-jStat.centralF.cdf(f, df1, df2);
//output probabilities document.getElementsByName('prob')[0].value = exactProb.toFixed(5); }
function fCRITICALVALUE() {
//get input values var df1 = document.getElementById('df1').value*1; var df2 = document.getElementById('df2').value*1; var f = document.getElementById('f').value*1; var prob = document.getElementById('prob').value;
//assign probabilities to variable names var exactF = jStat.centralF.inv((1-prob), df1, df2);
//output probabilities document.getElementsByName('f')[0].value = exactF.toFixed(5); }