mathleaks.com mathleaks.com Start chapters home Start History history History expand_more Community
Community expand_more
menu_open Close
{{ filterOption.label }}
{{ item.displayTitle }}
{{ item.subject.displayTitle }}
arrow_forward
No results
{{ searchError }}
search
Expand menu menu_open home
{{ courseTrack.displayTitle }}
{{ statistics.percent }}% Sign in to view progress
{{ printedBook.courseTrack.name }} {{ printedBook.name }}
search Use offline Tools apps
Login account_circle menu_open
close expand
Probability

Finding the Probability of Two Events

The union of two events A and B is the set of all the outcomes that are in A or are in B or in both A and B. The union of A and B is usually written as A or B or
union of two events
The probability of the union of A and B is the probability that event A or event B will occur. It can be found using the Addition Rule of Probability.

Rule

Addition Rule of Probability

For two mutually exclusive events A and B, the probability that A or B occur in one trial is the sum of the individual probability of each event.

P(A or B)=P(A)+P(B)
For example, consider rolling a standard six-sided die. Let A be the event that a 3 is rolled and B be the event that a 4 is rolled. The probability of A or B can be found by adding the individual probabilities.
The formula above can be generalized to events that are not necessarily mutually exclusive. If events are overlapping, the probability of the common outcomes are counted twice in P(A)+P(B), so an adjustment is needed.
P(A or B)=P(A)+P(B)P(A and B)

For example, consider rolling a standard six-sided die. Let A be the event that an even number is rolled and B be the event that a prime number is rolled.

Event Outcome(s) Probability
Even 2, 4, 6
Prime 2, 3, 5
Even and prime 2
Using the formula gives the probability that the result of the roll is even or prime.
This probability can be verified by accounting for the five outcomes that are even or prime: 2, 3, 4, 5, and 6.

Proof

Proving the Addition Rule of Probability

For mutually exclusive events, the Addition Rule of Probability is a postulate.

P(A or B)=P(A)+P(B)

Therefore, no proof will be given for mutually exclusive events. Now, consider non-mutually exclusive events A and B.

Venn diagram showing two overlapping sets
In the Venn diagram above, it can be seen part of event A does not overlap event B. That part is labeled a. Similarly, the part of event B that does not overlap event A is labeled b. Furthermore, the overlapping part – also known as the intersection — of both events is labeled c.
Furthermore, in the diagram it can be also seen that a, b, and c are mutually exclusive. Therefore, the union of event A and event B should be considered.
Notation Meaning
P(A)=a+c The probability of A happening is a+c.
P(B)=b+c The probability of B happening is b+c.
The probability of A happening or B happening is a+b+c.
Finally, the fact that will be used to prove the Addition Rule of Probability for non-mutually exclusive events.

Rewrite 0 as cc

The rule has been proven for non-mutually exclusive events.

Concept

Independent Events

Two events A and B are independent events if the occurrence of either of these events does not affect the occurrence of the other. It is also said that they are independent if and only if the probability that both events occur is equal to the product of the individual probabilities.

For example, consider drawing two marbles from a bowl, one at a time.

Drawing Card From a Deck
The probability of first picking a green marble can be calculated by dividing the favorable outcomes by the possible outcomes. Let G, B, and O be the events of drawing green, blue, and orange marbles, respectively. There is 1 green marble and 3 marbles in total.
Suppose that the first marble is replaced before the second draw. Therefore, after the replacement there is 1 orange marble, and 3 marbles in total.
Note that there are 9 possible outcomes for drawing two marbles one at a time. Only 1 of these options corresponds to an event of drawing a green marble and then an orange marble.
Therefore, the combined probability of picking a green marble first and an orange marble second is Since the probability that both events occur is equal to the product of the individual probabilities, these events can be considered as independent events.

Concept

Dependent Events

Two events A and B are considered dependent events if the occurrence of either of these events affects the occurrence of the other. If the events are dependent, the probability that both events occur is equal to the product of the probability of the first event occurring and the probability of the second event occurring after the first event.

For example, consider drawing two marbles from a bowl, one at a time.

