CALCULATORCASTLE

Probability Calculator

Calculate probability of events occurring in various scenarios.

About

Probability Calculator

Four calculators sit above this. The first takes P(A) and P(B) for two independent events and returns every related probability, each with the region of the Venn diagram it describes shaded in. The second runs the same relationships backwards, so any two values give you the other six. The third handles an event repeated a set number of times, and the fourth finds the area under a normal curve between two bounds along with a table of confidence intervals.

What a probability is

A probability measures how likely something is, as a number between 0 and 1. Zero means the event cannot happen and 1 means it is certain, so the closer to 1 the number sits, the more confident you can be. In the simplest case it is the count of outcomes you want divided by the count of outcomes there are: one face of a fair six-sided die is 1/6, or about 0.167.

What complicates that plain definition is the relationship between events. Two events can be independent, mutually exclusive, or conditional on one another, and each case changes the arithmetic. The first two calculators above assume independence, which means the outcome of one tells you nothing about the other.

The complement

The complement of A, written P(A′), is the probability that A does not happen. Since A either happens or it does not, the two must add to 1:

P(A)=1P(A)

If P(A) = 0.65 is the probability that Bob skips his homework, then the probability he does it is 1 − 0.65 = 0.35. Complements are the quiet workhorse of probability, because the thing you want is often far easier to reach through what you do not want.

One warning: P(A′) is about A alone. It says nothing about B. If P(A) = 0.65 then P(B) can be 0.35, or 0.30, or anything else at all.

Intersection: both events happen

The intersection P(A ∩ B) is the probability that A and B both occur. For independent events the two probabilities multiply:

P(AB)=P(A)×P(B)

Two dice both landing on 6 is 1/6 × 1/6 = 1/36, or about 0.0278. Rolling a 4 and a 6 on a single roll of one die is a different matter: one roll produces one number, so those events are mutually exclusive and their intersection is 0.

Multiplication only works when the events are independent. When one outcome changes the odds of the other they are dependent, and you need conditional probability, written P(B|A) and read as the probability of B given that A has happened.

Take a bag of 10 marbles, 7 black and 3 blue. Drawing a blue one first is P(A) = 3/10. If that marble stays out of the bag, only 9 remain and 7 of them are black, so the probability the second draw is black is P(B|A) = 7/9 rather than 7/10. The chain rule then gives the probability of blue followed by black:

P(A ∩ B) = P(A) × P(B|A) = (3/10) × (7/9) = 0.2333

Put the first marble back and the bag returns to its starting state, the draws become independent again, and the answer changes to 3/10 × 7/10 = 0.21. Whether you replace what you take is the whole difference, and it is the detail most often skipped.

Union: at least one event happens

The union P(A ∪ B) is the probability that A happens, or B happens, or both. This is the inclusive OR, and the formula has to subtract the overlap or it gets counted twice:

P(AB)=P(A)+P(B)P(AB)

Rolling a die, let A be an even number and B a multiple of 3. Then P(A) = 3/6 for {2, 4, 6} and P(B) = 2/6 for {3, 6}, and the two share the outcome 6, so P(A ∩ B) = 1/6. The union is 3/6 + 2/6 − 1/6 = 2/3. Adding the first two alone would give 5/6, counting the 6 twice.

When the events are mutually exclusive there is no overlap to remove and the formula collapses to P(A) + P(B). An even number and an odd number on one roll are mutually exclusive, and 3/6 + 3/6 = 1, which is right, since every roll is one or the other.

Exclusive OR: one but not both

The symmetric difference P(AΔB), also called the exclusive OR, is the probability that exactly one of the two happens. It removes the overlap twice, once from each event:

P(AΔB)=P(A)+P(B)2P(AB)

Two buckets of sweets sit on a doorstep at Halloween with a sign saying take a Snickers or a Reese's but not both. If the probability of a Reese's being taken is 0.65 and a Snickers 0.349, then P(AΔB) = 0.65 + 0.349 − 2 × 0.65 × 0.349 = 0.5453. There is roughly a 54.5% chance exactly one of the two is chosen, and the difference between that and the 0.999 of the plain union is entirely the children who take both.

Repeating an event, and the "at least once" trap

The third calculator handles an event repeated n times. Every repetition happening is p multiplied by itself n times. The one people get wrong is the probability of it happening at least once, which is not n × p. Work through the complement instead: the chance of it never happening is (1 − p) to the power n, so

P(at least one)=1(1p)n

An event with probability 0.6 repeated 5 times never happens with probability 0.45 = 0.01024, so it happens at least once with probability 0.98976. The naive multiplication would have given 3.0, which is not even a probability.

