T.DIST.2T
Student's t distribution's two-tailed probability at a value.
Group: Statistics. Compatible with DAX.
Syntax
T.DIST.2T ( <X>, <Deg_freedom> )
| Parameter | Type | Description |
|---|---|---|
X | Number | The t value, 0 or more: give the absolute value of a negative t. |
Deg_freedom | Whole number | The degrees of freedom, 1 or more; rounded to a whole number. |
Returns
Number. The probability of a value further from 0 than x on either side: a two-sided test's p-value.
Remarks
- It is twice
T.DIST.RT( x, Deg_freedom ). - A negative x is an error: write T.DIST.2T ( ABS ( t ), df ).
Examples
Two tails and one
EVALUATE
ROW ( "Two tails", T.DIST.2T ( 2.228, 10 ), "Right tail", T.DIST.RT ( 2.228, 10 ) )
| Two tails | Right tail |
|---|---|
| 0.0500117718171114 | 0.0250058859085557 |
Is the weekly trend real?
The slope of a line through eight weeks of sales, divided by its standard error, is a t value with the fit's degrees of freedom.
EVALUATE
VAR Weeks =
DATATABLE (
"Week", INTEGER, "Liters", INTEGER,
{ { 1, 410 }, { 2, 435 }, { 3, 470 }, { 4, 462 }, { 5, 505 }, { 6, 530 }, { 7, 528 }, { 8, 571 } }
)
VAR Fit = LINESTX ( Weeks, [Liters], [Week] )
RETURN
SELECTCOLUMNS (
Fit,
"t", [Slope1] / [StandardErrorSlope1],
"p", T.DIST.2T ( [Slope1] / [StandardErrorSlope1], [DegreesOfFreedom] )
)
| t | p |
|---|---|
| 11.9753076238747 | 2.05510225929109e-05 |