The Data Analytics Blog

Our news and views relating to Data Analytics, Big Data, Machine Learning, and the world of Credit.

All Posts

5 Correlation Types In Data Science And How To Not Fool Yourself

May 25, 2018 at 4:06 PM

As part of our blog series on cognitive biases and logical fallacies that data scientists should avoid, today we address a prevalent logical fallacy: the "correlation proves causation" fallacy. Correlation due to causation is just one of the five main categories of causation, and this blog will look into each of the five.

The reason we are running this series of blogs is to highlight critical thinking within the workplace and particularly in data-science. The discipline of metacognition (thinking about thinking) is essential in ensuring that when it comes to using data to lead you to the truth, you can trust what the data is telling you. This is particularly relevant in the so-called post-truth world. (Click to Tweet!)

Epistemology: the study or a theory of the nature and grounds of knowledge especially with reference to its limits and validity [Merriam-Webster]

In a previous blog on motivated reasoning, I showed how analysts could fall into the trap of searching for evidence to support a pre-held belief. Through a variety of statistically sloppy practices including the file-drawer effect (publication bias), Texas sharpshooter fallacy, p-hacking, self-fulfilling prophecy, confirmation bias and cherry picking a conclusion can be drawn from incomplete or biased data. The correlation-causation is one of the more familiar fallacies.   

“Correlation means causation” is just one of the five main types of correlation. We explore each of the five and how to identify them.

Correlation implies causation?

While it’s frequently said that correlation does not imply causation, it is not entirely true as in an observational study, correlation indicates the possibility of a causal link. The difference is that a further study/experiment needs to be conducted to determine whether this is true.

Observational Study

An observational study is what happens when an analyst looks retrospectively at data. A common problem is determining what conclusions can be drawn from the data. When motivated reasoning drives an analyst – it is quite common for that analyst to make an absolute determination. Instead, they should look to form hypotheses and then look to conduct (if possible) randomised trials to control for the independent variable. Alternatively, if they can control for that variable (through drawing out cohort groups – and conduct a study thereon) – they can draw much stronger hypotheses.

An observational study might show that red-wine drinkers live longer? Does that mean red-wine makes one live longer (direct causation) or that red-wine drinkers are more affluent and affluent people live longer (marker for another variable)?
alcohol-alcoholic-dinner-4224

Reasons for Correlation

Reasons for correlationSo when an analyst observes a strong correlation – it's important to recognise that there could be many reasons for the correlation. I've listed the five main reasons with examples and steps to identify the cause.

Marker for another causal variable (W causes X; W causes Y)

This is also known as the "third-cause fallacy". Two data fields appear correlated – it would be tempting to infer a causal link between the two, but in fact, there is a third common variable that is causing the other two.

The wine example above is an example of this type of correlation. Another rather prosaic example would be a correlation of umbrella purchases and lightning strikes. Common sense would dictate that umbrella sales don’t cause lightning strikes (or vice versa). The third common variable is stormy weather which causes both variables.

dark-evening-lightning-66867-706689-edited

Indirect Causation (X causes Z which causes Y)

The correlation between two factors may not indicate a direct causal relationship. There may be an intervening variable at play. 

blur-close-up-coffee-cup-405238

An example of this might be a frequently studied association of consumption of tea and lung cancer reduction. Many low-quality studies show strong inverse correlations between tea consumption (10 cups/day) and the onset of lung cancer. However, drinking 10 cups of tea per day means there is less time to smoke. Other studies have controlled for this factor through cohort analysis and have determined that consumption of tea for non-smokers/ex-smokers is less correlated.  

To avoid indirect causation, it is worth doing multivariate (instead of univariate) analysis. This will ensure that variable “Z” and variable “X” are analysed together. Similarly, cohort analysis on observational studies may assist too. For time-series data one can utilise Granger causality testing which gives a reasonable indication of direct causality.

Direct Causation (X causes Y)

Direct causation sometimes referred to by its Latin name “post hoc ergo propter hoc” (after therefore because of) is what we are ultimately interested in with predictive analysis. Just because a variable comes after action, does not mean that the action produces the variable.  

