2. Statistical Inference - II
2. Statistical Inference - II
Tushar B. Kute,
http://tusharkute.com
Covariance
• The Pearson correlation coefficient can take on any real value in the
range −1 ≤ r ≤ 1.
• The maximum value r = 1 corresponds to the case when there’s a
perfect positive linear relationship between x and y. In other words,
larger x values correspond to larger y values and vice versa.
• The value r > 0 indicates positive correlation between x and y.
• The value r = 0 corresponds to the case when x and y are
independent.
• The value r < 0 indicates negative correlation between x and y.
• The minimal value r = −1 corresponds to the case when there’s a
perfect negative linear relationship between x and y. In other
words, larger x values correspond to smaller y values and vice versa.
Pearson Correlation
Summary
Defective Spanners
Bayes Theorem
Bayes Theorem
Bayes Theorem
Bayes Theorem
That’s intuitive
Exercise
Example:
Step-1
Step-1
Step-1
Step-2
Step-3
Naive Bayes – Step-1
Naive Bayes – Step-2
Naive Bayes – Step-3
Combining altogether
Naive Bayes – Step-4
Naive Bayes – Step-5
Types of model
Final Classification
Probability Distribution
Types of Naive Bayes Classifier
• Linear Regression
• Ordinary Least Square Regression
• Support Vector Machine (linear Kernel)
• Perceptron with linear activation function
• Linear Discriminant Analysis (Fisher’s
Discriminant Analysis)
• Logistic Regression (only when we are using this
model for maximum likelihood estimation)
Linear Models
Examples...
Logistic Regression
• Here,
– SSR = Sum Square of Residuals(the squared
difference between the predicted and the
average value)
– SST = Sum Square of Total(the squared
difference between the actual and average
value)
Example:
You can see that the regression line fits the data better than the mean line, which is what we
expected (the mean line is a pretty simplistic model, after all). But can you say how much
better it is? That's exactly what R2 does! Here is the calculation.
Example:
R2 Error
• In this case, var(line) and var(mean) are the same. So the above
calculation will yield an R-squared of 0:
R2 Error
• What if our regression line was really bad, worse than the mean line?
• If we were to plot the best fit line that shows the depicts the
sales of a company over a period of time, it would look
something like this:
Web Resources
https://mitu.co.in
http://tusharkute.com