Probability Calculator
Enter the probability of two events and get the chance of both, either, neither, only one, and the conditional probabilities. Choose independent
Try your own numbers
Estimate only. Not engineering or safety advice. Check the result against the applicable standard and the equipment data, and have a competent engineer review it before it is relied on. Terms of use.
Open in the calculator with these values
About this calculator
This page calculates P, both happen, P, at least one happens, P and 8 more results from probability of event A, probability of event B, how A and B are related, probability of A and B together and 1 more input. Change any value or its unit and the result updates. The steps below show the working for the default values, so you can check each line against your own method.
Limits of this calculator
Use this to estimate the chance that two protective devices both fail, that at least one of several redundant units works, or that a fault event occurs at least once over a number of attempts. For the spread of a set of readings use the standard deviation calculator, and for the average of readings use the mean, median and mode calculator.
Cross-check: 50 reference cases, calculated from textbook formulas coded separately from the engine by the same author, agree with this calculator. This is not an independent review.
Verification status: Engineering reference
Engineering reference. Formula and method documented and tested against separately coded reference calculations. Not yet Verified: the evidence listed on this page is still needed.
What this calculator checks
- The arithmetic of the published formula for the values you entered, in the units shown.
What remains unverified
- That the inputs suit your application. Take ratings, resistances and constants from the manufacturer data sheet or project specification.
Verification register entry
| Calculation author | Rahul Sharma (author) |
|---|---|
| Technical review | No independent technical review has been carried out |
| Individual professional approval | Not recorded |
| Formula reference | not recorded |
| Standard and edition | Not applicable: Pure mathematics or statistics; no electrical standard governs the method |
| Standard review state | Not applicable |
| Scope-screening note | not recorded |
| Cross-check test cases | 50 reference vectors (tests/reference_vectors.json) |
| Review date | not recorded |
| Next review date | not recorded |
| Status | Engineering reference |
Needed before this calculator can be marked Verified: reviewer name, qualification and review date; exact formula reference; formula source (textbook or standard); next review date.
Formula
Worked example
| Input | Value |
|---|---|
| Probability of event A | 0.3 |
| Probability of event B | 0.5 |
| How A and B are related | Independent (one does not affect the other) |
| Repeated independent trials of A | 5 |
- Independent: P(A and B) = P(A) × P(B) = 0.15
- P(A or B) = P(A) + P(B) − P(A and B) = 0.3 + 0.5 − 0.15 = 0.65
- P(neither) = 1 − P(A or B) = 0.35 P(A but not B) = 0.15 P(B but not A) = 0.35
- P(A given B) = P(A and B) / P(B) = 0.3
- P(B given A) = P(A and B) / P(A) = 0.5
- In 5 independent trials: P(A every time) = P(A)ⁿ = 0.00243 P(A at least once) = 1 − (1 − P(A))ⁿ = 0.83193
Assumptions
- Probabilities are numbers from 0 to 1 (multiply by 100 for a percentage); the events are well defined and their probabilities are known or estimated
- Independent events do not affect each other, so the chance of both is the product. Two components that fail for unrelated reasons are independent; two that share a power supply are not
- Mutually exclusive events cannot both happen, so the chance of either is the sum and the chance of both is zero; this needs P(A) + P(B) not above 1
- For overlapping events you enter P(A and B) yourself. It must lie between the larger of 0 and P(A) + P(B) − 1 and the smaller of P(A) and P(B)
- A conditional probability has no value when the event it is conditioned on has probability zero, and is shown as a dash with a note
- The repeated-trials figures assume each trial is independent and has the same probability of A. They do not model wear-out, repair or common-cause failures
Use this to estimate the chance that two protective devices both fail, that at least one of several redundant units works, or that a fault event occurs at least once over a number of attempts. For the spread of a set of readings use the standard deviation calculator, and for the average of readings use the mean, median and mode calculator.
Inputs and results
| Input | Unit | Allowed or shown | Note |
|---|---|---|---|
| Probability of event A | (number) | 0 or more, up to 1 | A number from 0 to 1. For 30% enter 0.3. 0 means impossible and 1 means certain. |
| Probability of event B | (number) | 0 or more, up to 1 | A number from 0 to 1, in the same way as event A. |
| How A and B are related | (choice) | Independent (one does not affect the other); Mutually exclusive (they cannot both happen); Overlapping, with P(A and B) known | |
| Probability of A and B together (overlapping events only) | (number) | 0 or more, up to 1; may be left blank | Used only when the events are overlapping. It cannot exceed the smaller of A and B, and cannot be less than P(A) + P(B) − 1. |
| Repeated independent trials of A | (number) | 1 or more, up to 1,000,000 | A whole number. Gives the chance that A happens every time, and at least once, in this many independent trials. |
| Result | Unit | Allowed or shown | Note |
|---|---|---|---|
| P(A and B), both happen | (number) | Shown to 10 decimal places | |
| P(A or B), at least one happens | (number) | Shown to 10 decimal places | |
| P(neither A nor B) | (number) | Shown to 10 decimal places | |
| P(A but not B) | (number) | Shown to 10 decimal places | |
| P(B but not A) | (number) | Shown to 10 decimal places | |
| P(not A) | (number) | Shown to 10 decimal places | |
| P(not B) | (number) | Shown to 10 decimal places | |
| P(A given B) | (number) | Shown to 10 decimal places | |
| P(B given A) | (number) | Shown to 10 decimal places | |
| P(A every time in n trials) | (number) | Shown to 10 decimal places | |
| P(A at least once in n trials) | (number) | Shown to 10 decimal places |
How it is calculated
Each input is converted to the base unit of its quantity, the formula above is applied in the order shown in the worked example, and each result is shown in the unit you choose. Results are held at full precision and rounded only for display, except where a step selects a standard size, as the worked example shows. A value outside its allowed range is refused with a message instead of giving a result.
How the result changes with probability of event a
| Probability of event A | P(A and B), both happen | P(A or B), at least one happens | P(neither A nor B) |
|---|---|---|---|
| 0.03 | 0.015 | 0.515 | 0.485 |
| 0.075 | 0.0375 | 0.5375 | 0.4625 |
| 0.15 | 0.075 | 0.575 | 0.425 |
| 0.3 | 0.15 | 0.65 | 0.35 |
| 0.6 | 0.3 | 0.8 | 0.2 |
Other inputs are the same as in the worked example above.
Standards and further reading
Complex numbers, rectangular and polar form and angle conversion are standard mathematics, not the subject of a standard. Standards apply when the result feeds an electrical design, and they set the method there.
Frequently asked questions
What do I need to enter?
Enter probability of event A, probability of event B, how A and B are related, probability of A and B together (overlapping events only) and repeated independent trials of A. Change the unit of a value with its selector and the result stays the same.
What does this calculator assume?
Probabilities are numbers from 0 to 1 (multiply by 100 for a percentage); the events are well defined and their probabilities are known or estimated. Independent events do not affect each other, so the chance of both is the product. Two components that fail for unrelated reasons are independent; two that share a power supply are not. Mutually exclusive events cannot both happen, so the chance of either is the sum and the chance of both is zero; this needs P(A) + P(B) not above 1. For overlapping events you enter P(A and B) yourself. It must lie between the larger of 0 and P(A) + P(B) − 1 and the smaller of P(A) and P(B). A conditional probability has no value when the event it is conditioned on has probability zero, and is shown as a dash with a note. The repeated-trials figures assume each trial is independent and has the same probability of A. They do not model wear-out, repair or common-cause failures.
Which calculators should I use next?
Common next steps are Mean, Median and Mode, Standard Deviation and Variance, Percentage Calculator and Ratio Calculator. The related links at the bottom of this page open them.
How accurate are the results?
Every figure comes from the same tested engine as the Elecmetric calculators and is meant for estimating. 50 reference cases, calculated from textbook formulas coded separately from the engine by the same author, agree with this calculator. This is not an independent review. Check design values against the standard and the equipment data you work to.
Formula guides and reference
Longer explanations with worked examples and tables, written for the same topic.
- Probability, Combinations and Binomial Formulas: Probability formulas for reliability and test work: two events, repeated trials, permutations
- Mean and Standard Deviation Formulas: Statistics formulas for test readings: mean, median, mode, range, standard deviation, variance and standard error
- Measurement Uncertainty Formulas: Measurement uncertainty formulas: the standard uncertainty of a rectangular limit
More Engineering Mathematics calculatorsAll engineering calculatorsProbability Calculator (Two Events, A and B, and Repeated Trials) in Elecmetric