Article

September 30, 2026

Purchase Propensity Score Modeling using Logistic Regression: A Case Study in a Food Sector Company

Purchase Propensity Score Modeling Using Logistic Regression: A Case Study in a Food Sector Company

André Fernandes Pimenta; Ricardo Franceli da Silva

DOI: 10.22167/2675-6528-202602668

Article derived from a Course Conclusion Work (TCC), with content based on the student’s original work and adapted to the editorial format of the E&S Magazine with the support of the ResumeAI tool, an artificial intelligence solution developed by Instituto Pecege for textual synthesis and organization.

Summary

In the competitive context of the business-to-business (B2B) market, identifying customers with a high probability of purchase represents a strategic differential for the efficiency of sales management. The study aimed to develop a purchase propensity score model, using logistic regression, applied to historical sales data, customer relationships, and characteristics of a company in the food sector operating in the Food Service channel, specifically in the city of São Paulo. The methodology involved stages of variable extraction, treatment, and engineering, followed by model training and its evaluation using established predictive performance metrics, such as accuracy, AUC-ROC, and F-score. The data were separated into training (80%) and testing (20%) sets, and variables were selected using a stepwise procedure. The results demonstrated high discriminatory capacity and good balance between precision and sensitivity, indicating that the model efficiently ranked customers according to their estimated purchase probability. The overall accuracy reached 84%, and the area under the ROC curve was approximately 0.90. It was concluded that the generated score is a relevant tool to support decisions on customer prioritization, portfolio segmentation, and commercial action targeting, optimizing resources and promoting a data-driven B2B strategy.

Keywords: Predictive analysis; Supervised learning; Sales Intelligence; Commercial optimization; Customer segmentation.

1. Introduction

In-depth knowledge and precise classification of the customer base are fundamental elements for companies’ commercial strategy and planning. However, it is frequent that retention actions are implemented without well-defined analytical criteria, resulting in the homogeneous treatment of customers who are, in fact, heterogeneous (Kotler & Keller, 2016; Reichheld, 1996).

In this scenario, the absence of a differentiated approach to customer relationship management can compromise commercial efficiency. Predictive customer classification models emerge as a strategic solution, enabling base differentiation, effective action targeting, reduction of operational costs, and increased customer retention (Neslin et al., 2006; Verbeke et al., 2012). Classic marketing literature already highlights that customer retention is economically more advantageous than acquiring new ones, with acquisition costs being five to seven times higher than maintenance costs (Kotler, 2015). Furthermore, repeat customers show a repurchase probability between 60% and 70%, while new consumers present a significantly lower chance, between 5% and 20% (Hull, 2013).

Among predictive approaches, propensity models are widely used machine learning techniques in Customer Relationship Management (CRM) contexts. They are developed to estimate the probability of a customer taking a specific action, such as a purchase or repurchase (Provost & Fawcett, 2013; Ngai et al., 2009). The discussion on propensity models is vast in academic literature, being recognized as essential tools for predicting behaviors and supporting retention and segmentation strategies in marketing (Guenther et al., 2025). In the current Big Data context, where large volumes of transactional, firmographic, and conjunctural data are constantly generated and captured, it becomes crucial to select the most relevant data with the greatest explanatory power for the analyzed event, through filtering and clustering.

The need for tools that empower companies to know their customers and support retention actions is evident. In the context of the food industry company studied, operating in the Food Service channel, it was found that the “churn” behavior – customers who stopped buying – in the city of São Paulo resulted in an economic impact of four million reais in 2025 in unrealized contribution margin. Customer retention is, therefore, a key piece in commercial management, preventing negative effects on the portfolio and promoting the stability necessary for long-term growth. Customer segmentation, in turn, allows for the prioritization of commercial approach and the efficient allocation of resources, such as marketing budgets, sales team visits, and discount concessions. The construction of a purchase propensity score meets this need, allowing decisions to be data-driven.

Given this scenario and the strategic relevance of identifying customers with a higher propensity to purchase, the objective of this research was to build a predictive model capable of informing the propensity to purchase in the following month (M+1) for the Food Service customers in the city of São Paulo of the studied company.

2. Material and Methods

