Harmoni can calculate the margin of error when looking at and interpreting the data in your analysis.

The margin of error tells you how many percentage points your results could differ from the real population value at a specified confidence level.

**In this article**

**1. Margin of Error**

In Harmoni, the option to calculate the margin of error (**MoE**) is available under **statistical tests** in the **modify** menu.

The **modify** menu is available to Creators and Explorers. Viewers can also interact with these features when they have access to dashboards, or stories where the analysis can be zoomed.

**2. Margin of Error Statistics**

The margin of error tells you how many percentage points your results could differ from the real population value at a specified confidence level.

For example, at a confidence level of 95%, a 4% margin of error means that your survey value will be within 4 percentage points of the real population value 95% of the time.

Mathematically at a confidence level γ, a sample-sized n of a population having expected standard deviation σ has a margin of error:

*moe(γ) = z(γ) sqrt(σ ^{2}/n)*

Where:

- z(γ) denotes the quantile (also, commonly, a z-score), and
- sqrt(σ
^{2}/n) is the standard error.

For proportions (percentages) the standard error is sqrt(p*(1-p)/n).

For numeric measure values, the standard error depends on the standard deviation of the values.

To form a **confidence interval** for a population parameter, the **margin of error** is added to and subtracted from the point estimate (mean). The margin of error is, therefore, half of the width of a confidence interval.

Usually, a confidence level of 95% is used. If the confidence level is increased (e.g., to 99%), then the margin of error will increase. Conversely, larger sample size will give a smaller margin of error.

**Where to from here?**

Learn more about statistics.