I-Calculator ye-Probability
Yenza iqembu lezimo ezimbili ezizimele: futhi, noma, noma.
Iziphetho zivuselelwa uma ubhala.
Malunga nale khadi
This probability calculator takes the chance of two independent events A and B and works out the key combined probabilities: both happening (A and B), at least one happening (A or B), only one of them, and neither happening. It assumes the events are independent, meaning one occurring does not change the chance of the other. Enter each probability as a percentage between 0 and 100.
The rules it applies are the standard ones for independent events: P(A and B) = P(A) × P(B); P(A or B) = P(A) + P(B) − P(A and B); P(neither) = (1 − P(A)) × (1 − P(B)); and "only A" is P(A) − P(A and B). A pie chart splits the sample space into the four mutually exclusive outcomes (both, A only, B only, neither).
Worked example: with P(A) = 50% and P(B) = 30%, both happen with probability 0.5 × 0.3 = 15%, at least one happens with probability 0.5 + 0.3 − 0.15 = 65%, and neither happens with probability 0.5 × 0.7 = 35%. These four outcomes always add up to 100%.
Imibuzo ebuzwa kaningi
Ngiyithola kanjani inketho yezinto ezimbili eziba khona?
Izikhathi ezizimele, ukuphindaphinda izici zabo: P(A noB) = P(A) · P(B). Isikhathi se-50% nesikhathi se-30% zombili zikhona yi-0.5 × 0.3 = 0.15, noma i-15%.
Iyini inkinga?
Ukuzimela kusho ukuthi imiphumela yesigameko esisodwa ayisebenzi kusinye - njengezinhlamvu ezimbili ezihlukanisiwe. Uma izigameko zithintana (zihlobene), lezi fomuli azisebenzi futhi ufuna ukwenzeka okunokwenzeka okunomthetho.
Ukubalwa kanjani "A noma B"?
P(A noma B) = P(A) + P(B) − P(A ne B). Ukususa ukungqubuzana kunciphisa imiphumela ehlukanisiwe esuka ekuhloleni kabili, ngakho-ke imiphumela ayikwazi ukudlula i-100%.
Ngiyithola kanjani inketho yokuthi akukho lutho oluzokwenzeka?
Ukuphindaphinda izinkinga zesigameko ngasinye esingaba khona: P(akukho) = (1 − P(A)) × (1 − P(B)). Ku-50% no-30% isigameko esingu-0.5 × 0.7 = 0.35, noma 35%.
Yini ushintsho phakathi kwe "A noma B" ne "enye kuphela yazo"?
"A noma B" kufaka phakathi isinqumo lapho zombili zikhona, ngenkathi "enye kuphela" i excludes it. "Yene kuphela" ilingana P (A noma B) minus P (A ne B), ukubalwa kwezimbili ezikhethekile-noma iziphetho kodwa hhayi ukudluliswa.
Yini uma izimo ezimbili zingekho ezizimele?
Lezi fomu zithatha ukuzimela. Uma isinqumo sithinta omunye umuntu, kufanele ucabangele isinqumo esifanele, P(A no-B) = P(A) × P(B | A), futhi le kalkuli izobe ichaza ngokugcwele noma ngokuncane isinqumo esihlangene.
Ingabe lezi zibalo zingaba ngaphezulu kwe-100%?
Izinkomba ezine ezihlukile - zombili, A kuphela, B kuphela nanoma yiziphi - zihlala zihlanganisa ngokugcwele ku-100%. Ama-figures ahlukene njenge "A noma B" angaba mkhulu, kodwa angeke adlule ku-100% ngoba ukungqubuzana kususwa.
API — sebenzisa le calculator kusuka kukhodi
Nquma le calculator njenge JSON evulekile yendawo yokuqeda - akukho isithonjana esidingekayo. Thumela amaxabiso endawo ngezansi njengezilungiselelo zombuzo noma i-JSON. Noma yini ongayishiya isebenzisa iphutha elifanayo elifakwe ngaphambili lekhasi; ipharamitha engaziwa yi-400, ayikho i-zero emnyama. Funda i-API egcwele →
Ingxenye yendawo
GET https://calculator.free/api/v1/probability/
curl
curl "https://calculator.free/api/v1/probability/?pa=50&pb=30"
JavaScript fetch()
const r = await fetch(
"https://calculator.free/api/v1/probability/?" + new URLSearchParams({
"pa": "50",
"pb": "30"
}));
const data = await r.json();
console.log(data.results);
Izibalo ziyisilinganiso esisetshenziswa ukuqondisa kuphela, hhayi ukucebisa ngezimali, ukwelashwa noma ukukhokha.