The research was characterized as a case study of a quantitative nature, with a predictive approach. The central objective was to build a purchase propensity score model for Food Service channel clients of a company in the food sector, specifically in the city of São Paulo, aiming to estimate the probability of purchase in the following month (M+1).

The unit of analysis consisted of active clients of the studied company, operating in the Food Service channel in the city of São Paulo. The temporal horizon of the data covered 21 months, from July 2024 to March 2026. The initial database contained 67,389 records referring to 3,209 clients, which were filtered to 64,180 records after the removal of missing values in the target variable.

The data were extracted from internal company databases (Company BI and SAP Company) and external sources, such as the Federal Revenue Service, the Central Bank, and the Brazilian Institute of Geography and Statistics (IBGE). The Tomtom API was used for customer geolocalization by district. Transactional data on sales, returns, and complaints were collected, in addition to firmographic, geographic, and macroeconomic information.

The initial stage involved the extraction and *data wrangling* of the data, using Alteryx software to collect, treat, integrate, and model information visually. Files from different repositories were merged and transformed into a single file with the `.yxdb` extension, consolidating the base for variable construction.

The study subjects were identified as customers of the Food Service channel in the city of São Paulo with “Active” registration status with the Federal Revenue, according to the February 2026 release. The transactional base of invoiced and returned volumes was filtered for these customers, and the order base was integrated to obtain information on frequency and average ticket.

Portfolio proportion variables were constructed, such as “Flour_Proportion”, “Pre-mix_Proportion”, and “Complementary_Proportion”, indicating the percentage of each product category sold. Other transactional variables created included “Recency” (time since last transaction) and “Purchased Mix” (diversity of items purchased). The target variable, “Target_Purchase_M1”, indicated purchase in the following month.

The construction of the purchase propensity model was carried out in Google Colaboratory (Google Colab), using Python code. The *dataset* was divided into training (80%, 51,344 records) and test (20%, 12,836 records) sets randomly and stratified, using the `sklearn.modelselection.train_test_split` function.

To mitigate data leakage, identifying variables (`Cliente_ID`) and auxiliary temporal fields were excluded. The target variable `Target_Compra_M1` was segregated before training, and preprocessing was implemented through a pipeline to estimate standardization parameters exclusively from the training data.

A specific treatment was applied to the “Recency” column, where values of 999, indicating absence of movement, were replaced by a “No_History” *flag* and imputation of the maximum observed recency. The numerical variables were standardized by the *z-score* technique, using the `StandardScaler()` function from the `scikit-learn` library, to equalize their scales.

The selection of the most relevant variables for the model was performed using the *stepwise* procedure. The logistic regression algorithm was employed to estimate the probability of purchase, being a statistical method suitable for analyzing the relationship between explanatory variables and a binary categorical dependent variable (Fávero et al., 2017).

The model was evaluated using predictive performance metrics, such as precision, sensitivity (recall), F1-score, and the area under the ROC curve (AU-ROC). For the calculation of these metrics, an operational threshold of 0.5 was adopted, considering the absence of significant asymmetric costs between false positives and false negatives in the prediction.

3. Results and Discussion

The results of the purchase propensity score modeling, developed through logistic regression and stepwise variable selection, showed robust and consistent predictive performance. Of the 148 variables initially considered in the dataset, 50 were selected as the most relevant for predicting next month’s purchase behavior. The model’s overall accuracy reached 84%, indicating that the vast majority of observations were correctly classified, both for customers who made a purchase and for those who did not, demonstrating a good fit to the analyzed data and a balance between classification errors.

The model’s discriminatory capacity was reinforced by the ROC curve analysis, which presented an Area Under the Curve (AUC-ROC) of approximately 0.90. This value is considered excellent in binary classification problems, suggesting that the model has about a 90% probability of assigning a higher score to a customer who actually makes a purchase compared to a customer who does not. This high capacity to rank customers according to their conversion probability is crucial for the practical application of the score in commercial strategies.

The detailed analysis of the classification report revealed a balanced behavior between precision and sensitivity for both classes. For the buyer customer class (Event 1), the model achieved a recall of 0.84, indicating that most customers who actually purchased were correctly identified. Although the precision for this class was slightly lower, at 0.79, this characteristic is expected in models whose objective is to maximize the identification of commercial opportunities, accepting a controlled proportion of false positives in exchange for greater coverage of potential customers.

