Elecmetric

Probability Calculator

Enter the probability of two events and get the chance of both, either, neither, only one, and the conditional probabilities. Choose independent

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 gives
P(A and B), both happen: 0.15 · P(A or B), at least one happens: 0.65 · P(neither A nor B): 0.35

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

What remains unverified

Verification register entry

Calculation authorRahul Sharma (author)
Technical reviewNo independent technical review has been carried out
Individual professional approvalNot recorded
Formula referencenot recorded
Standard and editionNot applicable: Pure mathematics or statistics; no electrical standard governs the method
Standard review stateNot applicable
Scope-screening notenot recorded
Cross-check test cases50 reference vectors (tests/reference_vectors.json)
Review datenot recorded
Next review datenot recorded
StatusEngineering 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

independent: P(A and B) = P(A) P(B) mutually exclusive: P(A and B) = 0 P(A or B) = P(A) + P(B) − P(A and B) P(neither) = 1 − P(A or B) P(A given B) = P(A and B) / P(B) n trials: P(every time) = P(A)ⁿ, P(at least once) = 1 − (1 − P(A))ⁿ

Worked example

InputValue
Probability of event A0.3
Probability of event B0.5
How A and B are relatedIndependent (one does not affect the other)
Repeated independent trials of A5
  1. Independent: P(A and B) = P(A) × P(B) = 0.15
  2. P(A or B) = P(A) + P(B) − P(A and B) = 0.3 + 0.5 − 0.15 = 0.65
  3. P(neither) = 1 − P(A or B) = 0.35 P(A but not B) = 0.15 P(B but not A) = 0.35
  4. P(A given B) = P(A and B) / P(B) = 0.3
  5. P(B given A) = P(A and B) / P(A) = 0.5
  6. In 5 independent trials: P(A every time) = P(A)ⁿ = 0.00243 P(A at least once) = 1 − (1 − P(A))ⁿ = 0.83193

Assumptions

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

InputUnitAllowed or shownNote
Probability of event A(number)0 or more, up to 1A 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 1A 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 blankUsed 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,000A whole number. Gives the chance that A happens every time, and at least once, in this many independent trials.
ResultUnitAllowed or shownNote
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 AP(A and B), both happenP(A or B), at least one happensP(neither A nor B)
0.030.0150.5150.485
0.0750.03750.53750.4625
0.150.0750.5750.425
0.30.150.650.35
0.60.30.80.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.

More Engineering Mathematics calculatorsAll engineering calculatorsProbability Calculator (Two Events, A and B, and Repeated Trials) in Elecmetric

Tell us how to improve this page

This opens your email app. Nothing is sent until you press send.