Probability Calculator
Summary
Probability (A and B): | 0 |
Probability (A or B): | 0 |
Probability of Two Events
Probability is the measure of the likelihood of an event occurring. It is quantified as a number between 0 and 1, with 1 signifying certainty, and 0 signifying that the event cannot occur. It follows that the higher the probability of an event, the more certain it is that the event will occur. In its most general case, probability can be defined numerically as the number of desired outcomes divided by the total number of outcomes. This is further affected by whether the events being studied are independent, mutually exclusive, or conditional, among other things. The calculator provided computes the probability that an event A or B does not occur, the probability A and/or B occur when they are not mutually exclusive, the probability that both event A and B occur, and the probability that either event A or event B occurs, but not both.
Complement of A and B
Given a probability A, denoted by P(A), it is simple to calculate the complement, or the probability that the event described by P(A) does not occur, P(A’). If, for example, P(A) = 0.65 represents the probability that Bob does not do his homework, his teacher Sally can predict the probability that Bob does his homework as follows:
P(A’) = 1 – P(A) = 1 – 0.65 = 0.35
Given this scenario, there is, therefore, a 35% chance that Bob does his homework. Any P(B’) would be calculated in the same manner, and it is worth noting that in the calculator above, can be independent; i.e. if P(A) = 0.65, P(B) does not necessarily have to equal 0.35, and can equal 0.30 or some other number.
Intersection of A and B
The intersection of events A and B, written as P(A ∩ B) or P(A AND B) is the joint probability of at least two events, shown below in a Venn diagram. In the case where A and B are mutually exclusive events, P(A ∩ B) = 0. Consider the probability of rolling a 4 and 6 on a single roll of a die; it is not possible. These events would therefore be considered mutually exclusive. Computing P(A ∩ B) is simple if the events are independent. In this case, the probabilities of events A and B are multiplied. To find the probability that two separate rolls of a die result in 6 each time:
The calculator provided considers the case where the probabilities are independent. Calculating the probability is slightly more involved when the events are dependent, and involves an understanding of conditional probability, or the probability of event A given that event B has occurred, P(A|B). Take the example of a bag of 10 marbles, 7 of which are black, and 3 of which are blue. Calculate the probability of drawing a black marble if a blue marble has been withdrawn without replacement (the blue marble is removed from the bag, reducing the total number of marbles in the bag):
Probability of drawing a blue marble:
P(A) = 3/10
Probability of drawing a black marble:
P(B) = 7/10
Probability of drawing a black marble given that a blue marble was drawn:
P(B|A) = 7/9
As can be seen, the probability that a black marble is drawn is affected by any previous event where a black or blue marble was drawn without replacement. Thus, if a person wanted to determine the probability of withdrawing a blue and then black marble from the bag:
Probability of drawing a blue and then black marble using the probabilities calculated above:
P(A ∩ B) = P(A) × P(B|A) = (3/10) × (7/9) = 0.2333
Union of A and B
In probability, the union of events, P(A U B), essentially involves the condition where any or all of the events being considered occur, shown in the Venn diagram below. Note that P(A U B) can also be written as P(A OR B). In this case, the “inclusive OR” is being used. This means that while at least one of the conditions within the union must hold true, all conditions can be simultaneously true. There are two cases for the union of events; the events are either mutually exclusive, or the events are not mutually exclusive. In the case where the events are mutually exclusive, the calculation of the probability is simpler:
A basic example of mutually exclusive events would be the rolling of a dice, where event A is the probability that an even number is rolled, and event B is the probability that an odd number is rolled. It is clear in this case that the events are mutually exclusive since a number cannot be both even and odd, so P(A U B) would be 3/6 + 3/6 = 1, since a standard dice only has odd and even numbers.
The calculator above computes the other case, where the events A and B are not mutually exclusive. In this case:
P(A U B) = P(A) + P(B) – P(A ∩ B)
Using the example of rolling dice again, find the probability that an even number or a number that is a multiple of 3 is rolled. Here the set is represented by the 6 values of the dice, written as:
S = {1,2,3,4,5,6} | |
Probability of an even number: | P(A) = {2,4,6} = 3/6 |
Probability of a multiple of 3: | P(B) = {3,6} = 2/6 |
Intersection of A and B: | P(A ∩ B) = {6} = 1/6 |
P(A U B) = 3/6 + 2/6 -1/6 = 2/3 |
Exclusive OR of A and B
Another possible scenario that the calculator above computes is P(A XOR B), shown in the Venn diagram below. The “Exclusive OR” operation is defined as the event that A or B occurs, but not simultaneously. The equation is as follows:
As an example, imagine it is Halloween, and two buckets of candy are set outside the house, one containing Snickers, and the other containing Reese’s. Multiple flashing neon signs are placed around the buckets of candy insisting that each trick-or-treater only takes one Snickers OR Reese’s but not both! It is unlikely, however, that every child adheres to the flashing neon signs. Given a probability of Reese’s being chosen as P(A) = 0.65, or Snickers being chosen with P(B) = 0.349, and a P(unlikely) = 0.001 that a child exercises restraint while considering the detriments of a potential future cavity, calculate the probability that Snickers or Reese’s is chosen, but not both:
0.65 + 0.349 – 2 × 0.65 × 0.349 = 0.999 – 0.4537 = 0.5453
Therefore, there is a 54.53% chance that Snickers or Reese’s is chosen, but not both.