{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"probability-of-events"},"result":{"entity_type":"calculator","id":"probability-of-events","calculator_id":"probability-of-events","canonical_url":"https://tttkmbb.com/statistics/probability-of-events","name":"Probability of Two Events Calculator","title":"Probability Calculator for Two Events – A and B, A or B, Neither, Exactly One","category":"statistics","category_name":"Statistics & Probability","tool_name":"calculate_event_probabilities","featured_mcp_tool":false,"description":"Combines the probabilities of two events A and B that are either independent or mutually exclusive into the probabilities of both, at least one, exactly one, one but not the other, and neither occurring.","use_when":"You know P(A) and P(B) and how the events relate (independent or mutually exclusive) and need P(A and B), P(A or B), P(neither) or P(exactly one).","do_not_use_when":"The events are dependent with a known conditional probability (apply P(A and B) = P(A)·P(B|A) directly), you need the probability of k successes in repeated trials (use binomial-distribution), or you need an expected payoff (use expected-value).","inputs":[{"name":"probability_a","label":"P(A)","type":"number","required":true,"min":0,"max":1,"description":"Probability of event A, as a number between 0 and 1 (0.25 for 25 %).","example":0.5},{"name":"probability_b","label":"P(B)","type":"number","required":true,"min":0,"max":1,"description":"Probability of event B, between 0 and 1.","example":0.5},{"name":"relationship","label":"Relationship","type":"enum","required":false,"default":"independent","values":[{"value":"independent","label":"Independent (one does not affect the other)","aliases":["indep"]},{"value":"mutually_exclusive","label":"Mutually exclusive (cannot both happen)","aliases":["exclusive","disjoint"]}],"description":"How A and B relate: independent events multiply (P(A and B) = P(A)·P(B)); mutually exclusive events cannot occur together (P(A and B) = 0).","example":"independent"}],"outputs":[{"name":"probability_a_and_b","label":"P(A and B)","type":"number","decimals":4,"description":"Both events occur."},{"name":"probability_a_or_b","label":"P(A or B)","type":"number","decimals":4,"description":"At least one of the events occurs."},{"name":"probability_a_not_b","label":"P(A and not B)","type":"number","decimals":4,"description":"A occurs but B does not."},{"name":"probability_b_not_a","label":"P(B and not A)","type":"number","decimals":4,"description":"B occurs but A does not."},{"name":"probability_exactly_one","label":"P(exactly one)","type":"number","decimals":4,"description":"Exactly one of the two events occurs."},{"name":"probability_neither","label":"P(neither)","type":"number","decimals":4,"description":"Neither event occurs = 1 − P(A or B)."}],"input_schema":{"type":"object","properties":{"probability_a":{"description":"Probability of event A, as a number between 0 and 1 (0.25 for 25 %).","type":"number","minimum":0,"maximum":1,"examples":[0.5]},"probability_b":{"description":"Probability of event B, between 0 and 1.","type":"number","minimum":0,"maximum":1,"examples":[0.5]},"relationship":{"description":"How A and B relate: independent events multiply (P(A and B) = P(A)·P(B)); mutually exclusive events cannot occur together (P(A and B) = 0).","type":"string","enum":["independent","mutually_exclusive"],"default":"independent","examples":["independent"]}},"additionalProperties":false,"required":["probability_a","probability_b"]},"output_schema":{"type":"object","properties":{"probability_a_and_b":{"description":"Both events occur.","type":"number"},"probability_a_or_b":{"description":"At least one of the events occurs.","type":"number"},"probability_a_not_b":{"description":"A occurs but B does not.","type":"number"},"probability_b_not_a":{"description":"B occurs but A does not.","type":"number"},"probability_exactly_one":{"description":"Exactly one of the two events occurs.","type":"number"},"probability_neither":{"description":"Neither event occurs = 1 − P(A or B).","type":"number"}}},"formula":"Independent: P(A and B) = P(A)·P(B). Mutually exclusive: P(A and B) = 0. Then P(A or B) = P(A) + P(B) − P(A and B); P(A not B) = P(A) − P(A and B); P(exactly one) = P(A) + P(B) − 2·P(A and B); P(neither) = 1 − P(A or B)","method":"The identities follow from the addition rule of probability; independence is an assumption about the events, not something the calculator can check. Mutually exclusive events require P(A) + P(B) ≤ 1.","sources":[{"name":"Wikipedia – Independence (probability theory)","url":"https://en.wikipedia.org/wiki/Independence_(probability_theory)","type":"reference","retrieved_at":"2026-09-24"},{"name":"Wikipedia – Mutual exclusivity","url":"https://en.wikipedia.org/wiki/Mutual_exclusivity","type":"reference","retrieved_at":"2026-09-24"}],"freshness":{"type":"static","max_age_seconds":null,"note":"Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output."},"examples":[{"name":"Two independent coin flips (heads)","inputs":{"probability_a":0.5,"probability_b":0.5,"relationship":"independent"},"expected":{"probability_a_and_b":0.25,"probability_a_or_b":0.75,"probability_a_not_b":0.25,"probability_b_not_a":0.25,"probability_exactly_one":0.5,"probability_neither":0.25},"url":"https://tttkmbb.com/api/v1/calculate/probability-of-events?probability_a=0.5&probability_b=0.5&relationship=independent"},{"name":"Mutually exclusive 0.2 and 0.3","inputs":{"probability_a":0.2,"probability_b":0.3,"relationship":"mutually_exclusive"},"expected":{"probability_a_and_b":0,"probability_a_or_b":0.5,"probability_a_not_b":0.2,"probability_exactly_one":0.5,"probability_neither":0.5},"url":"https://tttkmbb.com/api/v1/calculate/probability-of-events?probability_a=0.2&probability_b=0.3&relationship=mutually_exclusive"}],"faq":[{"q":"What is the difference between independent and mutually exclusive?","a":"Independent events do not influence each other (rolling a die twice); mutually exclusive events cannot happen together (rolling a 1 and rolling a 6 on the same roll). Two events with non-zero probability cannot be both."},{"q":"Can I enter percentages?","a":"No, enter fractions between 0 and 1: 0.3 for 30 %. The outputs are fractions as well."}],"tags":["probability of two events","and or probability","independent events","mutually exclusive","at least one probability"],"related":[{"calculator_id":"binomial-distribution","reason":"Probability of k successes in repeated independent trials."},{"calculator_id":"expected-value","reason":"Average outcome of a probabilistic payoff."}],"links":{"html":"https://tttkmbb.com/statistics/probability-of-events","markdown":"https://tttkmbb.com/statistics/probability-of-events.md","json":"https://tttkmbb.com/statistics/probability-of-events.json","api":"https://tttkmbb.com/api/v1/calculate/probability-of-events","schema":"https://tttkmbb.com/api/v1/calculators/probability-of-events","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-24"},"timestamp":"2026-09-23T23:34:56Z"}