CHISQ.DIST.RT
The chi-squared distribution's right-tail probability at a value.
Group: Statistics. Compatible with DAX.
Syntax
CHISQ.DIST.RT ( <x>, <deg_freedom> )
| Parameter | Type | Description |
|---|---|---|
x | Number | The test statistic, 0 or more. |
deg_freedom | Whole number | The degrees of freedom, 1 or more; rounded to a whole number. |
Returns
Number. The probability of a value above x: the p-value of a chi-squared test.
Remarks
- It is 1 −
CHISQ.DIST( x, deg_freedom, TRUE ); at x = 0 it is 1. - A negative x is an error.
- With a contingency table of r rows and c columns, the degrees of freedom are (r − 1) × (c − 1).
Examples
The right tail at 3.84
EVALUATE
ROW (
"Right tail", CHISQ.DIST.RT ( 3.84, 1 ),
"One minus the left", 1 - CHISQ.DIST ( 3.84, 1, TRUE )
)
| Right tail | One minus the left |
|---|---|
| 0.0500435212487051 | 0.0500435212487051 |
p-values of three tests
EVALUATE
VAR Tests =
DATATABLE (
"Test", STRING, "Statistic", DOUBLE, "Df", INTEGER,
{ { "A", 2.1, 2 }, { "B", 7.8, 3 }, { "C", 12.4, 4 } }
)
RETURN
ADDCOLUMNS ( Tests, "p", CHISQ.DIST.RT ( [Statistic], [Df] ) )
| Test | Statistic | Df | p |
|---|---|---|---|
| A | 2.1 | 2 | 0.349937749111155 |
| B | 7.8 | 3 | 0.0503310978598533 |
| C | 12.4 | 4 | 0.0146119005813293 |