0% found this document useful (0 votes)
4 views

Logistic Regression

Uploaded by

sherwin.ap
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Logistic Regression

Uploaded by

sherwin.ap
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Predicting Cafe Visitation with Logistic Regression for

Time Series

Mansour Ahmady Phoulady

June 18, 2024

Mansour Ahmady Phoulady Predicting Cafe Visitation with Logistic Regression for TimeJune
Series
18, 2024 1/7
Introduction

Objective: Learn how to predict customer behavior using logistic


regression based on their past visiting patterns to a cafe.

Mansour Ahmady Phoulady Predicting Cafe Visitation with Logistic Regression for TimeJune
Series
18, 2024 2/7
Scenario and Data

Scenario: Predict whether a customer will visit a cafe on the 8th day
based on their visitation record over the previous week.
Data:
Day 1: Visited (1)
Day 2: Did not visit (0)
Day 3: Visited (1)
Day 4: Did not visit (0)
Day 5: Visited (1)
Day 6: Visited (1)
Day 7: Did not visit (0)

Mansour Ahmady Phoulady Predicting Cafe Visitation with Logistic Regression for TimeJune
Series
18, 2024 3/7
Logistic Regression Model

Model Formula:
 
p
Logit(p) = log = β0 + β1 x1 + β2 x2
1−p

Where:
p is the probability of visiting the cafe.
β0 , β1 , β2 are model coefficients.
x1 is the visit on Day 7 (most recent day).
x2 is the number of visits in the past week.

Mansour Ahmady Phoulady Predicting Cafe Visitation with Logistic Regression for TimeJune
Series
18, 2024 4/7
Coefficient Assumptions

Assumed Coefficients:
β0 = −0.5 – Base effect of not visiting.
β1 = 1.0 – Influence of the most recent visit.
β2 = 0.5 – Influence of the total visits in the week.

Mansour Ahmady Phoulady Predicting Cafe Visitation with Logistic Regression for TimeJune
Series
18, 2024 5/7
Calculation
Feature Calculation:
x1 = 0 (did not visit on Day 7)
x2 = 4 (visited four times in the last week)
Log-Odds Calculation:
 
p
log = −0.5 + 1.0 × 0 + 0.5 × 4 = 1.5
1−p

Probability Calculation:
p
= e 1.5 ≈ 4.48
1−p
4.48
p= ≈ 0.82
1 + 4.48
Conclusion: There is approximately an 82% chance the customer will visit
the cafe on Day 8.
Mansour Ahmady Phoulady Predicting Cafe Visitation with Logistic Regression for TimeJune
Series
18, 2024 6/7
Conclusion

Using logistic regression, we can predict customer behavior with a


significant degree of accuracy based on their past activity. This method is
invaluable for planning and service optimization in business settings.

Mansour Ahmady Phoulady Predicting Cafe Visitation with Logistic Regression for TimeJune
Series
18, 2024 7/7

You might also like