Regarding the class of non-purchasing customers (Event 0), the model demonstrated a precision of 0.88 and a recall of 0.85. These values indicate a high capacity to correctly identify customers who would not make a purchase, which contributes to the reduction of unnecessary commercial approaches and resource optimization. The proximity of the macro and weighted averages of precision, recall, and F1-score metrics, all around 0.84, confirms the consistency of the model’s performance across classes and the absence of significant bias due to a slight imbalance in the database.

Additionally, the observed log-likelihood value of -5010.6441 suggests a good relative fit of the model to the data, especially when interpreted in conjunction with other performance metrics such as AUC, Gini, and F1-score. In logistic regression models, log-likelihood is a comparative measure that, in this context, corroborates the adequacy of the estimated model for the task of predicting purchase propensity. The choice of an operational threshold of 0.5 for calculating classification metrics was justified by the absence of significant asymmetric costs between false positives and false negatives, unlike in scenarios such as fraud detection.

The confusion matrix provided a clear view of the model’s performance. It was found that 6,383 non-buyer customers were correctly classified (true negatives), and 4,435 buyer customers were correctly identified (true positives). In contrast, 1,143 false positives were observed, which are customers classified as buyers but who did not make a purchase, and 875 false negatives, which are buyer customers not identified by the model. These results indicate that the model can adequately recognize most buyers, while maintaining reasonable control over incorrect classifications, reinforcing its utility for prioritization and business decision support.

The analysis of the estimated coefficients of the predictor variables revealed important insights into the factors influencing purchase propensity. The `Complementar_Proporcao` variable showed the largest absolute coefficient, with a negative value, indicating that the greater the participation of complementary products in the purchase volume, the lower the probability of purchase in the following period. This may reflect a customer profile that is less recurrent or has more sporadic consumption, acquiring complementary products occasionally.

In contrast, `Valor_Faturado_MesAnterior` exhibited a relevant positive coefficient, suggesting that customers with higher invoicing in the previous month tend to present a greater propensity to repurchase. This finding aligns with the expectation of continuity in the business relationship and the importance of a recent sales history. Similarly, `Frequencia_MesAnterior` also demonstrated a positive effect, reinforcing that a recent history of frequent purchases increases the probability of a new purchase.

The `Recency` variable, with a negative coefficient, indicated that the longer the time since the last purchase, the lower the customer’s propensity to buy again. This is a crucial indicator of customer inactivity risk. Interestingly, `Volume_Faturado_MesAnterior` also showed a negative coefficient, which may suggest that high volumes in the recent past are associated with concentrated purchases or stock replenishment, reducing the need for immediate repurchase in the following month.

Other variables, such as `Frequency` (current) and `Gross_Price` (current), showed positive coefficients, indicating that more active customers and those operating under certain price levels tend to have a higher probability of conversion in the subsequent period. Segmentation and location variables, such as customer category `A` and the neighborhoods `ALTO_DE_PINHEIROS` and `MOEMA`, also proved relevant, although with smaller magnitude coefficients. These indicators suggest that regional and customer profile characteristics contribute to explaining purchase propensity.

The coherence of the signals and magnitudes of the coefficients with business logic reinforces the model’s ability to adequately capture the behavioral, historical, and portfolio composition effects in explaining the purchase decision. This interpretability is an important differentiator for the practical application of the model, allowing commercial teams to understand the factors that drive or inhibit purchases.

The distribution of purchase propensity scores, visualized in a histogram, revealed the existence of three main customer groups. A concentration of customers with less than 30% chance of purchase was observed, a zone of indifference or moderate propensity between 30% and 50%, and a group of customers with high purchase propensity above 50%. This insight is fundamental for customer segmentation and for directing specific commercial actions for each profile, optimizing resource allocation.

Despite the satisfactory results, some limitations should be considered in the interpretation of the findings. The adopted approach did not explicitly incorporate the temporal dimension of the data, treating each observation independently. This implies that potential seasonality effects, market trends, and temporal dependencies in purchasing behavior may not have been ideally captured, which limits the model’s generalizability to operational scenarios involving new customers or future periods. The availability of explanatory variables is also a limitation, as the model’s performance is conditioned on the available set of attributes, and the inclusion of more detailed information on commercial relationships, marketing actions, and external factors could enhance predictive capability.

