SlideShare une entreprise Scribd logo
1  sur  22
Classification Methods
Chapter 04 (part 01)
IOM 530: Intro. to Statistical Learning 1
Logistic Regression
IOM 530: Intro. to Statistical Learning 2
Outline
Cases:
Orange Juice Brand Preference
Credit Card Default Data
Why Not Linear Regression?
Simple Logistic Regression
Logistic Function
 Interpreting the coefficients
Making Predictions
Adding Qualitative Predictors
Multiple Logistic Regression
IOM 530: Intro. to Statistical Learning 3
Case 1: Brand Preference for Orange Juice
• We would like to predict what customers prefer to buy: Citrus Hill or
Minute Maid orange juice?
• The Y (Purchase) variable is categorical: 0 or 1
• The X (LoyalCH) variable is a numerical value (between 0 and 1)
which specifies the how much the customers are loyal to the Citrus
Hill (CH) orange juice
• Can we use Linear Regression when Y is categorical?
IOM 530: Intro. to Statistical Learning 4
Why not Linear Regression?
When Y only takes on values of 0 and 1, why standard linear
regression in inappropriate?
IOM 530: Intro. to Statistical Learning 5
0.0
0.2
0.4
0.5
0.7
0.9
.0 .1 .2 .3 .4 .5 .6 .7 .8 .9 1.0
LoyalCH
Purchase
How do we interpret
values of Y between 0
and 1?
How do we
interpret values
greater than 1?
Problems
• The regression line 0+1X can take on any value between negative
and positive infinity
• In the orange juice classification problem, Y can only take on two
possible values: 0 or 1.
• Therefore the regression line almost always predicts the wrong value
for Y in classification problems
IOM 530: Intro. to Statistical Learning 6
Solution: Use Logistic Function
• Instead of trying to predict Y, let’s try to predict P(Y = 1), i.e., the
probability a customer buys Citrus Hill (CH) juice.
• Thus, we can model P(Y = 1) using a function that gives outputs
between 0 and 1.
• We can use the logistic function
• Logistic Regression!
IOM 530: Intro. to Statistical Learning 7
X
X
e
e
YPp 10
10
1
)1( 





0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Probability
-5 -4 -3 -2 -1 0 1 2 3 4 5
X
Logistic Regression
• Logistic regression is very similar
to linear regression
• We come up with b0 and b1 to
estimate 0 and 1.
• We have similar problems and
questions as in linear regression
• e.g. Is 1 equal to 0? How sure are
we about our guesses for 0 and
1?
IOM 530: Intro. to Statistical Learning 8
0
0.25
0.5
0.75
1
.0 .2 .4 .6 .7 .9
LoyalCH
CH
MM
If LoyalCH is about .6 then Pr(CH)  .7.
P(Purchase)
Case 2: Credit Card Default Data
We would like to be able to predict customers that are likely to
default
Possible X variables are:
Annual Income
Monthly credit card balance
The Y variable (Default) is categorical: Yes or No
How do we check the relationship between Y and X?
IOM 530: Intro. to Statistical Learning 9
The Default Dataset
IOM 530: Intro. to Statistical Learning 10
Why not Linear Regression?
If we fit a linear regression to the
Default data, then for very low
balances we predict a negative
probability, and for high balances
we predict a probability above 1!
IOM 530: Intro. to Statistical Learning 11
When Balance < 500,
Pr(default) is negative!
Logistic Function on Default Data
• Now the probability of
default is close to, but
not less than zero for
low balances. And close
to but not above 1 for
high balances
IOM 530: Intro. to Statistical Learning 12
Interpreting 1
• Interpreting what 1 means is not very easy with logistic regression,
simply because we are predicting P(Y) and not Y.
• If 1 =0, this means that there is no relationship between Y and X.
• If 1 >0, this means that when X gets larger so does the probability
that Y = 1.
• If 1 <0, this means that when X gets larger, the probability that Y = 1
gets smaller.
• But how much bigger or smaller depends on where we are on the
slope
IOM 530: Intro. to Statistical Learning 13
Are the coefficients significant?
• We still want to perform a hypothesis test to see whether we can be
sure that are 0 and 1 significantly different from zero.
• We use a Z test instead of a T test, but of course that doesn’t change
the way we interpret the p-value
• Here the p-value for balance is very small, and b1 is positive, so we
are sure that if the balance increase, then the probability of default
will increase as well.
IOM 530: Intro. to Statistical Learning 14
Making Prediction
• Suppose an individual has an average balance of $1000. What is their
probability of default?
• The predicted probability of default for an individual with a balance
of $1000 is less than 1%.
• For a balance of $2000, the probability is much higher, and equals to
0.586 (58.6%).
IOM 530: Intro. to Statistical Learning 15
Qualitative Predictors in Logistic Regression
• We can predict if an individual default by checking if she is a student
or not. Thus we can use a qualitative variable “Student” coded as
(Student = 1, Non-student =0).
• b1 is positive: This indicates students tend to have higher default
probabilities than non-students
IOM 530: Intro. to Statistical Learning 16
Multiple Logistic Regression
• We can fit multiple logistic just like regular regression
IOM 530: Intro. to Statistical Learning 17
Multiple Logistic Regression- Default Data
• Predict Default using:
• Balance (quantitative)
• Income (quantitative)
• Student (qualitative)
IOM 530: Intro. to Statistical Learning 18
Predictions
• A student with a credit card balance of $1,500 and an income of
$40,000 has an estimated probability of default
IOM 530: Intro. to Statistical Learning 19
An Apparent Contradiction!
IOM 530: Intro. to Statistical Learning 20
Positive
Negative
Students (Orange) vs. Non-students (Blue)
IOM 530: Intro. to Statistical Learning 21
To whom should credit be offered?
• A student is risker than non students if no information about the
credit card balance is available
• However, that student is less risky than a non student with the same
credit card balance!
IOM 530: Intro. to Statistical Learning 22

Contenu connexe

Tendances

Lecture slides stats1.13.l20.air
Lecture slides stats1.13.l20.airLecture slides stats1.13.l20.air
Lecture slides stats1.13.l20.airatutor_te
 
Logistic regression
Logistic regressionLogistic regression
Logistic regressionDrZahid Khan
 
Multinomial logisticregression basicrelationships
Multinomial logisticregression basicrelationshipsMultinomial logisticregression basicrelationships
Multinomial logisticregression basicrelationshipsAnirudha si
 
Logistic Regression in Case-Control Study
Logistic Regression in Case-Control StudyLogistic Regression in Case-Control Study
Logistic Regression in Case-Control StudySatish Gupta
 
Chapter 4 - multiple regression
Chapter 4  - multiple regressionChapter 4  - multiple regression
Chapter 4 - multiple regressionTauseef khan
 
linear probit model
linear probit modellinear probit model
linear probit modelSakthivel R
 
Quantitative Methods for Lawyers - Class #22 - Regression Analysis - Part 5
Quantitative Methods for Lawyers - Class #22 - Regression Analysis - Part 5Quantitative Methods for Lawyers - Class #22 - Regression Analysis - Part 5
Quantitative Methods for Lawyers - Class #22 - Regression Analysis - Part 5Daniel Katz
 
Quantitative Methods for Lawyers - Class #21 - Regression Analysis - Part 4
Quantitative Methods for Lawyers - Class #21 - Regression Analysis - Part 4Quantitative Methods for Lawyers - Class #21 - Regression Analysis - Part 4
Quantitative Methods for Lawyers - Class #21 - Regression Analysis - Part 4Daniel Katz
 
Linear Regression Algorithm | Linear Regression in R | Data Science Training ...
Linear Regression Algorithm | Linear Regression in R | Data Science Training ...Linear Regression Algorithm | Linear Regression in R | Data Science Training ...
Linear Regression Algorithm | Linear Regression in R | Data Science Training ...Edureka!
 
Regression (Linear Regression and Logistic Regression) by Akanksha Bali
Regression (Linear Regression and Logistic Regression) by Akanksha BaliRegression (Linear Regression and Logistic Regression) by Akanksha Bali
Regression (Linear Regression and Logistic Regression) by Akanksha BaliAkanksha Bali
 
Quantitative Methods for Lawyers - Class #22 - Regression Analysis - Part 1
Quantitative Methods for Lawyers - Class #22 -  Regression Analysis - Part 1Quantitative Methods for Lawyers - Class #22 -  Regression Analysis - Part 1
Quantitative Methods for Lawyers - Class #22 - Regression Analysis - Part 1Daniel Katz
 
Regression & It's Types
Regression & It's TypesRegression & It's Types
Regression & It's TypesMehul Boricha
 
Machine Learning - Simple Linear Regression
Machine Learning - Simple Linear RegressionMachine Learning - Simple Linear Regression
Machine Learning - Simple Linear RegressionSiddharth Shrivastava
 
Quantitative Methods for Lawyers - Class #17 - Scatter Plots, Covariance, Cor...
Quantitative Methods for Lawyers - Class #17 - Scatter Plots, Covariance, Cor...Quantitative Methods for Lawyers - Class #17 - Scatter Plots, Covariance, Cor...
Quantitative Methods for Lawyers - Class #17 - Scatter Plots, Covariance, Cor...Daniel Katz
 
Introduction to Structural Equation Modeling
Introduction to Structural Equation ModelingIntroduction to Structural Equation Modeling
Introduction to Structural Equation ModelingAzmi Mohd Tamil
 

Tendances (19)

Lecture slides stats1.13.l20.air
Lecture slides stats1.13.l20.airLecture slides stats1.13.l20.air
Lecture slides stats1.13.l20.air
 
Logistic regression
Logistic regressionLogistic regression
Logistic regression
 
Multilevel Binary Logistic Regression
Multilevel Binary Logistic RegressionMultilevel Binary Logistic Regression
Multilevel Binary Logistic Regression
 
Multinomial logisticregression basicrelationships
Multinomial logisticregression basicrelationshipsMultinomial logisticregression basicrelationships
Multinomial logisticregression basicrelationships
 
Logistic Regression in Case-Control Study
Logistic Regression in Case-Control StudyLogistic Regression in Case-Control Study
Logistic Regression in Case-Control Study
 
Data Analyst - Interview Guide
Data Analyst - Interview GuideData Analyst - Interview Guide
Data Analyst - Interview Guide
 
Chapter 4 - multiple regression
Chapter 4  - multiple regressionChapter 4  - multiple regression
Chapter 4 - multiple regression
 
linear probit model
linear probit modellinear probit model
linear probit model
 
Quantitative Methods for Lawyers - Class #22 - Regression Analysis - Part 5
Quantitative Methods for Lawyers - Class #22 - Regression Analysis - Part 5Quantitative Methods for Lawyers - Class #22 - Regression Analysis - Part 5
Quantitative Methods for Lawyers - Class #22 - Regression Analysis - Part 5
 
Quantitative Methods for Lawyers - Class #21 - Regression Analysis - Part 4
Quantitative Methods for Lawyers - Class #21 - Regression Analysis - Part 4Quantitative Methods for Lawyers - Class #21 - Regression Analysis - Part 4
Quantitative Methods for Lawyers - Class #21 - Regression Analysis - Part 4
 
Linear Regression Algorithm | Linear Regression in R | Data Science Training ...
Linear Regression Algorithm | Linear Regression in R | Data Science Training ...Linear Regression Algorithm | Linear Regression in R | Data Science Training ...
Linear Regression Algorithm | Linear Regression in R | Data Science Training ...
 
Regression (Linear Regression and Logistic Regression) by Akanksha Bali
Regression (Linear Regression and Logistic Regression) by Akanksha BaliRegression (Linear Regression and Logistic Regression) by Akanksha Bali
Regression (Linear Regression and Logistic Regression) by Akanksha Bali
 
The probit model
The probit modelThe probit model
The probit model
 
Quantitative Methods for Lawyers - Class #22 - Regression Analysis - Part 1
Quantitative Methods for Lawyers - Class #22 -  Regression Analysis - Part 1Quantitative Methods for Lawyers - Class #22 -  Regression Analysis - Part 1
Quantitative Methods for Lawyers - Class #22 - Regression Analysis - Part 1
 
Regression & It's Types
Regression & It's TypesRegression & It's Types
Regression & It's Types
 
Machine Learning - Simple Linear Regression
Machine Learning - Simple Linear RegressionMachine Learning - Simple Linear Regression
Machine Learning - Simple Linear Regression
 
Quantitative Methods for Lawyers - Class #17 - Scatter Plots, Covariance, Cor...
Quantitative Methods for Lawyers - Class #17 - Scatter Plots, Covariance, Cor...Quantitative Methods for Lawyers - Class #17 - Scatter Plots, Covariance, Cor...
Quantitative Methods for Lawyers - Class #17 - Scatter Plots, Covariance, Cor...
 
Correlation
CorrelationCorrelation
Correlation
 
Introduction to Structural Equation Modeling
Introduction to Structural Equation ModelingIntroduction to Structural Equation Modeling
Introduction to Structural Equation Modeling
 

En vedette

Intro to Classification: Logistic Regression & SVM
Intro to Classification: Logistic Regression & SVMIntro to Classification: Logistic Regression & SVM
Intro to Classification: Logistic Regression & SVMNYC Predictive Analytics
 
Coursera machine learning week6
Coursera machine learning week6Coursera machine learning week6
Coursera machine learning week6Kikuya Takumi
 
Machine learning
Machine learningMachine learning
Machine learningShreyas G S
 
Introduction to Machine Learning Classifiers
Introduction to Machine Learning ClassifiersIntroduction to Machine Learning Classifiers
Introduction to Machine Learning ClassifiersFunctional Imperative
 
Introduction to Machine Learning & Classification
Introduction to Machine Learning & ClassificationIntroduction to Machine Learning & Classification
Introduction to Machine Learning & ClassificationChristopher Sharkey
 
Classification Based Machine Learning Algorithms
Classification Based Machine Learning AlgorithmsClassification Based Machine Learning Algorithms
Classification Based Machine Learning AlgorithmsMd. Main Uddin Rony
 
H2O World - GBM and Random Forest in H2O- Mark Landry
H2O World - GBM and Random Forest in H2O- Mark LandryH2O World - GBM and Random Forest in H2O- Mark Landry
H2O World - GBM and Random Forest in H2O- Mark LandrySri Ambati
 
Higgs Boson Machine Learning Challenge - Kaggle
Higgs Boson Machine Learning Challenge - KaggleHiggs Boson Machine Learning Challenge - Kaggle
Higgs Boson Machine Learning Challenge - KaggleSajith Edirisinghe
 
Forecasting P2P Credit Risk based on Lending Club data
Forecasting P2P Credit Risk based on Lending Club dataForecasting P2P Credit Risk based on Lending Club data
Forecasting P2P Credit Risk based on Lending Club dataArchange Giscard DESTINE
 
Consumer Credit Scoring Using Logistic Regression and Random Forest
Consumer Credit Scoring Using Logistic Regression and Random ForestConsumer Credit Scoring Using Logistic Regression and Random Forest
Consumer Credit Scoring Using Logistic Regression and Random ForestHirak Sen Roy
 
Logistic regression with low event rate (rare events)
Logistic regression with low event rate (rare events)Logistic regression with low event rate (rare events)
Logistic regression with low event rate (rare events)Tejamoy Ghosh
 
Estimation of the probability of default : Credit Rish
Estimation of the probability of default : Credit RishEstimation of the probability of default : Credit Rish
Estimation of the probability of default : Credit RishArsalan Qadri
 
Improve Your Regression with CART and RandomForests
Improve Your Regression with CART and RandomForestsImprove Your Regression with CART and RandomForests
Improve Your Regression with CART and RandomForestsSalford Systems
 
Logistic Modeling with Applications to Marketing and Credit Risk in the Autom...
Logistic Modeling with Applications to Marketing and Credit Risk in the Autom...Logistic Modeling with Applications to Marketing and Credit Risk in the Autom...
Logistic Modeling with Applications to Marketing and Credit Risk in the Autom...Magnify Analytic Solutions
 
Dr. Trevor Hastie: Data Science of GBM (October 10, 2013: Presented With H2O)
Dr. Trevor Hastie: Data Science of GBM (October 10, 2013: Presented With H2O)Dr. Trevor Hastie: Data Science of GBM (October 10, 2013: Presented With H2O)
Dr. Trevor Hastie: Data Science of GBM (October 10, 2013: Presented With H2O)Sri Ambati
 
Tree models with Scikit-Learn: Great models with little assumptions
Tree models with Scikit-Learn: Great models with little assumptionsTree models with Scikit-Learn: Great models with little assumptions
Tree models with Scikit-Learn: Great models with little assumptionsGilles Louppe
 
Understanding Random Forests: From Theory to Practice
Understanding Random Forests: From Theory to PracticeUnderstanding Random Forests: From Theory to Practice
Understanding Random Forests: From Theory to PracticeGilles Louppe
 
Model building in credit card and loan approval
Model building in credit card and loan approval Model building in credit card and loan approval
Model building in credit card and loan approval Venkata Reddy Konasani
 

En vedette (20)

Intro to Classification: Logistic Regression & SVM
Intro to Classification: Logistic Regression & SVMIntro to Classification: Logistic Regression & SVM
Intro to Classification: Logistic Regression & SVM
 
Coursera machine learning week6
Coursera machine learning week6Coursera machine learning week6
Coursera machine learning week6
 
Machine learning
Machine learningMachine learning
Machine learning
 
Introduction to Machine Learning Classifiers
Introduction to Machine Learning ClassifiersIntroduction to Machine Learning Classifiers
Introduction to Machine Learning Classifiers
 
Introduction to Machine Learning & Classification
Introduction to Machine Learning & ClassificationIntroduction to Machine Learning & Classification
Introduction to Machine Learning & Classification
 
Classification Based Machine Learning Algorithms
Classification Based Machine Learning AlgorithmsClassification Based Machine Learning Algorithms
Classification Based Machine Learning Algorithms
 
H2O World - GBM and Random Forest in H2O- Mark Landry
H2O World - GBM and Random Forest in H2O- Mark LandryH2O World - GBM and Random Forest in H2O- Mark Landry
H2O World - GBM and Random Forest in H2O- Mark Landry
 
Higgs Boson Machine Learning Challenge - Kaggle
Higgs Boson Machine Learning Challenge - KaggleHiggs Boson Machine Learning Challenge - Kaggle
Higgs Boson Machine Learning Challenge - Kaggle
 
Forecasting P2P Credit Risk based on Lending Club data
Forecasting P2P Credit Risk based on Lending Club dataForecasting P2P Credit Risk based on Lending Club data
Forecasting P2P Credit Risk based on Lending Club data
 
Consumer Credit Scoring Using Logistic Regression and Random Forest
Consumer Credit Scoring Using Logistic Regression and Random ForestConsumer Credit Scoring Using Logistic Regression and Random Forest
Consumer Credit Scoring Using Logistic Regression and Random Forest
 
Logistic regression with low event rate (rare events)
Logistic regression with low event rate (rare events)Logistic regression with low event rate (rare events)
Logistic regression with low event rate (rare events)
 
Estimation of the probability of default : Credit Rish
Estimation of the probability of default : Credit RishEstimation of the probability of default : Credit Rish
Estimation of the probability of default : Credit Rish
 
Improve Your Regression with CART and RandomForests
Improve Your Regression with CART and RandomForestsImprove Your Regression with CART and RandomForests
Improve Your Regression with CART and RandomForests
 
Logistic Modeling with Applications to Marketing and Credit Risk in the Autom...
Logistic Modeling with Applications to Marketing and Credit Risk in the Autom...Logistic Modeling with Applications to Marketing and Credit Risk in the Autom...
Logistic Modeling with Applications to Marketing and Credit Risk in the Autom...
 
Dr. Trevor Hastie: Data Science of GBM (October 10, 2013: Presented With H2O)
Dr. Trevor Hastie: Data Science of GBM (October 10, 2013: Presented With H2O)Dr. Trevor Hastie: Data Science of GBM (October 10, 2013: Presented With H2O)
Dr. Trevor Hastie: Data Science of GBM (October 10, 2013: Presented With H2O)
 
Tree models with Scikit-Learn: Great models with little assumptions
Tree models with Scikit-Learn: Great models with little assumptionsTree models with Scikit-Learn: Great models with little assumptions
Tree models with Scikit-Learn: Great models with little assumptions
 
Introduction to Modeling
Introduction to ModelingIntroduction to Modeling
Introduction to Modeling
 
Xgboost
XgboostXgboost
Xgboost
 
Understanding Random Forests: From Theory to Practice
Understanding Random Forests: From Theory to PracticeUnderstanding Random Forests: From Theory to Practice
Understanding Random Forests: From Theory to Practice
 
Model building in credit card and loan approval
Model building in credit card and loan approval Model building in credit card and loan approval
Model building in credit card and loan approval
 

Similaire à classification_methods-logistic regression Machine Learning

Logistic regression
Logistic regressionLogistic regression
Logistic regressionRupak Roy
 
Topic 2 - More on Hypothesis Testing
Topic 2 - More on Hypothesis TestingTopic 2 - More on Hypothesis Testing
Topic 2 - More on Hypothesis TestingRyan Herzog
 
CHAPTER 11 LOGISTIC REGRESSION.pptx
CHAPTER 11 LOGISTIC REGRESSION.pptxCHAPTER 11 LOGISTIC REGRESSION.pptx
CHAPTER 11 LOGISTIC REGRESSION.pptxUmaDeviAnanth
 
Logistic-regression.pptx
Logistic-regression.pptxLogistic-regression.pptx
Logistic-regression.pptxsherinjoyson
 
Default payment prediction system
Default payment prediction systemDefault payment prediction system
Default payment prediction systemAshish Arora
 
simple-linear-regression (1).pptx
simple-linear-regression (1).pptxsimple-linear-regression (1).pptx
simple-linear-regression (1).pptxShrutiGupta3922
 
CreditCardDefaultModel
CreditCardDefaultModelCreditCardDefaultModel
CreditCardDefaultModelAndrew Rogala
 
Lecture 3.1_ Logistic Regression.pptx
Lecture 3.1_ Logistic Regression.pptxLecture 3.1_ Logistic Regression.pptx
Lecture 3.1_ Logistic Regression.pptxajondaree
 
Qnt 351 final exam new 2016
Qnt 351 final exam new 2016Qnt 351 final exam new 2016
Qnt 351 final exam new 2016powellabril
 
Qnt 351 final exam new 2016
Qnt 351 final exam new 2016Qnt 351 final exam new 2016
Qnt 351 final exam new 2016sergejsvolkovs10
 
Qnt 351 final exam new 2016
Qnt 351 final exam new 2016Qnt 351 final exam new 2016
Qnt 351 final exam new 2016alicalland
 
For this assignment, use the aschooltest.sav dataset.The d
For this assignment, use the aschooltest.sav dataset.The dFor this assignment, use the aschooltest.sav dataset.The d
For this assignment, use the aschooltest.sav dataset.The dMerrileeDelvalle969
 
Your A/B Tests are Lying to You
Your A/B Tests are Lying to YouYour A/B Tests are Lying to You
Your A/B Tests are Lying to YouJohn Clevenger
 
Your A/B Tests are Lying to You
Your A/B Tests are Lying to YouYour A/B Tests are Lying to You
Your A/B Tests are Lying to YouJohn Clevenger
 
Applied statistics lecture_7
Applied statistics lecture_7Applied statistics lecture_7
Applied statistics lecture_7Daria Bogdanova
 

Similaire à classification_methods-logistic regression Machine Learning (20)

BLR1.pptx
BLR1.pptxBLR1.pptx
BLR1.pptx
 
logistic_ppt.pptx
logistic_ppt.pptxlogistic_ppt.pptx
logistic_ppt.pptx
 
Logistic regression
Logistic regressionLogistic regression
Logistic regression
 
Topic 2 - More on Hypothesis Testing
Topic 2 - More on Hypothesis TestingTopic 2 - More on Hypothesis Testing
Topic 2 - More on Hypothesis Testing
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
 
CHAPTER 11 LOGISTIC REGRESSION.pptx
CHAPTER 11 LOGISTIC REGRESSION.pptxCHAPTER 11 LOGISTIC REGRESSION.pptx
CHAPTER 11 LOGISTIC REGRESSION.pptx
 
Logistic-regression.pptx
Logistic-regression.pptxLogistic-regression.pptx
Logistic-regression.pptx
 
BS 723_Class 6(5).pptx
BS 723_Class 6(5).pptxBS 723_Class 6(5).pptx
BS 723_Class 6(5).pptx
 
Default payment prediction system
Default payment prediction systemDefault payment prediction system
Default payment prediction system
 
simple-linear-regression (1).pptx
simple-linear-regression (1).pptxsimple-linear-regression (1).pptx
simple-linear-regression (1).pptx
 
CreditCardDefaultModel
CreditCardDefaultModelCreditCardDefaultModel
CreditCardDefaultModel
 
Lecture 3.1_ Logistic Regression.pptx
Lecture 3.1_ Logistic Regression.pptxLecture 3.1_ Logistic Regression.pptx
Lecture 3.1_ Logistic Regression.pptx
 
Qnt 351 final exam new 2016
Qnt 351 final exam new 2016Qnt 351 final exam new 2016
Qnt 351 final exam new 2016
 
Qnt 351 final exam new 2016
Qnt 351 final exam new 2016Qnt 351 final exam new 2016
Qnt 351 final exam new 2016
 
Qnt 351 final exam new 2016
Qnt 351 final exam new 2016Qnt 351 final exam new 2016
Qnt 351 final exam new 2016
 
For this assignment, use the aschooltest.sav dataset.The d
For this assignment, use the aschooltest.sav dataset.The dFor this assignment, use the aschooltest.sav dataset.The d
For this assignment, use the aschooltest.sav dataset.The d
 
Your A/B Tests are Lying to You
Your A/B Tests are Lying to YouYour A/B Tests are Lying to You
Your A/B Tests are Lying to You
 
Your A/B Tests are Lying to You
Your A/B Tests are Lying to YouYour A/B Tests are Lying to You
Your A/B Tests are Lying to You
 
Applied statistics lecture_7
Applied statistics lecture_7Applied statistics lecture_7
Applied statistics lecture_7
 
Rejection Region.ppt.ppt
Rejection Region.ppt.pptRejection Region.ppt.ppt
Rejection Region.ppt.ppt
 

Plus de Shiraz316

FINGERNAIL DISORDER DETECTION FOR DISEASE ANALYSIS
FINGERNAIL DISORDER DETECTION FOR DISEASE ANALYSISFINGERNAIL DISORDER DETECTION FOR DISEASE ANALYSIS
FINGERNAIL DISORDER DETECTION FOR DISEASE ANALYSISShiraz316
 
K neareast neighbor algorithm presentation
K neareast neighbor algorithm presentationK neareast neighbor algorithm presentation
K neareast neighbor algorithm presentationShiraz316
 
Khi 087 revised dt report
Khi 087 revised dt reportKhi 087 revised dt report
Khi 087 revised dt reportShiraz316
 
Khi 117 revised dt report
Khi 117 revised dt reportKhi 117 revised dt report
Khi 117 revised dt reportShiraz316
 
Khi 164 revised dt report
Khi 164 revised dt reportKhi 164 revised dt report
Khi 164 revised dt reportShiraz316
 
Khi 054 revised dt report
Khi 054 revised dt reportKhi 054 revised dt report
Khi 054 revised dt reportShiraz316
 
Khi 061 revised dt report
Khi 061 revised dt reportKhi 061 revised dt report
Khi 061 revised dt reportShiraz316
 
Khi 022 revised dt report
Khi 022 revised dt reportKhi 022 revised dt report
Khi 022 revised dt reportShiraz316
 
Khi 113 revised dt report
Khi 113 revised dt reportKhi 113 revised dt report
Khi 113 revised dt reportShiraz316
 
Khi 156 revised dt report
Khi 156 revised dt reportKhi 156 revised dt report
Khi 156 revised dt reportShiraz316
 
Khi 142 revised dt report
Khi 142 revised dt reportKhi 142 revised dt report
Khi 142 revised dt reportShiraz316
 
Khi 316 revised dt report
Khi 316 revised dt reportKhi 316 revised dt report
Khi 316 revised dt reportShiraz316
 
Khi 186 revised dt report
Khi 186 revised dt reportKhi 186 revised dt report
Khi 186 revised dt reportShiraz316
 
Khi 052 revised dt report
Khi 052 revised dt reportKhi 052 revised dt report
Khi 052 revised dt reportShiraz316
 
Khi 151 revised dt report
Khi 151 revised dt reportKhi 151 revised dt report
Khi 151 revised dt reportShiraz316
 
Khi 150 revised dt report
Khi 150 revised dt reportKhi 150 revised dt report
Khi 150 revised dt reportShiraz316
 
Khi 078 revised dt report
Khi 078 revised dt reportKhi 078 revised dt report
Khi 078 revised dt reportShiraz316
 
LTE quick introduction session Training
LTE quick introduction session TrainingLTE quick introduction session Training
LTE quick introduction session TrainingShiraz316
 
LTE Sales Training for CPE Device
LTE Sales Training for CPE DeviceLTE Sales Training for CPE Device
LTE Sales Training for CPE DeviceShiraz316
 
Witribe Customer Premises Equipment Training for LTE
Witribe Customer Premises Equipment Training for LTEWitribe Customer Premises Equipment Training for LTE
Witribe Customer Premises Equipment Training for LTEShiraz316
 

Plus de Shiraz316 (20)

FINGERNAIL DISORDER DETECTION FOR DISEASE ANALYSIS
FINGERNAIL DISORDER DETECTION FOR DISEASE ANALYSISFINGERNAIL DISORDER DETECTION FOR DISEASE ANALYSIS
FINGERNAIL DISORDER DETECTION FOR DISEASE ANALYSIS
 
K neareast neighbor algorithm presentation
K neareast neighbor algorithm presentationK neareast neighbor algorithm presentation
K neareast neighbor algorithm presentation
 
Khi 087 revised dt report
Khi 087 revised dt reportKhi 087 revised dt report
Khi 087 revised dt report
 
Khi 117 revised dt report
Khi 117 revised dt reportKhi 117 revised dt report
Khi 117 revised dt report
 
Khi 164 revised dt report
Khi 164 revised dt reportKhi 164 revised dt report
Khi 164 revised dt report
 
Khi 054 revised dt report
Khi 054 revised dt reportKhi 054 revised dt report
Khi 054 revised dt report
 
Khi 061 revised dt report
Khi 061 revised dt reportKhi 061 revised dt report
Khi 061 revised dt report
 
Khi 022 revised dt report
Khi 022 revised dt reportKhi 022 revised dt report
Khi 022 revised dt report
 
Khi 113 revised dt report
Khi 113 revised dt reportKhi 113 revised dt report
Khi 113 revised dt report
 
Khi 156 revised dt report
Khi 156 revised dt reportKhi 156 revised dt report
Khi 156 revised dt report
 
Khi 142 revised dt report
Khi 142 revised dt reportKhi 142 revised dt report
Khi 142 revised dt report
 
Khi 316 revised dt report
Khi 316 revised dt reportKhi 316 revised dt report
Khi 316 revised dt report
 
Khi 186 revised dt report
Khi 186 revised dt reportKhi 186 revised dt report
Khi 186 revised dt report
 
Khi 052 revised dt report
Khi 052 revised dt reportKhi 052 revised dt report
Khi 052 revised dt report
 
Khi 151 revised dt report
Khi 151 revised dt reportKhi 151 revised dt report
Khi 151 revised dt report
 
Khi 150 revised dt report
Khi 150 revised dt reportKhi 150 revised dt report
Khi 150 revised dt report
 
Khi 078 revised dt report
Khi 078 revised dt reportKhi 078 revised dt report
Khi 078 revised dt report
 
LTE quick introduction session Training
LTE quick introduction session TrainingLTE quick introduction session Training
LTE quick introduction session Training
 
LTE Sales Training for CPE Device
LTE Sales Training for CPE DeviceLTE Sales Training for CPE Device
LTE Sales Training for CPE Device
 
Witribe Customer Premises Equipment Training for LTE
Witribe Customer Premises Equipment Training for LTEWitribe Customer Premises Equipment Training for LTE
Witribe Customer Premises Equipment Training for LTE
 

Dernier

Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 

Dernier (20)

Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 

classification_methods-logistic regression Machine Learning

  • 1. Classification Methods Chapter 04 (part 01) IOM 530: Intro. to Statistical Learning 1
  • 2. Logistic Regression IOM 530: Intro. to Statistical Learning 2
  • 3. Outline Cases: Orange Juice Brand Preference Credit Card Default Data Why Not Linear Regression? Simple Logistic Regression Logistic Function  Interpreting the coefficients Making Predictions Adding Qualitative Predictors Multiple Logistic Regression IOM 530: Intro. to Statistical Learning 3
  • 4. Case 1: Brand Preference for Orange Juice • We would like to predict what customers prefer to buy: Citrus Hill or Minute Maid orange juice? • The Y (Purchase) variable is categorical: 0 or 1 • The X (LoyalCH) variable is a numerical value (between 0 and 1) which specifies the how much the customers are loyal to the Citrus Hill (CH) orange juice • Can we use Linear Regression when Y is categorical? IOM 530: Intro. to Statistical Learning 4
  • 5. Why not Linear Regression? When Y only takes on values of 0 and 1, why standard linear regression in inappropriate? IOM 530: Intro. to Statistical Learning 5 0.0 0.2 0.4 0.5 0.7 0.9 .0 .1 .2 .3 .4 .5 .6 .7 .8 .9 1.0 LoyalCH Purchase How do we interpret values of Y between 0 and 1? How do we interpret values greater than 1?
  • 6. Problems • The regression line 0+1X can take on any value between negative and positive infinity • In the orange juice classification problem, Y can only take on two possible values: 0 or 1. • Therefore the regression line almost always predicts the wrong value for Y in classification problems IOM 530: Intro. to Statistical Learning 6
  • 7. Solution: Use Logistic Function • Instead of trying to predict Y, let’s try to predict P(Y = 1), i.e., the probability a customer buys Citrus Hill (CH) juice. • Thus, we can model P(Y = 1) using a function that gives outputs between 0 and 1. • We can use the logistic function • Logistic Regression! IOM 530: Intro. to Statistical Learning 7 X X e e YPp 10 10 1 )1(       0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Probability -5 -4 -3 -2 -1 0 1 2 3 4 5 X
  • 8. Logistic Regression • Logistic regression is very similar to linear regression • We come up with b0 and b1 to estimate 0 and 1. • We have similar problems and questions as in linear regression • e.g. Is 1 equal to 0? How sure are we about our guesses for 0 and 1? IOM 530: Intro. to Statistical Learning 8 0 0.25 0.5 0.75 1 .0 .2 .4 .6 .7 .9 LoyalCH CH MM If LoyalCH is about .6 then Pr(CH)  .7. P(Purchase)
  • 9. Case 2: Credit Card Default Data We would like to be able to predict customers that are likely to default Possible X variables are: Annual Income Monthly credit card balance The Y variable (Default) is categorical: Yes or No How do we check the relationship between Y and X? IOM 530: Intro. to Statistical Learning 9
  • 10. The Default Dataset IOM 530: Intro. to Statistical Learning 10
  • 11. Why not Linear Regression? If we fit a linear regression to the Default data, then for very low balances we predict a negative probability, and for high balances we predict a probability above 1! IOM 530: Intro. to Statistical Learning 11 When Balance < 500, Pr(default) is negative!
  • 12. Logistic Function on Default Data • Now the probability of default is close to, but not less than zero for low balances. And close to but not above 1 for high balances IOM 530: Intro. to Statistical Learning 12
  • 13. Interpreting 1 • Interpreting what 1 means is not very easy with logistic regression, simply because we are predicting P(Y) and not Y. • If 1 =0, this means that there is no relationship between Y and X. • If 1 >0, this means that when X gets larger so does the probability that Y = 1. • If 1 <0, this means that when X gets larger, the probability that Y = 1 gets smaller. • But how much bigger or smaller depends on where we are on the slope IOM 530: Intro. to Statistical Learning 13
  • 14. Are the coefficients significant? • We still want to perform a hypothesis test to see whether we can be sure that are 0 and 1 significantly different from zero. • We use a Z test instead of a T test, but of course that doesn’t change the way we interpret the p-value • Here the p-value for balance is very small, and b1 is positive, so we are sure that if the balance increase, then the probability of default will increase as well. IOM 530: Intro. to Statistical Learning 14
  • 15. Making Prediction • Suppose an individual has an average balance of $1000. What is their probability of default? • The predicted probability of default for an individual with a balance of $1000 is less than 1%. • For a balance of $2000, the probability is much higher, and equals to 0.586 (58.6%). IOM 530: Intro. to Statistical Learning 15
  • 16. Qualitative Predictors in Logistic Regression • We can predict if an individual default by checking if she is a student or not. Thus we can use a qualitative variable “Student” coded as (Student = 1, Non-student =0). • b1 is positive: This indicates students tend to have higher default probabilities than non-students IOM 530: Intro. to Statistical Learning 16
  • 17. Multiple Logistic Regression • We can fit multiple logistic just like regular regression IOM 530: Intro. to Statistical Learning 17
  • 18. Multiple Logistic Regression- Default Data • Predict Default using: • Balance (quantitative) • Income (quantitative) • Student (qualitative) IOM 530: Intro. to Statistical Learning 18
  • 19. Predictions • A student with a credit card balance of $1,500 and an income of $40,000 has an estimated probability of default IOM 530: Intro. to Statistical Learning 19
  • 20. An Apparent Contradiction! IOM 530: Intro. to Statistical Learning 20 Positive Negative
  • 21. Students (Orange) vs. Non-students (Blue) IOM 530: Intro. to Statistical Learning 21
  • 22. To whom should credit be offered? • A student is risker than non students if no information about the credit card balance is available • However, that student is less risky than a non student with the same credit card balance! IOM 530: Intro. to Statistical Learning 22