No history yet

Inferential Statistics

From Sample to Population

Inferential statistics is about making educated guesses. We rarely have all the data for an entire group, or population. We can't poll every voter or track every single stock transaction. Instead, we take a smaller slice, a sample, and use it to understand the bigger picture. It's like tasting a spoonful of soup to know what the whole pot tastes like.

The challenge is that a sample is never a perfect mirror of the population. There's always some uncertainty. Inferential statistics provides the tools to measure that uncertainty and make claims with a known level of confidence.

Inferential statistics use sample data to make predictions or inferences about larger populations through estimation and hypothesis testing.

Confidence Intervals

An estimate from a sample is a single number, like an average. But how much can we trust that number? A confidence interval provides a range of values where we believe the true population value likely lies. Think of it as putting a safety net around your best guess.

When we say we have a "95% confidence interval," it doesn't mean there's a 95% chance the true population average is in our specific range. Instead, it means that if we were to repeat our sampling process many times, 95% of the confidence intervals we create would contain the true population average. It's a statement about the reliability of the method.

CI=xˉ±Z(σn)\text{CI} = \bar{x} \pm Z \left( \frac{\sigma}{\sqrt{n}} \right)

Let's apply this. Imagine we want to estimate the average annual return of a new mutual fund. We analyze a sample of 36 months and find the average return (\arx\ar{x}) is 8%, with a population standard deviation (σ\\\sigma) of 5%. To create a 95% confidence interval, we plug in the numbers.

The calculation gives us a range. This range might be, for example, 6.37% to 9.63%. We can now state with 95% confidence that the true average annual return of the fund is likely somewhere in that interval. This is far more useful for an investor than just the single 8% estimate.

Hypothesis Testing

While confidence intervals estimate a value, hypothesis testing makes a decision. It's a formal process for using sample data to decide if a claim about a population is likely true or not.

It starts with two competing statements:

  1. Null Hypothesis (H0H_0): The default assumption, usually stating there is no effect or no difference. For example, "This new trading algorithm has zero effect on portfolio returns."
  2. Alternative Hypothesis (HaH_a): The claim we want to test. For example, "This new trading algorithm has a positive effect on portfolio returns."

The process works like a courtroom trial. We assume the null hypothesis is true (the defendant is innocent) and then look at the evidence, our sample data. If the data is highly unlikely or surprising under that assumption, we reject the null hypothesis in favor of the alternative (guilty verdict). This "surprise level" is often measured by a p-value.

A small p-value (typically ≤ 0.05) indicates that our observed data is unlikely under the null hypothesis, providing evidence to reject it.

In finance, you might use hypothesis testing to determine if a stock's average daily return is significantly greater than zero, or to test if a new risk management strategy effectively reduces portfolio volatility.

Errors in Judgment

Because we're working with samples, our conclusions can sometimes be wrong. Hypothesis testing isn't foolproof. There are two specific types of errors we can make.

Lesson image

Let's break down what these errors mean in a practical context.

Error TypeDefinitionFinancial Example
Type I ErrorRejecting the null hypothesis when it's actually true. A "false positive."You conclude a new investment product is profitable (reject H0H_0: not profitable), but it's not. The company invests millions based on your analysis and loses money.
Type II ErrorFailing to reject the null hypothesis when it's actually false. A "false negative."You conclude a new investment product is not profitable (fail to reject H0H_0), but it actually was. The company misses out on a significant market opportunity.

The choice of which error is worse depends on the situation. Is it worse to waste money on a bad idea or to miss out on a good one? Statisticians and decision-makers must weigh these risks, often by setting a threshold for the p-value (called alpha, α\alpha), which directly controls the probability of making a Type I error.

These tools, from confidence intervals to error analysis, are what allow us to move from simply describing data to making informed, data-driven decisions.