Sets and Events in probability-Bayesian Inference

Bayesian Inference Probability-Tutorial 1

Photo by Julius Drost on Unsplash

If you want to become a data scientist, you can’t do it without the knowledge of probability in your armory. Bayes’ Rule or Bayes’ Theorem or Bayes’ Law is one of the key concepts of probability. You should master this concept and know what actually Thomas Bayes is coming to say.

Bayes’ Theorem describes the probability of an event, based on prior knowledge of conditions that might be related to the event.

The above explanation is from Wikipedia, I don’t know why these Wikipedia explanations always seem vague. But at the end of this complete tutorial, again come to this explanation. You find this same explanation helpful. If you want to come to a complete understanding of this concept, You should have a great understanding of these below concepts.

  1. Sets and Events
  2. Intersection and Union of Sets
  3. Mutually Exclusive sets
  4. Dependents and Independents of Sets
  5. Conditional Probability
  6. The Law of total probability
  7. Additive and Multiplication Rule

Let’s dig deep into every topic…

Here I covered the Sets and Events in this tutorial and explain all the topics in the distinct tutorials.

We may have already studied the topic Sets in high school. It is the easiest topic in mathematics and has been a scoring part too. Venn defined this topic in a more comprehensible way with the help of circles. You may know the concepts, but still, we should dig deeper into this topic to be well versed. It is the much-needed basic concept to understand the Bayesian inference.

Events: Events can be defined as a set of outcomes from an experiment.

For instance, imagine a rolling of dice. The sample space for rolling dice is 1,2,3,4,5 and 6. The sample space of an experiment is also considered as possible events. After rolling out the dice, the original event will take place. It may be anything out of sample space. So, which is also said to be the subset of sample space.

Sets: Sets is the collection of elements.

For instance, consider a pack of cards as a set and it has four suits. Clubs(c), Spades(s), Diamonds(d), and Hearts(h). We can say this in notation like s∈ X. Here set is denoted as X. Capital letters are always used to denote Sets, while small for elements. Here Suits are the elements of the set. In simple, the list of all the outcome an experiment is sample space, while the particular outcome or collection of outcomes is event.

Sets can be empty or non-empty. Empty sets are also called as Null sets and denoted with these notations often { } or Ø. Non-empty can be either finite or infinite.

Having said that, the elements in the sets are often expressed in the notation like this s ∈ X. There is also a way to express in the notation if an element is not a part of the set, s ∉ X. Simply cross out the belongs to.

The number of elements in sets is known as the cardinality of sets. Don’t confuse, informally it also means the size of the set. Consider a set A,

A = {1, 2, 3, 4 ,5,6}

the cardinality of the set A is 6! Simple right?

If the elements of a first set are also present in the second set, then the first set is the subset of the second set.

For example:

A = {1, 3, 5} B={2,4,6} C={1,2,3,4,5,6}

From the above, we can come to the conclusion that A and B are the subset of C since the elements of these both the sets are also present in the set C.

In Notation, A ⊆ C and B ⊆ C

I think the above picture is enough to understand the mutually exclusive events. (Took 5 minutes to edit this). The events which never happen simultaneously are called mutually exclusive events.

For example, consider rolling a dice. The sample space of rolling dice is 1,2,3,4,5 and 6. We can separate the events into two categories. Let’s take all the odd elements in the event A while even in event B. After rolling the dice, the number would be either odd or even. An outcome can never be odd as well as even. So we can say the event A and event B is mutually exclusive. That’s why these circles stand out seperately.

The intersection of the events means there is a possibility for the occurrence of the outcome of event A also in the event B.

Example: Let’s consider rolling a dice again and split the outcomes into the two sets. A is a set of the odd values and set B has the values greater than 3.

A={1,3,5} and B={4,5,6}

If the outcome of the throw is 5, then both the events happen at the same time. Easy, right?

If no, read another example below.

Consider picking a card from a pack of cards. If getting the Heart is one event and getting Ace is the other. Ace of hearts represents the intersection part.

Let’s go to the next topic.

Here what is the concept is, that event set A has all the elements of the event set B. So it is possible to say the event set B is the subset of the event set A.

Let’s see this in an example.

A={1,2,3,4,5,6,7} B={3,4,6,7}

From the above, we can apparently see that the elements in the B set are also present in the set A.

Picking a black card in a pack of cards without picking the spade is possible, but the reverse is not. Here spade cards event set is the subset of black cards.

Okay, we have now acquired some knowledge on sets and events topic. In the coming tutorial, I explain the concept of Intersection of sets in detail. We should learn all the above-mentioned concepts and have a decent grasp of basics to understand Bayes’ theorem. All of these concepts are interconnected, so learning in a sequential order is more important to fully understand the concept of Bayes’ theorem. Venn diagram was really helpful to understand the concept in a better way, right? Meet you shortly with another tutorial.


Read my thoughts. Access Granted!