Drawing a Marble
The probability of first picking a green marble can be calculated by dividing the favorable outcomes by the possible outcomes. Let G, B, and O be the events of drawing green, blue, and orange marbles, respectively. There is 1 green marble and 3 marbles in total.
Suppose that after the green marble is picked, it is not replaced in the bowl.
Drawing a Marble
This affects the probability of picking an orange marble on the second draw. Now there is still 1 orange marble, but instead of 3, there are 2 marbles in total.
Using this information, the sample space of the described situation can be found.
Out of 6, there is only 1 outcome that corresponds to first drawing a green marble and then an orange marble. Therefore, the probability of picking a green and then an orange marble is
Because the occurrence of the first event affects the occurrence of the second, these events can be concluded to be dependent.

Concept

Conditional Probability

Conditional probability is the measure of the likelihood of an event B occurring, given that event A has occurred previously. The probability of B given A is written as P(BA). It can be calculated by dividing the probability of the intersection of A and B by the probability of A.

It is worth noting that usually P(BA) and P(AB) are not equal, meaning that conditional probability is not reversible. For example, let A be the event of a prime number and B be the event of an odd number. The probability that a prime number is odd is almost 1, but the reverse, an odd number being prime, is much smaller.

Why

Intuition Behind the Formula

The intuition behind the formula can be visualized by using Venn Diagrams. Consider a sample space S and the events A and B such that P(A)0.

Sample Space and events A and B

Assuming that event A has occurred, the sample space is reduced to A.

events A and B, given that A has occurred

This means that the probability that event B can happen is reduced to the outcomes in the intersection of A and B, that is, to those outcomes in

Intersection of the Events A and B

The possible outcomes are given by P(A) and the favorable outcomes by Therefore, the conditional probability formula can be obtained using the probability formula.

Concept

Intersection - Probability

The intersection of two events A and B is the set of all the outcomes that satisfy both events A and B simultaneously. The intersection of A and B is usually written as A and B or
Intersection of two Sets A and B
The probability of the intersection of A and B is the probability that A and B will occur and can be found using the Multiplication Rule of Probability.

Rule

Multiplication Rule of Probability

For two independent events A and B, the probability that the intersection of A and B occurs is the product of the individual probabilities.

P(A and B)=P(A)P(B)

Conversely, if A and B are dependent events, a rearrangement of the Conditional Probability Formula can be used to find the probability of the intersection of the events.

Extra

Examples

Independent Events

Suppose two dice are rolled and the probability of obtaining two even numbers is to be calculated. There are three favorable outcomes for each die: 2, 4, and 6. With this information, the probability of obtaining an even number when rolling one die can be calculated.
The events of rolling an even number on either dice are independent. Therefore, the probability of obtaining two even numbers is the product of the individual probabilities.

Dependent Events

Consider a box with red marbles and blue marbles. In an experiment, two marbles are drawn randomly from the box without replacement. The Multiplication Rule of Probability can be used to find the probability that both marbles are red.

  • Let A be the event that the first marble is red. Its probability is
  • Once a red marble is drawn, the box only has red and blue marbles. Let B be the event that the second marble is red. The conditional probability of B given A is
The Multiplication Rule of Probability gives the probability that both marbles are red.

Proof

Consider two dependent events A and B. The conditional probability of A given B is the ratio of the probability of the intersection of A and B to the probability of B.
The Multiplication Rule of Probability is obtained by multiplying both sides of the above formula by P(B) and using the Symmetric Property of Equality.
Following similar reasoning, an equivalent form of the rule can be obtained.
If A and B are independent, the Multiplication Rule of Probability occurs by the definition of independent events.


Concept

Two-Way Frequency Table

A two-way frequency table, also known as a two-way table, is a table that displays categorical data that can be grouped into two categories. One of the categories is represented by the rows of the table, the other by the columns. For example, the table below shows the results of a survey in which 100 participants were asked if they have a driver's license and if they own a car.

two-way table

Here, the two categories are car and driver's license, both with possible answers of yes and no. The entries in the table are called joint frequencies. Two-way frequency tables often include the total of the rows and columns. These totals are called marginal frequencies.

two-way table
The sum of the Total row and the Total column is equal to the sum of all joint frequencies and is called the grand total. In the case of the survey, the grand total is 100. From the table it can be read that, among other things, 43 people both have a driver's license and own a car. It can also be read that 33 people do not have a driver's license.

