CONFIDENCE.NORM
Half the width of a confidence interval for a mean, by the normal distribution.
Group: Statistics. Compatible with DAX.
Syntax
CONFIDENCE.NORM ( <alpha>, <standard_dev>, <size> )
| Parameter | Type | Description |
|---|---|---|
alpha | Number | One minus the confidence level, strictly between 0 and 1: 0.05 for a 95 % interval. |
standard_dev | Number | The spread of the values, taken as known; above 0. |
size | Whole number | How many values the mean is taken over, 1 or more; rounded to a whole number. |
Returns
Number. The margin either side of a sample's mean: the mean minus it to the mean plus it is the interval.
Remarks
- It is z × standard_dev / √size, where z is
NORM.S.INV( 1 − alpha / 2 ): about 1.96 for 95 %. - It treats the standard deviation as known. When it is estimated from the same sample,
CONFIDENCE.Tis the one to use; for small samples its margin is wider. - A size that is not whole is rounded: 10.5 counts as 11.
- An alpha of 0 or 1 or beyond, a standard deviation of 0 or less, or a size below 1 is an error.
Examples
An interval around a mean of 20
Fifty values with a known spread of 2.5.
EVALUATE
VAR Margin = CONFIDENCE.NORM ( 0.05, 2.5, 50 )
RETURN
ROW ( "Margin", Margin, "Lower", 20 - Margin, "Upper", 20 + Margin )
| Margin | Lower | Upper |
|---|---|---|
| 0.692951912174839 | 19.3070480878252 | 20.6929519121748 |
Wider for more confidence
EVALUATE
VAR Wanted = DATATABLE ( "Confidence", DOUBLE, { { 0.90 }, { 0.95 }, { 0.99 } } )
RETURN
ADDCOLUMNS ( Wanted, "Margin", CONFIDENCE.NORM ( 1 - [Confidence], 2.5, 50 ) )
| Confidence | Margin |
|---|---|
| 0.9 | 0.581543576838337 |
| 0.95 | 0.692951912174839 |
| 0.99 | 0.910693183859225 |