세 가지 사건 확률 계산기
이 계산기는 세 가지 사건 A , B , C 와 관련된 확률을 구합니다.
아래 상자에 세 가지 사건의 확률을 입력한 다음 “계산” 버튼을 클릭하세요.
P(모든 이벤트 발생) = 0.045000
P(사건이 전혀 발생하지 않음) = 0.210000
P(적어도 하나의 사건이 발생함) = 0.790000
P(정확히 하나의 이벤트 발생) = 0.475000
function calc() { //get input values and calculate WHIP var a = document.getElementById('a').value*1; var b = document.getElementById('b').value*1; var c = document.getElementById('c').value*1;
var all = a*b*c; var none = (1-a)*(1-b)*(1-c); var atleast1 = 1-none; var exactly1 = ((a)*(1-b)*(1-c)) - (-(1-a)*(b)*(1-c)) - (-(1-a)*(1-b)*(c)); //output document.getElementById('all').innerHTML = all.toFixed(6); document.getElementById('none').innerHTML = none.toFixed(6); document.getElementById('atleast1').innerHTML = atleast1.toFixed(6); document.getElementById('exactly1').innerHTML = exactly1.toFixed(6); }