Method

Drawing a Two-Way Frequency Table

Organizing data in a two-way frequency table can help with visualization, which in turn makes it easier to analyze and present the data. To draw a two-way frequency table, three steps must be followed.

  1. Determine the Categories
  2. Fill the Table With Given Data
  3. Find Any Missing Frequencies

Suppose that 53 people took part in an online survey, where they were asked whether they prefer top hats or berets. Out of the 18 males that participated, 12 of them prefer berets. Also, 15 of the females chose top hats as their preference. The steps listed above will be developed for this example.

1

Determine the Categories

First, the two categories of the table must be determined, after which the table can be drawn without frequencies. Here, the participants gave their hat preference and their gender, which are the two categories. Hat preference can be further divided into top hat and beret, and gender into female and male.

two-way table

The total row and total column are included to write the marginal frequencies.

2

Fill the Table With Given Data

The given joint and marginal frequencies can now be added to the table.

two-way table

3

Find Any Missing Frequencies
Using the given frequencies, more information can potentially be found by reasoning. For instance, because 12 out of the 18 males prefer berets, the number of males who prefer top hats is equal to the difference between these two values.
Therefore, there are 6 males who prefer top hats. Since there are 15 females who prefer top hats, the number of participants who prefer this type of hat is the sum of these two values.
It has been found that 21 participants prefer top hats. Continuing this reasoning, the entire table can be completed.
two-way table

Concept

Joint and Marginal Relative Frequencies

In a two-way frequency table, a joint relative frequency is the ratio of a joint frequency to the grand total. Similarly, a marginal relative frequency is the ratio of a marginal frequency to the grand total. Consider an example two-way table.

two-way table

Here, the grand total is 100. The joint and marginal frequencies can now be divided by 100 to obtain the and relative frequencies. Clicking in each cell will display its interpretation.

two-way table

Concept

Conditional Relative Frequency

A conditional relative frequency is the ratio of a joint frequency to either of its corresponding two marginal frequencies. Alternatively, it can be calculated using joint and marginal relative frequencies. As an example, the following data will be used.

two-way table

Using the column totals, the left column of joint frequencies should be divided by 67, and the right column by 33. Since the column totals are used, the sum of the conditional relative frequencies of each column is 1.

two-way table

The resulting two-way frequency table can be interpreted to obtain the following information.

  • Out of all the participants with a driver's license, about of them own a car.
  • Out of all the participants with a driver's license, about of them do not own a car.
  • Out of all the participants without a driver's license, about of them own a car.
  • Out of all the participants without a driver's license, about of them do not own a car.
fullscreen
Exercise

From the two-way frequency table, find the conditional relative frequencies based on the columns. Then, find the probability that a vegetarian has a pet.

Vegetarian
Yes No Total
Pet Yes 0.456 0.154 0.61
No 0.123 0.267 0.39
Total 0.579 0.421 1
Show Solution
Solution

To begin, recall that conditional relative frequencies can be calculated by dividing the joint relative frequencies by the marginal relative frequencies. Since it should be based on the columns, it's the totals of the vegetarians, 0.579 and 0.421, that are used as the denominators.

Vegetarian
Yes No
Pet Yes
No
Total 0.579 0.421

Note that the sum of the conditional relative frequencies in each column is equal to 1. Now, to find the probability that a vegetarian has a pet, we look at the column for people who answered "Yes" on "Vegetarian".

Vegetarian
Yes No
Pet Yes 0.79 0.37
No 0.21 0.63
Total 1 1

In that column, said "Yes" to having a pet and said "no". Thus, the probability that a vegetarian has a pet is

arrow_left
arrow_right
{{ 'mldesktop-placeholder-grade-tab' | message }}
{{ 'mldesktop-placeholder-grade' | message }} {{ article.displayTitle }}!
{{ grade.displayTitle }}
{{ 'ml-tooltip-premium-exercise' | message }}
{{ 'ml-tooltip-programming-exercise' | message }} {{ 'course' | message }} {{ exercise.course }}
Test
{{ focusmode.exercise.exerciseName }}
{{ 'ml-btn-previous-exercise' | message }} arrow_back {{ 'ml-btn-next-exercise' | message }} arrow_forward
arrow_left arrow_right