ML Unit 3
ML Unit 3
P i N i)
Page 3 of 27
Page 4 of 27
Page 5 of 27
Page 6 of 27
Page 7 of 27
Page 8 of 27
Page 10 of 27
Page 11 of 27
Page 12 of 27
•
Median is the middle of a sample when arranged from
lowest to highest or highest to lowest. in order to find the
median, the data must be sorted.
For odd number of data points:
• Median=(n+12)thMedian=(2n+1)th
• For even number of data points:
• Median=Average of(n2)th value and its next value
Median=Average of (2n)th value and its next value
• Mode is the most frequently occurring value in the dataset.
• Measures of Dispersion
• Range: The difference between the maximum and minimum
values.
• Variance: The measure of how data points differ from the
mean.
• Standard Deviation: The square root of the
variance, representing the average distance from the mean.
Measures of Dispersion
• Variance: The average squared deviation from the mean, representing data spread.
• Standard Deviation: The square root of variance, indicating data spread relative to the mean.
• Interquartile Range: The range between the first and third quartiles, measuring data spread
around the median.
Measures of Shape
Measures of Shape
Page 13 of 27
Inferential Statistics
Inferential statistics is used to make predictions by taking any group of data in which you are
interested. It can be defined as a random sample of data taken from a population to describe and
make inferences about the population. Any group of data that includes all the data you are
interested in is known as population. It basically allows you to make predictions by taking a small
sample instead of working on the whole population.
Estimation
• Interval Estimation: Offers a range of values (confidence interval) within which the
parameter likely lies.
Hypothesis Testing
Page 14 of 27
• Null and Alternative Hypotheses: The null hypothesis assumes no effect or relationship, while
the alternative suggests otherwise.
• Type I and Type II Errors: Type I error is rejecting a true null hypothesis, while Type II is failing
to reject a false null hypothesis
• p-Values: Measure the probability of obtaining the observed results under the null
hypothesis.
Chi-Square Tests:
Correlation
• Spearman Rank Correlation: Assesses the strength and direction of the monotonic
relationship between variables.
Regression Analysis
Bayesian Statistics
Bayesian statistics incorporate prior knowledge with current evidence to update beliefs.
Page 15 of 27
Bayes' Theorem is a fundamental concept in probability theory that relates conditional probabilities.
It is named after the Reverend Thomas Bayes, who first introduced the theorem. Bayes' Theorem is a
mathematical formula that provides a way to update probabilities based on new evidence. The
formula is as follows:
P(A∣B)=P(B)P(B∣A)⋅P(A), where
• P(A∣B): The probability of event A given that event B has occurred (posterior probability).
• P(B∣A): The probability of event B given that event A has occurred (likelihood).
Statistics is a key component of machine learning, with broad applicability in various fields.
• Feature engineering relies heavily on statistics to convert geometric features into meaningful
predictors for machine learning algorithms.
• In image processing tasks like object recognition and segmentation, statistics accurately
reflect the shape and structure of objects in images.
• Anomaly detection and quality control benefit from statistics by identifying deviations from
norms, aiding in the detection of defects in manufacturing processes.
Page 16 of 27
Here
µ is a d dimensional vector denoting the mean of the distribution
and ∑ is the d X d covariance matrix.
Moreover, Gaussian distributions have some unique properties that are valuable in
analytic studies. For instance, any linear combination of a fixed collection of
independent normal deviates is a normal deviate. Many results and methods, such
as propagation of uncertainty and least squares[5] parameter fitting, can be derived
analytically in explicit form when the relevant variables are normally distributed.
Page 17 of 27
Page 18 of 27
Page 20 of 27
EM Algorithm Flowchart
1. Initialization:
Initially, a set of initial values of the parameters
are considered. A set of incomplete observed
data is given to the system with the assumption
that the observed data comes from a specific
model.
2. E-Step (Expectation Step): In this step, we use the
observed data in order to estimate or guess the values of
the missing or incomplete data. It is basically used to
update the variables.
Compute the posterior probability or
responsibility of each latent variable given the
observed data and current parameter estimates.
Estimate the missing or incomplete data values
using the current parameter estimates.
Compute the log-likelihood of the observed data
based on the current parameter estimates and
estimated missing data.
3. M-step (Maximization Step): In this step, we use the
complete data generated in the preceding “Expectation”
– step in order to update the values of the parameters. It
is basically used to update the hypothesis.
Page 21 of 27
Page 22 of 27
Page 23 of 27
Page 25 of 27
Page 26 of 27
Page 27 of 27