In summary, the purchase propensity score model developed, using logistic regression and stepwise variable selection, demonstrated high discrimination capacity and robust and consistent performance. The findings, including 84% accuracy and an AUC-ROC of 0.90, along with the interpretability of the coefficients of the most influential variables, confirm that the model is a valuable tool for ranking customers according to their purchase probability. This allows the food industry company to prioritize customers, segment its portfolio, and direct commercial actions more efficiently and data-driven, responding to the objective of informing purchase propensity in the following month for Food Service customers in the city of São Paulo.

4. Conclusion

This study aimed to build a predictive model capable of informing the purchase propensity in the following month (M+1) for the Food Service clients of the city of São Paulo from a company in the food sector. To this end, a purchase propensity score model was developed using logistic regression and variable selection by the stepwise method. It was found that the model presented robust and consistent performance, with an overall accuracy of 84% and an Area Under the Curve (AUC-ROC) of approximately 0.90, indicating a high discriminatory capacity and a good balance between precision and sensitivity in classifying buying and non-buying customers. The analysis of the predictor variable coefficients revealed that the proportion of complementary products in the purchase mix (`Complementar_Proporcao`) exerted the greatest negative influence on purchase propensity, while `Valor_Faturado_MesAnterior` and `Frequencia_MesAnterior` showed significant positive effects. `Recencia` and `Volume_Faturado_MesAnterior` also proved important, with negative coefficients suggesting lower repurchase propensity in scenarios of longer time since the last purchase or high volumes in the recent past. The distribution of purchase propensity scores allowed for the identification of distinct customer groups, which constitutes a fundamental practical contribution for the company. The generated score is a valuable tool to support decisions on customer prioritization, portfolio segmentation, and targeting of commercial actions, optimizing resources and promoting a data-driven B2B strategy.

Despite the promising results, some limitations were identified. The adopted approach did not explicitly incorporate the temporal dimension of the data, which may have restricted the capture of seasonality effects, market trends, and temporal dependencies in purchasing behavior. This limits the model’s generalizability to new customers or future periods. Furthermore, the availability of explanatory variables conditioned the model’s performance, and the unequal distribution of classes, although mitigated, remains a challenge for identifying the minority class. It is suggested that future research explore the explicit inclusion of temporal dynamics in purchasing behavior, adopt more robust validation strategies, such as temporal and customer-grouped validation, and enrich the database with new behavioral, commercial, and contextual variables. Comparing logistic regression with more sophisticated algorithms, such as gradient boosting methods and neural networks, may also offer performance gains and deepen the understanding of factors influencing customers’ purchase propensity.

Bibliographic References

Fávero, L.P. et al. 2017. Manual de análise de dados: estatística e modelagem multivariada com Excel®, SPSS® e Stata®. Elsevier, Rio de Janeiro, RJ, Brasil.

Guenther, P.; Guenther, M.; Misra, S.; Koval, M.; Zaefarian, G. 2025. Propensity score modeling for business marketing research. Industrial Marketing Management, v.127, p.14-28.

Hull, P. 2013. Tools for entrepreneurs to retain clients. Forbes. Disponível em: <https://www.forbes.com/sites/patrickhull/2013/12/06/tools-for-entrepreneurs-to-retain-clients/>. Acesso em: 5 mar. 2026.

Kotler, P.; Armstrong, G. 2015. Princípios de marketing. 17ed. Pearson Education do Brasil, São Paulo, SP, Brasil.

Kotler, P.; Keller, K.L. 2016. Administração de marketing. 15ed. Pearson Education do Brasil, São Paulo, SP, Brasil.

Neslin, S.A. et al. 2006. Defection detection: measuring and understanding the predictive accuracy of customer churn models. Journal of Marketing Research, v.43, n.2, p.204-211.

Ngai, E.W.T.; Xiu, L.; Chau, D.C.K. 2009. Application of data mining techniques in customer relationship management: a literature review and classification. Expert Systems with Applications, v.36, n.2, p.2592-2602.

Provost, F.; Fawcett, T. 2013. Data science for business. O’Reilly Media, Sebastopol, CA, EUA.

Reichheld, F.F. 1996. The loyalty effect: the hidden force behind growth, profits, and lasting value. Harvard Business School Press, Boston, MA, EUA.