This is why rare risks accumulate. Something with a 1 in 100 chance per attempt has about a 63% chance of turning up at least once over 100 attempts, since 0.99100 is roughly 0.366. It is also why the naive reading of independence goes wrong in the other direction: a fair coin that has landed heads nine times running still has probability 0.5 on the tenth throw, because the coin has no memory. Expecting it to correct itself is the gambler's fallacy.

The normal distribution

The normal, or Gaussian, distribution is a continuous distribution that follows the function:

f(x)=12πσ2e(xμ)22σ2

μ is the mean and σ² is the variance, with σ the standard deviation. When μ = 0 and σ = 1 it is called the standard normal distribution, which is what the fourth calculator loads by default.

It describes a great many measurements that cluster around a middle value: heights, leaf sizes, measurement errors, test scores. The curve is symmetric about the mean, and the total area under it is exactly 1, so the area between two points is the probability of landing between them.

To use a standard table you first standardise, converting a raw value to a z-score, which counts how many standard deviations it sits from the mean:

z=xμσ

Suppose student heights have a mean of 68 inches and a standard deviation of 4. For 60 inches, z = (60 − 68) / 4 = −2. For 72 inches, z = (72 − 68) / 4 = 1. The table below gives the area from the mean out to z: 0.47725 for z = 2 and 0.34134 for z = 1. Since the two lie on opposite sides of the mean, add them, giving 0.81859. So about 81.9% of the students are between 60 and 72 inches tall.

Three landmarks are worth memorising, since they let you sanity-check any answer. About 68% of the distribution lies within one standard deviation of the mean, about 95% within two, and about 99.7% within three. The calculator's default of −1 to 1 returns 0.68269, which is that first figure.

Confidence intervals

The table of confidence intervals answers the reverse question. Rather than asking what area lies between two bounds, it asks how many standard deviations you must go out to capture a given share of the distribution. For 95% the answer is 1.95996, which is where the familiar "roughly two standard deviations" comes from.

Notice how the cost rises. Going from 95% to 99% takes you from 1.95996 to 2.57583, a small move. Going from 99.9% to 99.999% takes you from 3.29053 to 4.41717. Chasing the last fraction of a percent pushes the interval out a long way, which is the practical reason 95% became the convention rather than anything deeper.

Reading the Z-table

The table below gives the area under the standard normal curve between the mean and z. Find the first two digits of your z-score down the left column and the second decimal along the top. For z = 2.11, read down to the 2.1 row and across to the 0.01 column to get 0.48257.

The table lists positive values only, which is enough because the curve is symmetric. The area from 0 out to −2 is identical to the area from 0 out to 2. Only the distance from the mean matters, not the direction. Be aware that other z-tables are printed to different conventions, some giving the area to the left of z rather than from the mean, so check which one you are holding before you trust a number off it.

