Statistical analysis

Last updated:

|Edit this page|

When analyzing data, it's important to understand if your results are statistically significant. In other words, are the trends you're seeing real, or are they just due to random chance?

PostHog helps you answer this question by providing confidence intervals for your trend lines.

What are confidence intervals?

A confidence interval is a range of values that likely contains the true value of a metric. A 95% confidence level means that if you were to run the same analysis again 100 times, 95 of those times the true value would fall within the calculated confidence interval.

In PostHog, confidence intervals are displayed as a shaded area around your trend lines. The wider the shaded area, the less confident we are in the data. The narrower the area, the more confident we are.

Confidence intervals on a line chart

This is especially useful when you're working with smaller sample sizes (sampling turned on) or when you're trying to detect small changes in your metrics. It helps you avoid making decisions based on noise.

How to use confidence intervals

To enable confidence intervals, go to Options section of your trend insight and toggle the Show confidence intervals switch.

Confidence interval settings

You can also set the confidence level, which is 95% by default. A higher confidence level will result in a wider interval, while a lower confidence level will result in a narrower interval. Common confidence levels are 90%, 95%, and 99%.

Interpreting confidence intervals

When comparing two trend lines with confidence intervals, you can use the overlap of their shaded areas to gauge statistical significance.

  • If the confidence intervals don't overlap, the difference between the two trend lines is likely statistically significant.
  • If the confidence intervals do overlap, the difference may not be statistically significant. You may need to collect more data to be sure.

Confidence intervals are a powerful tool for making data-informed decisions. They can help you avoid being misled by random fluctuations in your data and focus on the changes that matter.

Questions? Ask Max AI.

It's easier than reading through 698 pages of documentation

Community questions

Was this page useful?

Next article

Insight tips and advanced features

Using the persons modal Clicking on a data point in a trends insight opens the persons modal, which shows you a list of users/groups that performed it during the selected time period. From this menu, you can: Watch specific session replays where the user performed the selected event Dive deep into the properties of each individual user Save the entire list of users as a cohort Export the list of users to a CSV for further analysis Creating insights in notebooks You can create all of PostHog's…

Read next article