OpenBI Docs Buy

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> )
ParameterTypeDescription
xNumberThe test statistic, 0 or more.
deg_freedomWhole numberThe 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 tailOne minus the left
0.05004352124870510.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] ) )
TestStatisticDfp
A2.120.349937749111155
B7.830.0503310978598533
C12.440.0146119005813293

CHISQ.DIST, CHISQ.INV.RT, T.DIST.2T.

Last updated · OpenBI Studio 0.3.74