<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Economics, data science and more - Medium]]></title>
        <description><![CDATA[Notes on my journey to be a better economist, and the career transition to a data scientist. - Medium]]></description>
        <link>https://medium.com/binh-nguyen?source=rss----7d1bfa35dfa2---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Economics, data science and more - Medium</title>
            <link>https://medium.com/binh-nguyen?source=rss----7d1bfa35dfa2---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 22:47:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/binh-nguyen" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Notes on NABE conference]]></title>
            <link>https://medium.com/binh-nguyen/notes-on-nabe-conference-acc31969a34a?source=rss----7d1bfa35dfa2---4</link>
            <guid isPermaLink="false">https://medium.com/p/acc31969a34a</guid>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Binh Nguyen]]></dc:creator>
            <pubDate>Fri, 08 Nov 2019 05:26:22 GMT</pubDate>
            <atom:updated>2019-11-08T05:26:22.716Z</atom:updated>
            <content:encoded><![CDATA[<p>My quick notes on NABE tech conference in Seattle Fall 2019</p><p><strong>Notes for economists and new grad trying to get into data science field</strong></p><ul><li>Learn to code in Python/R well. It will help you tremendously to get a job in tech company and as a data scientist overall. SQL is also important.</li><li>Although there are many different fields, especially STEM, whose students trying to get into data science, economists have certain advantages in our way of thinking about causal inference, intuition and measurement. Look, amazon hires a lot of economists and other companies are following that path. In addition, while you may feel the competition is fierce, there are only a handful of qualified candidates and you are certainly one of them with a PhD in economics.</li><li>Communication skill is key. You needs to sell yourself, you need to communicate your results to influence product directions and decision makers, be it engineers, marketers or product managers. Practice communication skill regularly.</li><li>Invest in interviewing skill, and I can’t stress this enough. In academia and in life general, people don’t want to sell themselves, they prefer to be modest and secretly hope that people will eventually realize how great they are. In interview battle, you have half an hour or half a day to impress the interviewers that you a great fit for the team. Interview skills do make a different here.</li><li>Understand the value of economics phd: economic intuition, thinking through models, more care for data/measurement, causal inference.</li></ul><p><strong>Things to do with huge pay-off</strong></p><ul><li>github</li><li>review of causal inference</li><li>build a project: text analytics and deep learning</li><li>quick notes: synthetic control group</li><li><a href="https://www.aeaweb.org/webcasts/2019/aea-afa-joint-luncheon-impact-of-machine-learning">https://www.aeaweb.org/webcasts/2019/aea-afa-joint-luncheon-impact-of-machine-learning</a></li><li>double selection method <a href="https://medium.com/teconomics-blog/using-ml-to-resolve-experiments-faster-bd8053ff602e">https://medium.com/teconomics-blog/using-ml-to-resolve-experiments-faster-bd8053ff602e</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=acc31969a34a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/binh-nguyen/notes-on-nabe-conference-acc31969a34a">Notes on NABE conference</a> was originally published in <a href="https://medium.com/binh-nguyen">Economics, data science and more</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Customer insights: the determinants of being a promoter]]></title>
            <link>https://medium.com/binh-nguyen/customer-insights-the-determinants-of-being-a-promoter-cd042fc3e062?source=rss----7d1bfa35dfa2---4</link>
            <guid isPermaLink="false">https://medium.com/p/cd042fc3e062</guid>
            <category><![CDATA[promoters]]></category>
            <category><![CDATA[nps]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[marketing]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Binh Nguyen]]></dc:creator>
            <pubDate>Sun, 03 Nov 2019 05:26:18 GMT</pubDate>
            <atom:updated>2019-11-08T05:31:09.592Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Introduction</strong></h3><p>NPS (net promoter scores) have been a major indicator of whether members are satisfied with a certain product or services. In this article I will walk you through the process of digging into a survey data to understand the determinants of promoters using NPS.</p><p><strong>What is NPS:</strong> <strong>A metric utilized across industries to measure advocacy for a company</strong>, brand, product or service among its customers, consumers, and clients</p><p><strong>How is NPS calculated?</strong> Based on Likelihood To Recommend (asked on a 0–10 scale), <em>NPS is the difference in an organization’s percentage of</em> <strong>Promoters<br> </strong>[rated 9,10]<em> and its percentage of</em> <strong>Detractors</strong> [rated 0–6]</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/525/1*DRryzsCx9iDljoxfLB4XKw.png" /><figcaption>NPS calculator</figcaption></figure><h3><strong>The data</strong></h3><p>The survey data was collected as a part of the Key Member Indicator Program. The data connections and complementary operational, clinical, and financial metrics were collected through the Connected NPS Data project. Due to data privacy issue, I will not disclose more information but this is a large survey with 9 years of data and roughly 100,000 observations and 1,500 variables.</p><p><strong>Proposed projects</strong></p><p>Based on the team needs and availability of data, I propose three approaches</p><ul><li>Multivariate analysis where we use logistic regression and other quasi-experimental design to understand the determinants of promoters — explaining using odds ratios → present results and actionable insights</li><li>Predictive modelling: logistic regression, random forest and gradient boosting — grid search.</li><li>Sentiment analysis: Use user feedback and comments to predict promoters.</li></ul><h3><strong>Multivariate Regressions</strong></h3><p>•<strong>Model</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wAZnNCECIbJEgK-yJzNG5w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*tL9sGldKou6gtELBEtVSSQ.png" /><figcaption>MuDeterminants of NPS promoters</figcaption></figure><p><strong>Multivariate analysis results</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*XmWXRnnX6JUg8wHYKniJuA.png" /><figcaption>Multivariate analysis results</figcaption></figure><p><strong>Summary of results</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/855/1*RdJ1jzzrNhbsUK4_2qmKew.png" /><figcaption>Summary of results</figcaption></figure><h3><strong>Predictive modelling</strong></h3><p><strong>Question: </strong>How well can we predict promoters using demographic, financial, and insurance plan information?</p><p><strong>Data</strong></p><p>The survey data was collected as a part of the collaborative efforts between multiple departments such as customer loyalty economics, strategic insight, claims data. The data connections include demographics, insurance plan information, claims and financial information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5_YVy-iTbSryvl89Co_Y5w.png" /><figcaption>Project workflow</figcaption></figure><p><strong>Data preparation</strong></p><p>The data preparation process is similar to the multivariate analysis.</p><ul><li>We use demographic, insurance plan information and financial information to build predictive model for the likelihood of being a promoter.</li><li>We use 80% of data for training and set aside 20% for testing the model. Full data: 91,326 rows, 1,512 variables; training sample: 73,060 rows, 35 variables; Testing sample: 18,266 rows, 35 variables. We train and optimize the model on training data and test the final model on testing data.</li><li>Criteria for evaluating the model is the <em>receiver operating characteristics</em> (ROC) curve which plots the true positive rate (recall) against the false positive rate.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zT_PtGWx48c7Du3OS6sCcg.png" /><figcaption>Summary of results — predictive models</figcaption></figure><p><strong>Data visualization</strong></p><ul><li>Tabulate across member types: detractors, passives and promoters</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*nCK8oOQ6XTgfiNcAs3cKMg.png" /></figure><ul><li>Scatter plots for claims amount</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/566/1*5zcGNwa3_rP4mPDAcYii-Q.png" /></figure><ul><li>Boxplots and scatter matrix</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/394/1*10O3CRqIvGQRY1Tg3rmrYA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/1*B1_Rb3AQqOkhz8otM1VNug.png" /></figure><p><strong>Feature engineering</strong></p><p>Depending on the structure of the data, our features are combination of dummy variables and continuous variables. I built the variables based on my social science and health economics knowledge, i.e, where to cut off the line for maximum out-of-pocket spending, premium amount, and deductible.</p><p><strong>Building models</strong></p><p><strong>Logistic Regression</strong></p><p>how to calculate the threshold for high — medium — low if we’re going to build the predictive model for promoters?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r73JAECUqvXlqgyvJTs7nw.png" /><figcaption>Sample of ROC for logistic regression</figcaption></figure><p><strong>Random forest model</strong></p><p>One of the advantage of random forest model is feature importance which can tell you which variables are important and which are not.</p><p><strong>Feature importance</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ik6qrS5jkeHWDBhS5Trh8A.png" /><figcaption>Sample top features importance</figcaption></figure><p>Grid search and cross validation for random forest model</p><p><strong>Gradient boosting model</strong></p><p>Gradient boosting model is a general optimization algorithm which tweaks parameters iteratively in order to minimize a cost function. Important parameters in Gradient Descent include size of the steps, learning rate and number of estimators. While it takes us a very long time to run grid search, a quick run of a few options suggest that gradient boosting model performance is similar to that of random forest model.</p><p><strong>Sensitivity Analysis</strong></p><p>After talking with the market insights team, I learn that there are differences in data quality across years and in recent years they have better data and more features that may generate more insights for us. So we limit our sample to most recent years 2017–2018 only and the results are largely similar but we learn that locations and out of pocket maximum costs become more important factors in deciding whether the person is a promoter or not.</p><p>We also take out other features to see if the multivariate analysis results are the same.</p><h3>Sentiment Analysis: predict promoters using member’s feedback</h3><p>I explore the power of Natural language processing to help identify sentiments, whether it is positive (promoters) vs. not (non-promoters). I use the package NLTK which is a powerful Python package that provides a set of diverse natural languages algorithms.</p><p>Steps that I took are:</p><ul><li>Tokenization: The process of breaking down a text paragraph into smaller chunks such as words or sentence</li><li>Stop words: removing stop words such as is, am, are, this, a, an, the</li><li>Lemmatization: educes words to their base word</li></ul><p><strong>Text classification</strong></p><ul><li>Sentiment Analysis using text classification</li><li>Feature generation using <strong>Bag of Words (</strong>generate document term matrix by using sklearn CountVectorizer</li><li>Split train and test set (standard practice)</li><li>Build text classification model using TF-IDF and using Multinomial Naive Bayes classifier to train the model. The accuracy score is good (0.665).</li><li>Feature generation using Term Frequency (TF) Inverse Document Frequency (IDF) normalizes the document term matrix. Similar accuracy score 0.6596</li><li>We also try deep learning with Keras but the results are similar.</li></ul><h3><strong>Limitations and Future Work</strong></h3><p>Limitations</p><ul><li>As a trained economist, I prefer causal inference to associations but in this project we only look for multivariate correlation since there are no quasi-natural experiment set up. As a result, we know the correlations but not causal effects.</li><li>The data quality could be better and more consistent across years.</li><li>Model performance could be better.</li></ul><p><strong>Next steps</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z2hAH_aTzKq0hof1WTI3wg.png" /></figure><h3><strong>Conclusion</strong></h3><p>This is a rough guide for data scientist using survey data to explore the NPS and its determinants. I hope you find the guide useful and I will keep posting more advance tutorials in this customer insight journey exploration. Happy browsing!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd042fc3e062" width="1" height="1" alt=""><hr><p><a href="https://medium.com/binh-nguyen/customer-insights-the-determinants-of-being-a-promoter-cd042fc3e062">Customer insights: the determinants of being a promoter</a> was originally published in <a href="https://medium.com/binh-nguyen">Economics, data science and more</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>