# Basic Basics of Statistics(Descriptive) & Probability for Data Scientists-A Quick Refresher

Probability deals with predicting the likelihood of future events, while statistics involves the analysis of the frequency of past events.

# PROBABILITY

In probability theory, an **event** is a set of outcomes of an experiment to which a probability is assigned. If

represents an event, then **E**

represents the probability that **P(E)**

will occur. A situation where **E**

might happen (**E***success*) or might not happen (*failure*) is called a ** trial**.

This event can be anything like *tossing a coin, rolling a die *or* pulling a colored ball out of a bag. *In these examples the outcome of the event is random, so the variable that represents the outcome of these events is called a **random variable.**

The **empirical probability** of an event is given by number of times the event occurs divided by the total number of incidents observed. If for

trials and we observe **n**

successes, the probability of success is s/n.**s**

**Theoretical probability** on the other hand is given by the number of ways the particular event can occur divided by the total number of possible outcomes.

## JOINT AND CONDITIONAL PROBABILITY

**Joint Probability: **Probability of events A and B denoted by

is the probability that **P(A and B) or P(A ∩ B)***events A and B both occur.*

**P(A ∩ B) = P(A). P(B)**** . **This only applies if

and **A**

are independent, which means that if **B**

occurred, that doesn’t change the probability of **A**

, and vice versa.**B**

**Conditional Probability**: When A and B are not independent, it is useful to compute the conditional probability, P (A|B), which is the probability of A given that B occurred: **P(A|B) = P(A ∩ B)/ P(B)****.**

The probability of an event A conditioned on an event B is denoted and defined

P(A|B) = P(A∩B)/P(B)

Similarly, **P(B|A) = P(A ∩ B)/ P(A)**** . **We can write the joint probability of as A and B as

, which means : **P(A ∩ B)= p(A).P(B|A)***“The chance of both things happening is the chance that the first one happens, and then the second one given the first happened.”*