← Back to Blog

# Sensitivity Analysis, Explained

### Sensitivity analysis is a powerful tool that can help you understand how variables affect one another in complex models.

If you run a company, or manage a product, then chances are that there's one key number you care about above all else. For many, this is profit.

Having one key metric like this is all well and good, but you can't just increase profit magically. To improve any metric, you need to improve the metrics that feed into it.

To increase profit, you need to increase revenue and reduce costs; to increase revenue you need to drive sales and boost your revenue/sale; and so on.

Your profit will be more sensitive to some factors than others. For example, your profit is likely to be more sensitive to the prices you charge than it is to how much you spend on payment processing fees.

To understand how sensitive metrics like profit are to the metrics that feed into them, we need to understand something called sensitivity analysis.

## What is sensitivity analysis?

Broadly speaking, sensitivity analysis is the process of understanding how different values of input variables affect a dependent output variable.

In the context of a business, the input variables might be things like number of staff, cost of goods, prices charged, and the dependent output variable could be profit.

A sensitivity analysis run on these variables would be able to tell us how much changes of the input variables' values affect the business's profit.

For example, it might reveal that the business's profit is highly sensitive to (i.e. affected greatly by) changes in its pricing structure, but less sensitive to other factors.

## Who uses sensitivity analysis?

The examples so far have all focused on a business, but really the scope of sensitivity analysis is much broader than this. Below are some examples of how sensitivity analyses are commonly employed in the real world.

Sensitivity analyses are commonly employed in the context of trading, because they help traders understand how sensitive stock prices are to different factors.

For example, a stock trader might carry out a sensitivity analysis to understand how sensitive the price of a particular stock is to:

• Macro-economic conditions
• Company financials
• Consumer trends

Understanding how sensitive a particular stock price is to each of these factors, paired with an understanding of how likely these factors are to change, can help a trader understand how much risk is associated with a particular stock's price.

For example, let's say a trader is attempting to assess the risk associated with buying stock in an oil company. A sensitivity analysis might reveal that the company's share price is highly sensitive to the price of oil. If the trader is concerned about the potential for oil prices to drop, they could see the stock as too risky and decide not to buy it.

### Climate Modelling

Meteorologists use models to predict future climate conditions. These models are often extremely complex, and rely on lots of different data sources.

By performing sensitivity analysis on these models, it's possible to understand which inputs (often historical data) the model output (future climate condition) is most sensitive to.

This can help the modellers understand which of their input variables are the most important to know accurately, and so can prioritise data collection for these inputs.

While you're likely not a stock trader or meteorologist yourself, the above goes to show the wide range of applications for sensitivity analysis.

Whenever there's an output variable that depends on a number of input variables, sensitivity analysis can help you understand just how sensitive that output is to each of its inputs.

## What are the different types of sensitivity analysis?

One mistake that a lot of sources make on this topic is in assuming that there is just one type of sensitivity analysis that covers all use cases.

We're going to break sensitivity analysis down into two separate types, and understand what sort of situations are most suited to each type.

### Basic sensitivity analysis

This is the type of sensitivity analysis you'll find most frequently if you search for the topic online.

It's fairly simple, and it seeks to answer the question: how much does my output variable change for a specific set of changes in my input variable(s)?

Basic sensitivity analyses answer this question by choosing one or two input variables in a model, plotting out a range of different values for these input variables, and seeing how the output variable is affected in each case.

For instance, we might want to perform a basic sensitivity analysis to understand how the profit on a product is affected both by its price, and the amount of marketing we run for it.

To do this, we might produce a grid in a tool such as Excel or Google sheets, where we have different values of the input variables along each of the axes:

Assuming that we have some understanding of how our profit relates to the input variables (product price and marketing budget), we can write a formula in each cell of the grid which shows the profit we'd expect for that marketing budget and product price.

This might look like:

Where in the above I've used a green highlight to show which sections of the grid produce the most profit.

What this sort of sensitivity analysis shows us is twofold:

