TDIST
Returns the Student's t-distribution.
Syntax
expression.TDIST(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 | number | Specifies the number of distribution tails to return: one-tailed distribution = 1; two-tailed distribution = 2. |
Returns
number
Example
This example shows how to return the Student's t-distribution.
- Code
- Result
// How to calculate a Student's t-distribution.
// Use a function to estimate a Student's t-distribution.
let worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
let ans = func.TDIST(1.5, 10, 1);
worksheet.GetRange("B2").SetValue(ans);