While this may be obvious, it is worth noting another sub-category to look out for, and that is the cyclic causation scenario.  Here Y may cause X too. The often cited example of this is the predator-prey population relationship (modelled using Lotka-Volterra modelling). Here the predator population grows with an increase in prey population; but conversely the prey population will decrease with a large predator population.

Predator Prey Population

Back to correlation due to causation.

Credit Example

In the credit risk space, having a deep understanding of the confounding data environment is essential. For something as simple as setting a good/bad definition for application scorecards, the performance of a good/bad account can be affected by many things, not only poor credit-risk behaviour. A common phenomenon in SME lending is that a business applying for working capital that is denied and then fails as a business does not necessarily imply that the decision was correct. It could be that a working capital loan could have supported the company to succeed.

Similarly, in behavioural scoring, we may predict an account has a high probability of being good in 12 months. As a result, we decide to aggressively market to the account pushing the account holder over the limit. The result is that the customer defaults on their loan. Did we underestimate the risk of the client or was our action too aggressive?

Coincidence

The fourth correlation type is pure coincidence. Humans are notoriously bad at understanding probabilities and we are consciously seeking patterns and are prone to confirmation bias. (Click to Tweet!) When we stumble upon a pattern or correlation, we may then be tempted to jump to the conclusion that causation is at hand. There are countless correlations out there. I stumbled across the website www.Tylervigen.com with some hilarious examples including the one here!

Cheese consumption bedsheet deaths

When viewing correlation in an observational study, you should make hypotheses to test later. When modelling you should keep hold-out samples or out-of-time samples on which to test the correlations.

Unknown

Sometimes the reason for correlation may not be known. Technically (scientifically) nothing is known 100%, but for some analysis, it may be too premature to draw any conclusion regarding reasons for correlation.

For more on how scientists fool themselves, I can recommend this article from Nature.

Truthseeker - logical fallacies

Thomas Maydon
Thomas Maydon
Thomas Maydon is the Head of Credit Solutions at Principa. With over 17 years of experience in the Southern African, West African and Middle Eastern retail credit markets, Tom has primarily been involved in consulting, analytics, credit bureau and predictive modelling services. He has experience in all aspects of the credit life cycle (in multiple industries) including intelligent prospecting, originations, strategy simulation, affordability analysis, behavioural modelling, pricing analysis, collections processes, and provisions (including Basel II) and profitability calculations.

Latest Posts