Verbeke, W.; Dejaeger, K.; Martens, D.; Hur, J.; Baesens, B. 2012. Predictive modeling for customer churn management: a survey and future directions. Decision Support Systems, v.53, n.4, p.661-675.

Article originating from the Final Course Project of the Specialization in Data Science and Analytics of the MBA USP/Esalq

To learn more about the course, click here and access the MBX Academy platform

You may also like

Economy, Investments And Banking

October 23, 2026

Financial Education, Behaviors and Biases in Financial Decision Making

Personal financial management represents a growing challenge, influenced by cognitive biases that affect decision-making, even in individuals with high knowledge. The present study analyzed the relationship between the level of financial education and the occurrence of behavioral biases in the financial decision-making of adults residing in Brazil. An applied, quantitative, and descriptive-correlational field survey was conducted by administering a structured questionnaire to 163 respondents. The instrument included sociodemographic variables, financial knowledge and habits, and hypothetical situations to identify cognitive biases. The results indicated that higher levels of financial education were associated with better financial control, saving, and investment practices, with significant correlations with income and schooling. However, the presence of behavioral biases (anchoring, loss aversion, scarcity, optimism/negativity, present bias, status quo, overconfidence, and mental accounting) persisted even among individuals with higher schooling and income, with no statistically significant association with the analyzed sociodemographic variables. It was concluded that financial education, although essential for financial organization and control, was not sufficient to neutralize the influence of cognitive biases. The incorporation of behavioral approaches into financial education programs is suggested.

Keywords: Financial behavior; Behavioral economics; Personal finance; Cognitive heuristics; Cognitive biases.

October 22, 2026

Consumer Journey in the Decision to Purchase Infoproducts in the Digital Environment

The expansion of e-commerce and technological transformation have driven the need to understand consumer behavior regarding infoproducts, whose perceived experience has become crucial for professional development. The study aimed to analyze the factors that influenced the purchase decision of infoproducts in the digital environment, considering the stages of the consumer journey. An applied, quantitative, and descriptive research was conducted through a field survey with 100 consumers from Serra Gaúcha. Data collection occurred via a structured questionnaire, using non-probabilistic sampling. The results revealed a qualified audience with strong “mobile-first” behavior. It was found that the availability of detailed information and social approval were the main attraction triggers in the pre-purchase phase. In the transactional and subsequent stages, the minimization of operational friction, the agility of immediate access, and system security proved crucial for conversion and satisfaction, although gaps in human support efficiency were identified. Retention was based on the trust generated by positive past experiences, overcoming the price factor. It was concluded that the infoproduct consumer journey operates as an integrated system, requiring alignment between technological infrastructure, content curation, and support humanization to ensure engagement.

Keywords: E-commerce; Consumer behavior; Consumer experience; Loyalty; Virtual business.

October 22, 2026

Forecast of Aggregate Default in the Brazilian Financial System by Sarimax Model with Macroeconomic Variables

Aggregate non-payment in the Brazilian financial system is a crucial indicator of credit risk, the prediction of which is regulated by CMN Resolutions n.° 4.557/2017 and 4.966/2021 for the prospective measurement of expected losses. Aggregate non-payment was modeled and predicted using the SARIMAX model, projecting its trajectory until December 2026 under optimistic, base, and pessimistic scenarios. 164 monthly observations (July/2012 to February/2026) and macroeconomic variables such as unemployment, Selic, IPCA, IBC-Br, and household debt were used. The specification with contemporaneous variables was selected based on information criteria and coefficient stability, and residual diagnostics confirmed statistical adequacy, with a MAPE of 3.12%. Historical non-payment ranged between 4.33% and 7.64%. The estimation identified unemployment (β = 0.2534; p < 0.001) and Selic (β = 0.2128; p < 0.001) as the main positive determinants, with strong temporal persistence (AR(1) = 0.8965). Selic showed increasing correlation with non-payment (r = 0.62 at lag 12), while unemployment demonstrated a contemporaneous effect (r = 0.33). Projections indicated non-payment between 6.30% and 7.98% in December 2026, with a range of 1.68 percentage points, highlighting direct implications for provisioning in financial institutions.

Keywords: Unemployment; Predictive modeling; Monetary policy; Loss provisioning; Time series.