Ufuoma Ejite
4 min readApr 9, 2021

Mathematics In Data Science (1)

Probability

Source: cuemath.com
Source: Google

Our everyday life comes with uncertainties; an event could be expected or not. For instance, when someone sits for an examination, the person either succeeds (passes) or fails. The attempt in sitting for the examination, in this instance, is a trial (or experiment), while the result of such attempt is the outcome. Similarly, in a crate of eggs, there are chances that we could take out both rotten eggs or the good ones when doing a random selection.

The basis of probability is that expectations may likely occur or not, due to happenings (events) and their results.

Therefore, probability is the likelihood of an event occurring; that is, the chance of something happening. Events are specific outcomes or combinations of several outcomes. They might be likely (having a chance of occurrence) or unlikely (no chance of occurrence).

Probability measures the outcomes (results) of events (expectations) in numerical form, and it ranges between 0 and 1 (0≤P<1); a result of 0 meaning absolute certainty of an event NOT occurring, and 1 meaning an absolute certainty of an event occurring.

There are basically two forms of probability:

  1. Theoretical probability
  2. Experimental probability

Theoretical Probability

Theoretical probability takes into cognizance the actual disposition of a situation to give an exact value for a probability. It could be called the true or actual probability.

Theoretical probability, P(A) = Number of favorable outcomes ÷ All possible outcomes

The probability of getting a number divisible by 2 when you roll a dice is 3 ÷ 6 = 0.5

Experimental Probability

This uses experimental data gotten from the outcome of an experiment to predict future events. In other words, it is the probability gotten after conducting experiments (multiple trials). The average expected outcome of our experiment is called the expected values. If you roll a dice 50 times and record 50 outcomes, that’s a single experiment with 50 trials!

Experimental probability, E(A) = Number of successful trials ÷ All trials

Experimental probabilities are NOT ALWAYS equal to theoretical probabilities.

E(A) = P(A) × n, where n is the number of trials

Complements in Probability

A complement is anything the event is not. The complement of an event, B would be B’. The addition of an event B and its complement (B’) would give the total sample space. That is, P(B’) + P(B) = 1

Let’s assume we have the probability of rolling an odd number (in a dice), P(O) as 0.5, then the probability of not rolling an odd number would be the complement of P(O), which would be: P(O’) = 1- P(O) = 1- 0.5 = 0.5

Source: Google

Combinatorics

Source: Google

Combinatorics essentially deals with combination of objects from specific finite sets. The components of combinatorics are: permutation, variation and combination.

Permutations

This is the number of different possible ways we could arrange a set of elements. Permutation doesn’t allow for repetition. A typical example would e selecting the first 3 winners from a certain competition. The permutation of a set of n numbers would be

Pn = n × (n-1) × (n-2) × … × 1 = n!

Variations

This is the total number of ways we can pick and arrange some elements of a given set.

Combinations

This is the number of different ways we can pick certain elements of a set. In combination, the order in which we pick is irrelevant. A typical example is selecting food from a meal menu.

Bayes’ Theorem

Bayes’ theorem is a mathematical law that allows us find a relationship between the different conditional probabilities of 2 events.

The Bayes’ formula (Source: Google)

The Bayes’ theorem is applied in machine learning where it shows the relationship between a data and a model.

Ufuoma Ejite
Ufuoma Ejite

Written by Ufuoma Ejite

Technical Writer || Data Scientist|| Tech Enthusiast

No responses yet