• Firstly it shows us which combination of our two input variables (product price and marketing budget) lead to the maximum profit.
• It also shows us how sensitive our profit is to certain discrete changes in either marketing budget, or product price. Looking at the data above for instance, we can see profit is generally more sensitive to product price than it is to marketing budget.

While the above two points are useful to understand, there are some problems with this basic approach to sensitivity analysis. These are:

• Discreteness
The above method only lets us look at how sensitive out output variable is to discrete changes in our input variable. This is bad because the input variable values we choose are arbitrary, but end up having an impact on how we understand sensitivity. To see this, just imagine if I'd used \$0.10 increments of product price in the grid above; profit would have appeared almost completely insensitive to price.
• Scalability
While the above method works well if we're considering just one or two input variables, it's much harder to calculate and visualise when we consider three or more input variables. Given that we often want to perform sensitivity analyses with a whole range of input variables, this presents a problem.

To overcome these challenges with basic sensitivity analyses, let's consider a more powerful approach to sensitivity.

Thanks! We'll be in touch soon.
Oops! Something went wrong while submitting the form.

### Variance-based sensitivity analysis

Variance-based approaches come at sensitivity from a different angle. To appreciate it though, we first have to say a few things about 'variance'.

What is variance?

When you have an output variable whose value you don't know with certainty, you can model this with a probability distribution.

For example, given a set of business inputs you might not know exactly what your profit will be, but you can estimate it to being within a certain range. We can speak of this by saying that your profit has a certain distribution.

If one of your inputs changes, this will affect your profit distribution. It might move its mean (indicating that your expected profit has increased or decreased) or it might change the distribution's width (making your more or less certain of how much profit you'll generate).

Roughly speaking, the variance of your profit distribution is a measure of the distribution's width. The wider the distribution, the more uncertain you are of what your profit will be, and the greater the variance in your profit.

Back to sensitivity

Variance-based sensitivity analyses ask the question: how much of my output variable's variance is explained by each of my input variables?

If analysis shows that your output variable (i.e. profit) has a distribution whose variance is almost entirely explained by one input variable (i.e. product pricing), then the conclusion is that your profit is very sensitive to product pricing.

Similarly, if a variance-based sensitivity analysis shows that other input variables (i.e. marketing budget) have no impact on the variance of your output variable, then your profit is said to be insensitive to your marketing budget.

Variance-based approaches succeed in a few key areas where basic approaches fail:

• Quantified sensitivity
Variance-based approaches actually allow you to quantify just how sensitive an output variable is to each of its input variables, and to rank them by degree of sensitivity. This is hugely valuable when you need to understand how sensitive a given variable is to each of its input variables.
• Scalability
We saw that basic approaches to sensitivity analysis weren't easy to do when considering more than 2 input variables. Variance-based approaches have no such limitations, and can generalise to any number of input variables.

## What's the best way to perform a sensitivity analysis?

The reason why basic sensitivity analysis receives so much attention is really because it's so easy to do. You don't need anything more than a basic knowledge of Excel or Google Sheets, and in minutes you can create analyses like the one we went through earlier.

If you're looking for something more powerful - perhaps you want to quantify sensitivity, or you want to look at more than 2 input variables - then you need to look at ways to carry out variance based sensitivity analysis.

While variance based approaches can be difficult to implement manually, Causal lets you build them in minutes.

### What is Causal?

Causal is a browser-based modelling tool. Unlike spreadsheets, where you build models out of rows and columns, Causal models are built around variables.

To see how this works in practice, we might start off by building some input variables for product price and marketing budget. We'll give these ranges to reflect the possible values of each that we'd consider.

We'll then build a variable called profit, and write a formula for this which connects it to product price and marketing budget

We can then produce a sensitivity chart, which breaks down how much of the variance in profit is explained by each of the input variables.

As you can see, for just two input variables this isn't particularly exciting. We can easily extend this though by adding more input variables, until we end up with something like this.

This clearly and quantifiably breaks down just how much of the variance in our profit distribution is due to each of the input variables. With that, we can see clearly how sensitive profit is to the different inputs.

If you'd like to try your hand at building sensitivity analyses, Causal is free to get started with. Just click the link in the section below to learn more.