T_DIST
Returns the left-tailed Student's t-distribution.
Syntax
expression.T_DIST(arg1, arg2, arg3);
expression - A variable that represents a ApiWorksheetFunction class.
Parameters
| Name | Required/Optional | Data type | Default | Description |
|---|---|---|---|---|
| arg1 | Required | ApiRange | ApiName | number | The numeric value at which to evaluate the distribution. | |
| arg2 | Required | ApiRange | ApiName | number | An integer indicating the number of degrees of freedom that characterize the distribution. | |
| arg3 | Required | ApiRange | ApiName | boolean | A logical value (true or false) that determines the function form. If it is true, the function returns the cumulative distribution function. If it is false, the function returns the probability density function. |
Returns
number
Example
Calculate the left-tail probability of the Student's t-distribution in a spreadsheet.
// How do I find the probability for a given t-value in a spreadsheet?
// Get the cumulative distribution function for the t-distribution in a spreadsheet.
let worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
let ans = func.T_DIST(1.5, 10, false);
worksheet.GetRange("B2").SetValue(ans);