Prob Stats Cheat Sheet
Experiment:any procedure that can be infinitelyrepeated
•
is known as an experiment. There are two types of
experiments:
- Deterministic Experiment:when the exact
outcomes can be determined
- Probabilistic Experiment:when the outcomes are
uncertain and cannot be determined
Sample Space:the collection of all the possibleoutcomes
•
of the experiment, known as the sample space (S).
Event (E):a subset of the sample space of an experiment.
•
i.e., E⊆ S
•Probability (P): the likelihood of an event occurring.
Mutually Exclusive Events(Disjoint events):Iftwo
•
events are mutually exclusive then the probability of both
events occurring at the same time is equal to zero.
•Measures of Central Tendency:
•Random Variables:
Mean: The average value of a set of numbers
iscrete Random Variables: It represents distinct,separate
D
Σ𝑋
outcomes, and it can only take on specific values within a
μ = 𝑛
countable set.
Median: The middle number; found by ordering all data points
and picking out the one in the middle (or if there are two middle
- E.g. The number of people in a household.
numbers, taking the mean of those two numbers).
- The number of goals scored in a soccer match.
For odd no. of observations:
Continuous Random Variables: It can take any valuewithin a
range and has an uncountable set of possible outcomes.
For even no. of observations:
- E.g. The height of an adult male or female.
- The weight of an object.
Mode: It is the most occurring value in the dataset.
•Distribution functions:
•Measures of Variability:
robability Mass Function (PMF): PMF is a functionthat gives the
P
probability of a discrete random variable taking on a specific
value.
𝑃(𝐴 ∩ 𝐵) = 0
Range:Range is nothing but Maximum value - Minimumvalue
Mutually exhaustiveevents when combined cover allthe
•
possible outcomes, known as mutually exhaustive events.
In
ter Quartile Range (IQR):a measure of the middle50% of a
𝑃(𝐴 ∪ 𝐵) = 1
Non Mutually Exclusive Events(Joint events):Iftwo
•
events are not mutually exclusive then the probability of both
events occurring at the same time is not equal to zero.
𝑃(𝐴 ∩ 𝐵)≠
0
Independent Events: The occurrence of one does not
•
change the probability of the other occurring.
𝑃(𝐴 ∩ 𝐵) = 𝑃
( 𝐴). 𝑃( 𝐵)
data set.
IQR = Q3 - Q1
Q3 =third quantile value, Q1 = first quantile value
Used to detect outliers.
robability Density Function (PDF):PDF is a functionthat
P
describes the likelihood of a continuous random variable falling
within a particular range.
umulative Distribution Function (CDF): CDF givesthe probability
C
that a random variable takes a value less than or equal to a given
point for both discrete and continuous variables.
3
+ 1. 5𝐼 𝑄𝑅) or less
All the points having values greater than(𝑄
− 1. 5𝐼 𝑄𝑅) are considered to be outliers.
than(𝑄1
Boxplot:a standardized way of displaying the distributionof
Expectation:Fora discrete random variable(X) havinga
•
Probability mass function P(x).
𝑛
𝐸(𝑋) = ∑ 𝑥𝑖. 𝑃(𝑥𝑖)
data based on a five-number summary.
•Basic rules of probability:
( 𝐴) + 𝑃( 𝐵) − 𝑃(𝐴 ∩ 𝐵)
Addition rule: 𝑃(𝐴 ∪ 𝐵) = 𝑃
-
𝑖=
1
These are “minimum”, first quartile [Q1], median, third quartile
[Q3], and “maximum”.
In the case of disjoint events:
𝑃(𝐴 ∪ 𝐵) = 𝑃
( 𝐴) + 𝑃( 𝐵)
as𝑃(𝐴 ∩ 𝐵) = 0 while events are disjoint.
𝑐
Complement rule: 𝑃(𝐴 ) =1 − 𝑃( 𝐴)
Cross tab:Crosstab, or cross-tabulation, generates a
•
contingency table showcasing the relationship between two or
more categorical variables and provides a count or frequency
of occurrences for pairs of categorical variables.
Variance:The spread of numbers in a data set w.r.tmean.
2
-
here is a function called pd.crosstab() to generate
T
the table
•Conditional Probability:
𝑛
1
tandard Deviation:
S
the mean ( μ )
𝑃(𝐴∩
𝐵)
𝑃(𝐵)
•Marginal Probability:the probability of a singleevent
occurring without consideration for the occurrence of other
events.
𝑃(𝐴| 𝐵) =
( 𝐶)
E.g.𝑃(𝐴) , 𝑃( 𝐵), 𝑃
1
𝑉𝑎𝑟(𝑋) = σ = 𝑛 ∑ (𝑥 − μ)
2
𝑖
It represents how far the datapoint from
SD = √variance = σ
Discrete probability distributions:
1. Bernoulli distribution
2.
Binomial distribution
Joint Probability:Joint probability is the likelihoodof two
•
or more events occurring simultaneously.
-
E.g. 𝑃(𝐴 ∩ 𝐵),𝑃(𝐴 ∩ 𝐶) ,𝑃(𝐵 ∩ 𝐶)
•Multiplication rule:
𝑃(𝐴 ∩ 𝐵) = 𝑃
( 𝐴| 𝐵). 𝑃( 𝐵) = 𝑃( 𝐵|𝐴
) . 𝑃(𝐴)
•Bayes Theorem:
𝑃(𝑋 = 𝑥) =
𝑃(𝐵|𝐴) .𝑃
(𝐴)
𝑃(𝐴| 𝐵) =
𝑃(𝐵)
•Permutation and Combination:
𝐸[𝑋] = 𝑝
3.
𝑛
𝑥
𝐶𝑥 . 𝑝 . (1 − 𝑝)
𝐸[𝑋] = 𝑛. 𝑝
𝑉𝑎𝑟(𝑋) = 𝑛. 𝑝. ( 1 − 𝑝)
Geometric distribution:
4.
Poisson distribution:
ermutation: A permutation is an arrangement of items or
P
elements in a specific order, where the order of the
arrangement matters.
ombination: A combination is a selection of items or
C
elements where the order of the arrangement does not
matter.
𝑃(𝑘) = (1 − 𝑝)
1
𝐸(𝑋) =
𝑝
𝑘−1
. 𝑝
𝐸(𝑋) = 𝑉
𝑎𝑟(𝑋) = λ
𝑛−
𝑥
5.
Discrete Uniform distribution:
•Continuous Probability distributions:
1. Uniform distribution:
2. Normal distribution:
PDF =
3. Standard Normal distribution:
pecial case of Normal distribution when the mean=0 and
S
standard deviation=1.
𝑧 − 𝑠𝑐𝑜𝑟𝑒 =
Properties:
Symmetricabout mean and has a bell-shaped distribution.
Mean (µ) = mode = median
5.
mpirical rule:
E
68% of values lie within 1 standard deviation from the mean.
95% of values lie within 2 standard deviations from the mean.
99.7% of values lie within 3 standard deviations.
Exponential distribution:
Where β= 1/λ
4.
Log Normal distribution:
𝑥−
µ
σ
•Sample vs population:
•Box-Cox Transformation:The basic idea behind thismethod is to find best value for λ such
that the transformed data is as close to normally distributed as possible, using the following
Population mean=
,
Sample mean=
Population Variance=
, Sample Variance =
Sample Standard Deviation = √s
2
•Sampling Techniques:
imple random sampling: In this sampling method, eachmember of the population has an exactly
S
equal chance of being selected which tends to produce representative, unbiased samples.
A simple random sample is a randomly selected subset of a population.
•Standard error:the spread of sample means aroundthe population mean.
Central Limit Theorem (CLT):
•
the distribution of sample means is Gaussian, no matter what the shape of the original distribution
is.
Assumptions:population mean and standard deviationshould be finite and sample size >=30.
formula: