standarddeviationcalculator.net

Updated Free · runs in your browser

Statistics

Probability calculator

Enter the probabilities of two events to get every combination: both, either, exactly one, neither and each conditional probability, with a Venn diagram. Or switch to a single event repeated n times to find the chance it happens at least once.

Decimal, fraction or percentage: 0.5, 1/2 or 50%.

P(A ∪ B), A or B or both 0.7
P(A ∩ B), both0.2
P(A ∪ B), at least one0.7
P(exactly one), A xor B0.5
P(neither)0.3
P(A′), not A0.5
P(B′), not B0.6
P(A | B)0.5
P(B | A)0.4
AB 0.30.20.2 neither 0.3
EventFormulaProbability%
A and BP(A∩B)0.220%
A or BP(A) + P(B) − P(A∩B)0.770%
A onlyP(A) − P(A∩B)0.330%
B onlyP(B) − P(A∩B)0.220%
Exactly oneP(A∪B) − P(A∩B)0.550%
Neither1 − P(A∪B)0.330%
A given BP(A∩B) ÷ P(B)0.550%
B given AP(A∩B) ÷ P(A)0.440%
Show the working, step by step
  1. Intersection (both happen).

    Independent events: P(A∩B) = P(A) × P(B) = 0.5 × 0.4 = 0.2

  2. Union by the addition rule: add the two, then remove the overlap counted twice.

    P(A∪B) = 0.5 + 0.4 − 0.2 = 0.7

  3. Complements.

    P(A′) = 1 − 0.5 = 0.5, P(B′) = 1 − 0.4 = 0.6 P(neither) = 1 − P(A∪B) = 1 − 0.7 = 0.3

  4. Exactly one of the two.

    P(A xor B) = P(A∪B) − P(A∩B) = 0.7 − 0.2 = 0.5

  5. Conditional probabilities.

    P(A|B) = P(A∩B) ÷ P(B) = 0.2 ÷ 0.4 = 0.5 P(B|A) = P(A∩B) ÷ P(A) = 0.2 ÷ 0.5 = 0.4

The rules

EventFormula
Not A (complement)P(A′) = 1 − P(A)
A and B, independentP(A ∩ B) = P(A) × P(B)
A and B, generalP(A ∩ B) = P(A) × P(B|A)
A or BP(A ∪ B) = P(A) + P(B) − P(A ∩ B)
Exactly oneP(A ∪ B) − P(A ∩ B)
Neither1 − P(A ∪ B)
A given BP(A|B) = P(A ∩ B) ÷ P(B)
At least once in n tries1 − (1 − p)ⁿ

A worked example

The default: P(A) = 0.5 and P(B) = 0.4, independent.

  1. Both: P(A ∩ B) = 0.5 × 0.4 = 0.2.
  2. Either: P(A ∪ B) = 0.5 + 0.4 − 0.2 = 0.7.
  3. Exactly one: 0.7 − 0.2 = 0.5. Neither: 1 − 0.7 = 0.3.
  4. A given B: 0.2 ÷ 0.4 = 0.5, the same as P(A). That is what independence means.

If instead the events are known to overlap with P(A ∩ B) = 0.15 (choose “P(A∩B) known”), the union becomes 0.5 + 0.4 − 0.15 = 0.75, neither is 0.25, and P(A|B) = 0.15 ÷ 0.4 = 0.375. Since 0.375 is less than P(A), B happening makes A less likely: the events are not independent.

At least one in n tries

P(at least once) = 1 − (1 − p)ⁿ

The default repeated-event example is rolling at least one six in four throws. The chance of no six on one throw is 5/6, so the chance of none in four is (5/6)⁴ = 0.4823 and the chance of at least one is 0.5177. The chance of exactly one six is 4 × (1/6) × (5/6)³ = 0.3858. This works only when the tries are independent and p stays the same each time.

Checks the calculator makes

  • Every probability must lie between 0 and 1.
  • P(A ∩ B) cannot be larger than P(A) or P(B), and it cannot be smaller than P(A) + P(B) − 1, or the union would exceed 1.
  • Mutually exclusive events must have P(A) + P(B) ≤ 1.
  • A conditional probability given an event of probability 0 is undefined.

Common mistakes

  • Adding without subtracting the overlap. P(A) + P(B) alone overstates P(A ∪ B) unless the events are mutually exclusive.
  • Multiplying probabilities of dependent events. P(A) × P(B) gives P(A ∩ B) only for independent events; otherwise use P(A) × P(B|A).
  • Adding repeated chances. Ten tries at 10% is not a 100% chance; it is 1 − 0.9¹⁰ = 0.651.

Common questions

How do I find the probability of A or B?

Use the addition rule: P(A ∪ B) = P(A) + P(B) − P(A ∩ B). The overlap is subtracted because adding P(A) and P(B) counts the outcomes where both happen twice. Only when A and B are mutually exclusive (cannot happen together) is it simply P(A) + P(B).

What is the difference between independent and mutually exclusive?

Independent means one event happening does not change the probability of the other, so P(A ∩ B) = P(A) × P(B). Mutually exclusive means they cannot both happen, so P(A ∩ B) = 0. Two events with non-zero probabilities cannot be both: if A and B are mutually exclusive, learning that A happened tells you B did not, which is the opposite of independence.

What is the probability of at least one success in n tries?

1 − (1 − p)n. Work out the chance of no successes at all, then subtract from 1. For at least one six in four rolls of a die: 1 − (5/6)4 = 1 − 0.4823 = 0.5177, just better than even. Multiplying 1/6 by 4 gives 0.667, which is wrong because it counts rolls with two or more sixes more than once.

What does 'neither' mean, and how is it different from 'not both'?

“Neither A nor B” is 1 − P(A ∪ B): the outcomes outside both circles of the Venn diagram. “Not both” is 1 − P(A ∩ B), which includes the outcomes where exactly one happens. With the default independent events, neither = 0.3 and not both = 0.8.

Can I enter percentages or fractions?

Yes. 0.25, 1/4 and 25% are all read as the same probability. A number above 1 without a % sign is rejected, because a probability cannot exceed 1.