### Business Benefits

## Calculate the arithmetic means (Mc, Mv) of the two groups by dividing the sum of values by the number of observations in each.

For example, if the metric of interest is average revenue per user, the total number of observations in the control group is the number of users enrolled in the control, and the sum of values is the summation of the revenues from each user in the group.

## Calculate the difference (Delta) of the two means by subtracting the mean of the control group from the mean of the variant group

Following the same notation, the difference in means is

.**Delta** = M_{v} - M_{c}

For example, if `M`

and _{v} = 10.50`M`

, then _{c} = 8.00**Delta** is `10.50 - 8.00 = 2.50`

.

## Estimate the standard deviation of each group (SDc and SDv).

##
Calculate the pooled standard deviation (SDp) using the equation `SD`_{p} = SQRT(((N_{v} - 1) * SD_{v}^{2} + (N_{c} - 1) * SD_{c}^{2}) / (N_{c} + N_{v} - 2))

_{p}= SQRT(((N

_{v}- 1) * SD

_{v}

^{2}+ (N

_{c}- 1) * SD

_{c}

^{2}) / (N

_{c}+ N

_{v}- 2))

SQRT is the square root function available in most software languages. It can be calculated using the `sqrt()`

function in Microsoft Excel, R, and other similar software.

For example, if the sample sizes Nc and Nv are 1000 and 1010, and the standard deviations were estimated to be 5.5 and 6 respectively, then

`SD`

_{p} = SQRT( ( (1000 - 1) * 5.5^{2}+ (1010 - 1) * 6^{2}) / (1000 + 1010 - 2))

SD_{p} = SQRT( (999 * 30.25 + 1009 * 36) / 2008 )

SD_{p} = SQRT( (30219.75 + 36324) / 2008 )

SD_{p} = SQRT(33.14)

SD_{p} = 5.756

## Calculate the Z score (Z) corresponding to the confidence level as the inverse probability density function of the confidence level.

If the confidence level is expressed as a percentage, convert it to a proportion first by dividing it by 100. For example, a 95% confidence level would become 0.95. Then use a tool like Microsoft Excel, R, the GIGA online z-score calculator to calculate the inverse probability function (a.k.a. quantile function):

- Use the
`NORM.S.INV()`

function in Excel. - Use the
`qnorm()`

function in R. - Use the GIGA online z-score calculator to calculate Z from Probability.

To make sure your calculation is correct, you can check it using this reference: for a confidence level of 0.95, the Z score would be 1.644854.

##
Calculate the standard error of the difference in means (SE) using the formula `SE = Z * SD * SQRT( 1 / Nv + 1 / Nc ) `

The standard error of the difference in means is the standard deviation divided by the square root of the sum of the number of observations in each group which is then multiplied by the Z score obtained earlier. Continuing with the previous example, where `SD = 5.756`

, `Z = 1.644854`

, `N`

and _{v} = 1000`N`

:_{c} = 1010

```
SE = 1.644854 * 5.756 * SQRT( 1 / 1000 + 1 / 1010 )
SE = 1.644854 * 5.756 * 0.0446
SE = 1.644854 * 0.2567
SE = 0.42
```

## Subtract the standard error (SE) from the absolute difference (Delta) to get the lower confidence interval bound. The upper bound is infinity.

The result is a one-sided interval with a lower bound as calculated above and an upper bound of plus infinity. Values outside the interval can be rejected with confidence equal to or greater than the chosen confidence level. For example, if a 95% confidence interval spans from 0.01 to plus infinity, we can say that any difference less than 0.01 can be rejected with a confidence of 95% or greater.

To calculate the opposite one-sided interval, simply add the standard error (SE) to the absolute difference (Delta) instead.