Applied Statistics: Probability basics for Statistics in Data Science
Before we dive deep into Inferential statistics we
need to know some basics of data visualization and probability.
Starting with which we will look into the concept of
skewness in Normal distribution. Skewness is the asymmetry of the distribution.
Skewness refers to a distortion or asymmetry that deviates
from the symmetrical bell curve, or normal distribution, in a set of data.
If the curve is shifted to the left or to the right, it is said to be skewed.
The skewness for a normal distribution is zero,
and any symmetric data should have a skewness near zero. Negative values for
the skewness indicate data that are skewed left and positive values for the
skewness indicate data that are skewed right. By skewed left, we mean that the
left tail is long relative to the right tail. Similarly, skewed right means
that the right tail is long relative to the left tail.
Outlier:
In statistics, an outlier is a data
point that differs significantly from other observations. An outlier may
be due to variability in the measurement or it may indicate the experimental error;
the latter are sometimes excluded from the data set. An outlier can
cause serious problems in statistical analyses.
Unimodal, Bimodal, and Multimodal distribution:
Unimodal distribution:
A distribution where one value or bin contains more data
than the other values or bins
Bimodal distribution:
A distribution where there are two distinct values or
bins that contain more data than the others, usually separated by a gap.
Multimodal distribution:
A distribution where there are many values or bins that
contain more data than other nearby bins, usually separated by gaps.
There are various types of plots and plotting concepts
that provides a visual view of the data. We will discuss it in upcoming
modules. We will look into some software implementation using python where we need, box
plots, scatter plots, histograms, pie charts, bar plots, line plots, Heat maps,
area plots, etc. for analyzing certain data
These topics come under the concept of data
visualization.
For more details about the data visualization these some articles which give in-depth understanding about the plotting:
https://towardsdatascience.com/data-visualization-which-graphs-should-i-use-55e214ee9cf1
https://towardsdatascience.com/top-16-types-of-chart-in-data-visualization-196a76b54b62
Why Data Visualization?
To gain insight into an information space by mapping data
onto graphical primitives.
To provide a qualitative overview of large datasets and
search for patterns, trends, structures, irregularities, relationships among
data.
Probability and Distributions:
For Inferential statistics, the probability is a very important
concept. Probability is the mathematical concept and Distributions being the
way to organize probability and a reference to how data may occur.
- Probability: Meaning and Concept
- Probability refers to chance or likelihood of a particular event taking place.
- An event is an outcome of an experiment (collection of outcomes)
- An experiment is a process that is performed to understand and observe possible outcomes.
- Set of all outcomes of an experiment is called sample space.
Example: In a manufacturing unit, 3 parts from the
assembly is selected. You are observing whether they are defective or
non-defective. Determine a] Sample space b] Event of getting at least two
defective parts
Solution:
S = Sample Space
D = Defective
G = Non-Defective
Sample space:
GGG GGD GDG DGG
GDD DGD DDG DDD
Let E denote the event of getting at least 2 defective
parts. This implies that E will contain two and three defectives. Looking at
the sample space above:
E = {GDD, DGD, DDG, DDD}
It is easy to see that E is a part of S and commonly
called as a subset of S. Hence an event is always a subset of the sample space.
Definition of probability:
The probability of an event A is defined as the ratio of two
numbers m and n. P(A) = m/n
Where m is a number of ways that are favorable to the
occurrence of A, and n is the total number of outcomes of the experiment. P(A)
is always >= 0 and always <= 1.
Extreme values of probability: The range within which the probability of an event lies, can be best understood by the following diagram.
The glass shows three stages. Empty, Half-full, and full to explain the
properties of probability.
0% chance, 50% chance or equally like, and 100% chance or
certainty
Mutually exclusive events:
Two events A and B are said to be manually exclusive if
the occurrence of A precludes the occurrence of B. For example, from a well-shuffled pack of cards, if you pick up one card at random and would like to
know if it is a king or a queen, the selected card will either be a king or a
queen. It cannot be both king and queen. If king occurs, t queen will not occur,
and if queen occurs, a king will not occur
Independent events:
Two events A and B are said to be independent if the
occurrence of A is in no way influenced by the occurrence of B. Likewise, the occurrence
of B is in no way influenced by the occurrence of A. Mutually exclusive events are
not independent.
Rules for computing Probability:
1] Addition rule - Mutually exclusive events
P(A U B) = P(A) + P(B)
This rule says that the probability of union A and B is
determined by adding the probability of event A and B
Here symbol A U B is called A union B, meaning A occurs,
or B occurs or both A and B simultaneously occur. When A and B mutually
exclusive, A and B cannot simultaneously occur.
2] Addition rule - Non Mutually exclusive events
P(A U B) = P(A) + P(B) - P(A ∩ B)
This rule says that the probability of the union of A and B
is determined by adding the probability of events A and B, and then subtracting
the probability of the intersection of events A and B
What are Disjoint Events?
Disjoint events cannot happen at the same time. In other
words, they are mutually exclusive.
Put in formal terms, events A and B are disjoint if
their intersection is zero:
P(A ∩ B) = 0.
You’ll sometimes see this written as:
P(A and B) = 0.
Multiplication rule:
Independent events:
P(A ∩ B) = P(A) . P(B)
This rule says that when 2 events A and B are independent
the probability of simultaneous occurrence of A and B equals the product of
probability of A and probability of B.
Dependent events:
P(A ∩ B) = P(A) . P(B/A)
P(B/A) stands for B given A
This rule says that the probability of the intersection
of the events A and B equals the product of probability of A and B, given that A
has happened or known to you. This is symbolized in the second term of the above
expression P(B/A).
P(B/A) is called conditional probability of B given fact
that A has happened or
P(A ∩ B) = P(B) . P(A/B) if B has already happened
If independent P(B/A) = P(B) and P(A/B) = P(A)
P(B/A) = P(A ∩ B) / P(A) and P(A/B) = P(A ∩ B) / P(B)
Marginal Probability:
Contingency tables consist of rows and columns of two
attributes at different levels with frequencies or numbers in each of the
cells. It is a matrix of frequencies assigned to rows and columns.
The term marginal is used to indicate that the
probabilities are calculated using a contingency table.
Upcoming next we will be going to know Bayes Theorem,
Binomial Distribution, Poisson distribution, and normal distribution insights
and a code in python for the same. Till then stay safe and enjoy life!









Comments
Post a Comment