z0.000.010.020.030.040.050.060.070.080.09
0.000.003990.007980.011970.015950.019940.023920.02790.031880.03586
0.10.039830.04380.047760.051720.055670.059620.063560.067490.071420.07535
0.20.079260.083170.087060.090950.094830.098710.102570.106420.110260.11409
0.30.117910.121720.125520.12930.133070.136830.140580.144310.148030.15173
0.40.155420.15910.162760.16640.170030.173640.177240.180820.184390.18793
0.50.191460.194970.198470.201940.20540.208840.212260.215660.219040.2224
0.60.225750.229070.232370.235650.238910.242150.245370.248570.251750.2549
0.70.258040.261150.264240.26730.270350.273370.276370.279350.28230.28524
0.80.288140.291030.293890.296730.299550.302340.305110.307850.310570.31327
0.90.315940.318590.321210.323810.326390.328940.331470.333980.336460.33891
1.00.341340.343750.346140.348490.350830.353140.355430.357690.359930.36214
1.10.364330.36650.368640.370760.372860.374930.376980.3790.3810.38298
1.20.384930.386860.388770.390650.392510.394350.396170.397960.399730.40147
1.30.40320.40490.406580.408240.409880.411490.413090.414660.416210.41774
1.40.419240.420730.42220.423640.425070.426470.427850.429220.430560.43189
1.50.433190.434480.435740.436990.438220.439430.440620.441790.442950.44408
1.60.44520.44630.447380.448450.44950.450530.451540.452540.453520.45449
1.70.455430.456370.457280.458180.459070.459940.46080.461640.462460.46327
1.80.464070.464850.465620.466380.467120.467840.468560.469260.469950.47062
1.90.471280.471930.472570.47320.473810.474410.4750.475580.476150.4767
2.00.477250.477780.478310.478820.479320.479820.48030.480770.481240.48169
2.10.482140.482570.4830.483410.483820.484220.484610.4850.485370.48574
2.20.48610.486450.486790.487130.487450.487780.488090.48840.48870.48899
2.30.489280.489560.489830.49010.490360.490610.490860.491110.491340.49158
2.40.49180.492020.492240.492450.492660.492860.493050.493240.493430.49361
2.50.493790.493960.494130.49430.494460.494610.494770.494920.495060.4952
2.60.495340.495470.49560.495730.495850.495980.496090.496210.496320.49643
2.70.496530.496640.496740.496830.496930.497020.497110.49720.497280.49736
2.80.497440.497520.49760.497670.497740.497810.497880.497950.498010.49807
2.90.498130.498190.498250.498310.498360.498410.498460.498510.498560.49861
3.00.498650.498690.498740.498780.498820.498860.498890.498930.498960.499
3.10.499030.499060.49910.499130.499160.499180.499210.499240.499260.49929
3.20.499310.499340.499360.499380.49940.499420.499440.499460.499480.4995
3.30.499520.499530.499550.499570.499580.49960.499610.499620.499640.49965
3.40.499660.499680.499690.49970.499710.499720.499730.499740.499750.49976
3.50.499770.499780.499780.499790.49980.499810.499810.499820.499830.49983
3.60.499840.499850.499850.499860.499860.499870.499870.499880.499880.49989
3.70.499890.49990.49990.49990.499910.499910.499920.499920.499920.49992
3.80.499930.499930.499930.499940.499940.499940.499940.499950.499950.49995
3.90.499950.499950.499960.499960.499960.499960.499960.499960.499970.49997
4.00.499970.499970.499970.499970.499970.499970.499980.499980.499980.49998

Reading your result

Check first that your events really are independent, because the first three calculators assume it throughout. Cards dealt without shuffling back in, marbles kept out of the bag, and anything where one outcome changes the setup for the next are dependent, and P(A) × P(B) will overstate or understate the answer.

Then match the question to the row. P(A ∪ B) allows both events; P(AΔB) does not. Those two get mixed up more than any other pair on this page, which is why each row of the results table carries the Venn region it refers to.

For a normal probability, sanity-check against the 68-95-99.7 landmarks before using the figure. If your bounds sit roughly one standard deviation either side of the mean and the answer is not near 0.68, the mean or the standard deviation has been entered wrong.

Common questions

Frequently asked questions

P(A∪B), the union, is the probability that A happens or B happens or both. P(AΔB), the exclusive OR, is the probability that exactly one of them happens and excludes the overlap. On P(A) = 0.5 and P(B) = 0.4 the union is 0.7 and the exclusive OR is 0.5, and the 0.2 difference is the chance of both.

For independent events, multiply: P(A ∩ B) = P(A) × P(B). Two dice both landing on 6 is 1/6 × 1/6 = 1/36. If the events are dependent, use P(A) × P(B|A) instead, where P(B|A) is the probability of B once A has already happened.

Two events are independent when the outcome of one tells you nothing about the other, so the probability of the second does not change once the first has happened. Coin flips and dice rolls are independent. Drawing cards without replacing them is not, because each draw changes what is left.

Because that double-counts the cases where it happens more than once, and it can exceed 1, which no probability can. Work through the complement: the chance of it never happening is (1 − p) to the power n, so at least once is 1 minus that. At p = 0.6 over 5 tries that is 1 − 0.4⁵ = 0.98976.

Events that cannot both happen at once, so their intersection is 0. Rolling a 4 and a 6 on a single roll of one die is mutually exclusive. For these the union formula simplifies to P(A) + P(B), because there is no overlap to subtract.

A z-score counts how many standard deviations a value sits from the mean: z = (x − μ) ÷ σ. It converts any normal distribution to the standard one so a single table works for all of them. A height of 60 inches in a distribution with mean 68 and standard deviation 4 has z = −2.

About 68% of a normal distribution lies within one standard deviation of the mean, about 95% within two and about 99.7% within three. It is the quickest sanity check on any normal probability. The calculator returns 0.68269 for bounds of −1 and 1 on the standard normal, which is the first of the three.

No. Each flip is independent, so the tenth is still 0.5. The coin has no memory of the previous nine and nothing forces a correction. Expecting one is the gambler's fallacy, and it is the most expensive misunderstanding in this whole subject.