The 7 types of credit risk in SME lending

  It is common knowledge in the industry that the credit risk assessment of a consumer applying for credit is far less complex than that of a business that is applying for credit. Why is this the case? Simply put, consumers are usually very similar in their requirements and risks (homogenous) whilst businesses have far more varying risk elements (heterogenous). In this blog we will look at all the different risk elements within a business (here SME) credit application. These are: Risk of proprietors Risk of business Reason for loan Financial ratios Size of loan Risk industry Risk of region Before we delve into this list, it is worth noting that all of these factors need to be deployable as assessment tools within your originations system so it is key that you ensure your system can manage them. If you are on the look out for a loans origination system, then look no further than Principa’s AppSmart. If you are looking for a decision engine to manage your scorecards, policy rules and terms of business then take a look at our DecisionSmart business rules engine. AppSmart and DecisionSmart are part of Principa’s FinSmart Universe allowing for effective credit management across the customer life-cycle.  The different risk elements within a business credit application 1) Risk of proprietors For smaller organisations the risk of the business is inextricably linked to the financial well-being of the proprietors. How small is small? The rule of thumb is companies with up to two to three proprietors should have their proprietors assessed for risk too. This fits in with the SME segment. What data should be looked at? Generally in countries with mature credit bureaux, credit data is looked at including the score (there is normally a score cut-off) and then negative information such as the existence of judgements or defaults; these are typically used within policy rules. Those businesses with proprietors with excessive numbers of “negatives” may be disqualified from the loan application. Some credit bureaux offer a score of an individual based on the performance of all the businesses with which they are associated. This can also be useful in the credit risk assessment process. Another innovation being adopted internationally is the use of psychometrics in credit evaluation of the proprietors. To find out more about adopting credit scoring, read our blog on how to adopt credit scoring.   2) Risk of business The risk of the business should be managed through both scores and policy rules. Lenders will look at information such as the age of company, the experience of directors and the size of company etc. within a score. Alternatively, many lenders utilise the business score offered by credit bureaux. These scores are typically not as strong as consumer scores as the underlying data is limited and sometimes problematic. For example, large successful organisations may have judgements registered against their name which, unlike for consumers, is not necessarily a direct indication of the inability to service debt.   3) Reason for loan The reason for a loan is used more widely in business lending as opposed to unsecured consumer lending. Venture capital, working capital, invoice discounting and bridging finance are just some of many types of loan/facilities available and lenders need to equip themselves with the ability to manage each of these customer types whether it is within originations or collections. Prudent lenders venturing into the SME space for the first time often focus on one or two of these loan types and then expand later – as the operational implication for each type of loan is complex. 4) Financial ratios Financial ratios are core to commercial credit risk assessment. The main challenge here is to ensure that reliable financials are available from the customer. Small businesses may not be audited and thus the financials may be less trustworthy.   Financial ratios can be divided into four categories: Profitability Leverage Coverage Liquidity Profitability can be further divided into margin ratios and return ratios. Lenders are frequently interested in gross profit margins; this is normally explicit on the income statement. The EBIDTA margin and operating profit margins are also used as well as return ratios such as return on assets, return on equity and risk-adjusted-returns. Leverage ratios are useful to lenders as they reflect the portion of the business that is financed by debt. Lower leverage ratios indicate stability. Leverage ratios assessed often incorporate debt-to-asset, debt-to-equity and asset-to-equity. Coverage ratios indicate the coverage that income or assets provide for the servicing of debt or interest expenses. The higher the coverage ratio the better it is for the lender. Coverage ratios are worked out considering the loan/facility that is being applied for. Finally, liquidity ratios indicate the ability for a company to convert its assets into cash. There are a variety of ratios used here. The current ratio is simply the ratio of assets to liabilities. The quick ratio is the ability for the business to pay its current debts off with readily available assets. The higher the liquidity ratios the better. Ratios are used both within credit scorecards as well as within policy rules. You can read more about these ratios here. 5) Size of loan When assessing credit risk for a consumer, the risk of the consumer does not normally change with the change of loan amount or facility (subject to the consumer passing affordability criteria). With business loans, loan amounts can range quite dramatically, and the risk of the applicant is normally tied to the loan amount requested. The loan/facility amount will of course change the ratios (mentioned in the last section) which could affect a positive/negative outcome. The outcome of the loan application is usually directly linked to a loan amount and any marked change to this loan amount would change the risk profile of the application.   6) Risk of industry The risk of an industry in which the SME operates can have a strong deterministic relationship with the entity being able to service the debt. Some lenders use this and those who do not normally identify this as a missing element in their risk assessment process. The identification of industry is always important. If you are in manufacturing, but your clients are the mines, then you are perhaps better identified as operating in mining as opposed to manufacturing. Most lenders who assess industry, will periodically rule out certain industries and perhaps also incorporate industry within their scorecard. Others take a more scientific approach. In the graph below the performance of an industry is tracked for two years and then projected over the next 6 months; this is then compared to the country’s GDP. As the industry appears to track above the projected GDP, a positive outlook is given to this applicant and this may affect them favourably in the credit application.                   7) Risk of Region   The last area of assessment is risk of region. Of the seven, this one is used the least. Here businesses,  either on book or on the bureau, are assessed against their geo-code. Each geo-code is clustered, and the projected outlook is given as positive, static or negative. As with industry this can be used within the assessment process as a policy rule or within a scorecard.   Bringing the seven risk categories together in a risk assessment These seven risk assessment categories are all important in the risk assessment process. How you bring it all together is critical. If you would like to discuss your SME evaluation challenges or find out more about what we offer in credit management software (like AppSmart and DecisionSmart), get in touch with us here.

Collections Resilience post COVID-19 - part 2

Principa Decisions (Pty) L

Collections Resilience post COVID-19

Principa Decisions (Pty) L