From 41263a6d45509176299626fb2db46d9597c1bd94 Mon Sep 17 00:00:00 2001 From: ushasundarajan Date: Thu, 12 Dec 2024 15:18:16 +0530 Subject: [PATCH] Added Volume 4 formulas --- .../Supported-Formulas/Financial-Formulas.md | 724 ++++++++++++++++++ .../Supported-Formulas/Math-Trigonometry.md | 77 +- .../Supported-Formulas/Text-Formulas.md | 46 +- .../Supported-Formulas/statistical.md | 346 ++++++++- 4 files changed, 1190 insertions(+), 3 deletions(-) diff --git a/WindowsForms/Calculation-Engine/Supported-Formulas/Financial-Formulas.md b/WindowsForms/Calculation-Engine/Supported-Formulas/Financial-Formulas.md index ce2d499fe..b60359124 100644 --- a/WindowsForms/Calculation-Engine/Supported-Formulas/Financial-Formulas.md +++ b/WindowsForms/Calculation-Engine/Supported-Formulas/Financial-Formulas.md @@ -1098,3 +1098,727 @@ _COUPNUM(settlement, maturity, frequency, [basis])_ * If settlement is greater than or equal to maturity, `COUPNUM` returns `#NUM!`. * The argument is non-numeric, it returns the `#VALUE!` error message. + + + +## AMORLINC + +The `AMORLINC` function returns the depreciation for each accounting period, specifically designed for the French accounting system. If an asset is purchased in the middle of the accounting period, the prorated depreciation is considered. + +**Syntax** + +*AMORLINC(cost, date_purchased, first_period, salvage, period, rate, [basis])* + +**Where:** + +* cost: The cost of the asset. + +* date_purchased: The date when the asset was purchased. + +* first_period: The date marking the end of the first accounting period. + +* salvage: The salvage value of the asset at the end of its useful life. + +* period: The specific period for which the depreciation is to be calculated. + +* rate: The depreciation rate for the asset. + +* basis (Optional): The day count basis to use: + + * 0 or omitted: US (NASD) 30/360 (default) + + * 1: Actual/actual + + * 2: Actual/360 + + * 3: Actual/365 + + * 4: European 30/360 + +**Remarks:** + +* Dates are stored as serial numbers. (e.g., January 1, 1900, is represented as 1). + +* If any arguments are invalid, the function returns an error: + + * `#VALUE!`: If the arguments are not valid numbers or dates. + + * `#NUM!`: If the arguments are outside valid ranges or unsupported. + + + +## TBILLEQ + +The function `TBILLEQ` returns the bond-equivalent yield for a Treasury bill. + +**Syntax** + +_TBILLEQ(settlement, maturity, discount)_ + +**Where:** + +* settlement: The Treasury bill's settlement date. The security settlement date is the date after the issue date when the Treasury bill is traded to the buyer. + +* maturity: The Treasury bill's maturity date. The maturity date is the date when the Treasury bill expires. + +* discount: The Treasury bill's discount rate. + +**Remarks:** + +* Dates are stored as serial numbers. (e.g., January 1, 1900, is represented as 1). + +* Settlement and maturity are truncated to integers. + +* If settlement or maturity is not a valid date, `TBILLEQ` returns the `#VALUE!` error value. + +* If discount is less than or equal to 0, `TBILLEQ` returns the `#NUM!` error value. + +* If settlement is greater than maturity, or if maturity is more than one year after settlement, `TBILLEQ` returns the `#NUM!` error value. + + + +## PRICEDISC + +The function `PRICEDISC` returns the price per $100 face value of a discounted security. + +**Syntax** + +_PRICEDISC(settlement, maturity, discount, redemption, [basis])_ + +**Where:** + +* settlement: The security's settlement date. It is the date after the issue date when the security is traded to the buyer. + +* maturity: The security's maturity date. It is the date when the security expires. + +* discount: The security's discount rate. + +* redemption: The security's redemption value per $100 face value. + +* basis (Optional): The type of day count basis to use: + + * 0 or omitted: US (NASD) 30/360 + + * 1: Actual/actual + + * 2: Actual/360 + + * 3: Actual/365 + + * 4: European 30/360 + +**Remarks:** + +* Dates are stored as serial numbers. (e.g., January 1, 1900, is represented as 1). + +* Settlement, maturity, and basis are truncated to integers. + +* If settlement or maturity is not a valid date, `PRICEDISC` returns the `#VALUE!` error value. + +* If discount or redemption is less than or equal to 0, `PRICEDISC` returns the `#NUM!` error value. + +* If basis is less than 0 or greater than 4, `PRICEDISC` returns the `#NUM!` error value. + +* If settlement is greater than or equal to maturity, `PRICEDISC` returns the `#NUM!` error value. + + + +## YIELD + +The `YIELD` function returns the yield on a security that pays periodic interest. + +**Syntax** + +_YIELD(settlement, maturity, rate, pr, redemption, frequency, [basis])_ + +**Where:** + +* settlement: The security's settlement date. It is the date after the issue date when the security is traded to the buyer. + +* maturity: The security's maturity date. It is the date when the security expires. + +* rate: The security's annual coupon rate. + +* pr: The security's price per $100 face value. + +* redemption: The security's redemption value per $100 face value. + +* frequency: The number of coupon payments per year (1 for annual, 2 for semiannual, 4 for quarterly). + +* basis (Optional): The type of day count basis to use: + + * 0 or omitted: US (NASD) 30/360 + + * 1: Actual/actual + + * 2: Actual/360 + + * 3: Actual/365 + + * 4: European 30/360 + +**Remarks:** + +* Dates are stored as serial numbers. (e.g., January 1, 1900, is represented as 1). + +* Settlement, maturity, frequency, and basis are truncated to integers. + +* If settlement or maturity is not a valid date, `YIELD` returns the `#VALUE!` error value. + +* If rate is less than 0, `YIELD` returns the `#NUM!` error value. + +* If pr or redemption is less than or equal to 0, `YIELD` returns the `#NUM!` error value. + +* If frequency is any number other than 1, 2, or 4, `YIELD` returns the `#NUM!` error value. + +* If basis is less than 0 or greater than 4, `YIELD` returns the `#NUM!` error value. + +* If settlement is less than or equal to maturity, `YIELD` returns the `#NUM!` error value. + +* If there is more than one coupon period until redemption, `YIELD` is calculated using the Newton method, based on the formula used for the function `PRICE`. The yield is changed until the estimated price given the yield is close to price. + + + +## YIELDMAT + +The function `YIELDMAT` returns the annual yield of a security that pays interest at maturity. + +**Syntax** + +_YIELDMAT(settlement, maturity, issue, rate, pr, [basis])_ + +**Where:** + + * settlement: The security's settlement date. It is the date after the issue date when the security is traded to the buyer. + + * maturity: The security's maturity date. It is the date when the security expires. + + * issue: The security's issue date. + + * rate: The security's interest rate at the date of issue. + + * Pr: The security's price per $100 face value. + +* basis (Optional): The type of day count basis to use: + + * 0 or omitted: US (NASD) 30/360 + + * 1: Actual/actual + + * 2: Actual/360 + + * 3: Actual/365 + + * 4: European 30/360 + +**Remarks:** + +* Dates are stored as serial numbers. (e.g., January 1, 1900, is represented as 1). + +* Settlement, maturity, issue, and basis are truncated to integers. + +* If settlement, maturity, or issue is not a valid date, `YIELDMAT` returns the `#VALUE!` error value. + +* If rate is less than 0 or if pr is less than or equal to 0, `YIELDMAT` returns the `#NUM!` error value. + +* If basis is less than 0 or greater than 4, `YIELDMAT` returns the `#NUM!` error value. + +* If settlement is greater than or equal to maturity, `YIELDMAT` returns the `#NUM!` error value. + + + +## YIELDDISC + +The function `YIELDDISC` returns the annual yield for a discounted security. + +**Syntax** + +_YIELDDISC(settlement, maturity, pr, redemption, [basis])_ + +**Where:** + +* settlement: The security's settlement date. It is the date after the issue date when the security is traded to the buyer. + +* maturity: The security's maturity date. It is the date when the security expires. + +* pr: The security's price per $100 face value. + +* redemption: The security's redemption value per $100 face value. + +* basis (Optional): The type of day count basis to use: + + * 0 or omitted: US (NASD) 30/360 + + * 1: Actual/actual + + * 2: Actual/360 + + * 3: Actual/365 + + * 4: European 30/360 + +**Remarks:** + +* Dates are stored as serial numbers. (e.g., January 1, 1900, is represented as 1). + +* Settlement, maturity, and basis are truncated to integers. + +* If settlement or maturity is not a valid date, `YIELDDISC` returns the `#VALUE!` error value. + +* If pr or redemption is less than or equal to 0, `YIELDDISC` returns the `#NUM!` error value. + +* If basis is less than 0 or greater than 4, `YIELDDISC` returns the `#NUM!` error value. + +* If settlement is greater than equal to maturity, `YIELDDISC` returns the `#NUM!` error value. + + + +## PRICEMAT + +The function `PRICEMAT` returns the price per $100 face value of a security that pays interest at maturity. + +**Syntax** + +_PRICEMAT(settlement, maturity, issue, rate, yld, [basis])_ + +**Where:** + +* settlement: The security's settlement date. It is the date after the issue date when the security is traded to the buyer. + +* maturity: The security's maturity date. It is the date when the security expires. + +* issue: The security's issue date. + +* rate: The security's interest rate at the date of issue. + +* yld: The security's annual yield. + +* basis (Optional): The type of day count basis to use: + + * 0 or omitted: US (NASD) 30/360 + + * 1: Actual/actual + + * 2: Actual/360 + + * 3: Actual/365 + + * 4: European 30/360 + +**Remarks:** + +* Dates are stored as serial numbers. (e.g., January 1, 1900, is represented as 1). + +* Settlement, maturity, issue, and basis are truncated to integers. + +* If settlement, maturity, or issue is not a valid date, `PRICEMAT` returns the `#VALUE!` error value. + +* If rate or yld is less than 0, `PRICEMAT` returns the `#NUM!` error value. + +* If basis is less than 0 or greater than 4, `PRICEMAT` returns the `#NUM!` error value. + +* If settlement is greater than equal to maturity, `PRICEMAT` returns the `#NUM!` error value. + + + +## AMORDEGRC + +The `AMORDEGRC` function returns the depreciation for each accounting period under the French accounting system. If an asset is purchased in the middle of an accounting period, prorated depreciation is calculated. The function applies a depreciation coefficient based on the asset's lifespan. + +**Syntax** + +*AMORDEGRC(cost, date_purchased, first_period, salvage, period, rate, [basis])* + +**Where:** + +* cost: The cost of the asset. + +* date_purchased: The date the asset was purchased. + +* first_period: The date of the end of the first accounting period. + +* salvage: The salvage value of the asset at the end of its useful life. + +* period: The period for which the depreciation is to be calculated. + +* rate: The depreciation rate. + +* basis (Optional): The type of day count basis to use: + + * 0 or omitted: US (NASD) 30/360 + + * 1: Actual/actual + + * 2: Actual/360 + + * 3: Actual/365 + + * 4: European 30/360 + +**Remarks:** + +* Dates are stored as serial numbers. For example, January 1, 1900, is represented as 1. + +* Depreciation coefficients are applied based on the life of the asset: + + * Between 3 and 4 years: Coefficient = 1.5 + + * Between 5 and 6 years: Coefficient = 2 + + * More than 6 years: Coefficient = 2.5 + +* The depreciation rate increases to 50% for the period preceding the last and to 100% for the final period. + +* `AMORDEGRC` returns `#NUM!` if the life of the asset is less than 1 year or falls into invalid ranges (e.g., between 0 and 1, 1 and 2, etc.). + +* Depreciation is calculated until the last period of the asset's life or until the cumulative depreciation equals the cost minus the salvage value. + + + +## ODDFPRICE + +The function `ODDFPRICE` returns the price per $100 face value of a security having an odd (short or long) first period. + +**Syntax** + +*ODDFPRICE(settlement, maturity, issue, first_coupon, rate, yld, redemption, frequency, [basis])* + +**Where:** + +* settlement: The security's settlement date (the date the buyer purchases the security). + +* maturity: The security's maturity date (the date the security expires). + +* issue: The security's issue date. + +* first_coupon: The security's first coupon date. + +* rate: The security's annual interest rate. + +* yld: The security's annual yield. + +* redemption: The redemption value per $100 face value. + +* frequency: The number of coupon payments per year (1 = annual, 2 = semiannual, 4 = quarterly). + +* basis (Optional): The type of day count basis to use: + + * 0 or omitted: US (NASD) 30/360 + + * 1: Actual/actual + + * 2: Actual/360 + + * 3: Actual/365 + + * 4: European 30/360 + +**Remarks:** + +* Dates are stored as sequential serial numbers (e.g., January 1, 1900, is serial number 1). + +* Settlement, maturity, issue, first_coupon, and basis are truncated to integers. + +* The function `ODDFPRICE` returns: + + * `#VALUE!` if any of the date arguments are invalid. + + * `#NUM!` if rate is less than 0, yld is less than 0, basis is less than 0, basis is greater than 4, or the condition `maturity > first_coupon > settlement > issue` is not satisfied. + +* The function `ODDFPRICE` considers odd short first coupons and odd long first coupons separately. + + + +## ODDFYIELD + +The function `ODDFYIELD` returns the yield of a security that has an odd (short or long) first period. + +**Syntax** + +*ODDFYIELD(settlement, maturity, issue, first_coupon, rate, pr, redemption, frequency, [basis])* + +**Where:** + +* settlement: The security's settlement date (the date the buyer purchases the security). + +* maturity: The security's maturity date (the date the security expires). + +* issue: The security's issue date. + +* first_coupon: The security's first coupon date. + +* rate: The security's annual interest rate. + +* pr: The security's price. + +* redemption: The redemption value per $100 face value. + +* frequency: The number of coupon payments per year (1 = annual, 2 = semiannual, 4 = quarterly). + +* basis (Optional): The type of day count basis to use: + + * 0 or omitted: US (NASD) 30/360 + + * 1: Actual/actual + + * 2: Actual/360 + + * 3: Actual/365 + + * 4: European 30/360 + +**Remarks:** + +* Dates are stored as sequential serial numbers (e.g., January 1, 1900, is serial number 1). + +* Settlement, maturity, issue, first_coupon, and basis are truncated to integers. + +* The function `ODDFYIELD` returns: + + * `#VALUE!` - if any of the date arguments are invalid. + + * `#NUM!` - if rate is less than 0, pr is less than or equal to 0, basis is less than 0, or basis greater than 4. + + * `#NUM!`- if the condition `maturity > first_coupon > settlement > issue` is not satisfied. + +* An iterative technique named Newton method is used for `ODDFPRICE`. The Newton method iterates through 100 times to adjust the yield until the calculated price matches the provided price. + + + +## ODDLPRICE + +The function `ODDLPRICE` returns the price per $100 face value of a security having an odd (short or long) last coupon period. + +**Syntax** + +*ODDLPRICE(settlement, maturity, last_interest, rate, yld, redemption, frequency, [basis])* + +**Where:** + +* settlement: The security's settlement date (the date the buyer purchases the security). + +* maturity: The security's maturity date (the date the security expires). + +* last_interest: The security's last coupon date. + +* rate: The security's annual interest rate. + +* yld: The security's annual yield. + +* redemption: The redemption value per $100 face value. + +* frequency: The number of coupon payments per year (1 = annual, 2 = semiannual, 4 = quarterly). + +* basis (Optional): The type of day count basis to use: + + * 0 or omitted: US (NASD) 30/360 + + * 1: Actual/actual + + * 2: Actual/360 + + * 3: Actual/365 + + * 4: European 30/360 + +**Remarks:** + +* Dates are stored as sequential serial numbers (e.g., January 1, 1900, is serial number 1). + +* Settlement, maturity, last_interest, and basis are truncated to integers. + +* The function `ODDLPRICE` returns: + + * `#VALUE!` if any of the date arguments are invalid. + + * `#NUM!` if rate is less than 0, yld is less than 0, basis is less than 0, or basis greater than 4. + + * `#NUM!` if the condition `maturity > settlement > last_interest` is not satisfied. + +* The price of a security with an odd last coupon period depends on the calculation of accrued interest and present value of future cash flows. + + + +## ODDLYIELD + +The function `ODDLYIELD` returns the yield of a security that has an odd (short or long) last period. + +**Syntax** + +ODDLYIELD(settlement, maturity, last_interest, rate, pr, redemption, frequency, [basis]) + +**Where:** + +* settlement: The security's settlement date (the date the buyer purchases the security). + +* maturity: The security's maturity date (the date the security expires). + +* last_interest: The security's last coupon date. + +* rate: The security's annual interest rate. + +* pr: The security's price per $100 face value. + +* redemption: The redemption value per $100 face value. + +* frequency: The number of coupon payments per year (1 = annual, 2 = semiannual, 4 = quarterly). + +* basis (Optional): The type of day count basis to use: + + * 0 or omitted: US (NASD) 30/360 + + * 1: Actual/actual + + * 2: Actual/360 + + * 3: Actual/365 + + * 4: European 30/360 + +**Remarks** + +* Dates are stored as sequential serial numbers (e.g., January 1, 1900, is serial number 1). + +* Settlement, maturity, last_interest, and basis are truncated to integers. + +* If settlement, maturity, or last_interest is not a valid date, `ODDLYIELD` returns `#VALUE!`. + +* If rate is less than 0 or pr is less than or equal to 0, `ODDLYIELD` returns `#NUM!`. + +* If basis is less than 0 or basis is greater than 4, `ODDLYIELD` returns `#NUM!`. + +* If maturity is less than or equal to settlement or settlement is less than or equal to last_interest, `ODDLYIELD` returns `#NUM!`. + + + +## PRICE + +The `PRICE` function returns the price per $100 face value of a security that pays periodic interest. + +**Syntax** + +*PRICE(settlement, maturity, rate, yld, redemption, frequency, [basis])* + +**Where:** + +* settlement: The settlement date of the security, when it is traded to the buyer. + +* maturity: The maturity date of the security, when it expires. + +* rate: The annual coupon rate of the security. + +* yld: The annual yield of the security. + +* redemption: The redemption value per $100 face value. + +* frequency: The number of coupon payments per year (1 = annual, 2 = semiannual, 4 = quarterly). + +* basis (Optional): The type of day count basis to use: + + * 0 or omitted: US (NASD) 30/360 + + * 1: Actual/actual + + * 2: Actual/360 + + * 3: Actual/365 + + * 4: European 30/360 + +**Remarks** + +* Dates are stored as sequential serial numbers (e.g., January 1, 1900, is serial number 1). + +* If settlement or maturity is not a valid date, `PRICE` returns the `#VALUE!` error. + +- If yld is less than 0, rate is less than 0, or redemption is less than or equal to 0, `PRICE` returns the `#NUM!` error. + +- If frequency is not 1, 2, or 4, `PRICE` returns the `#NUM!` error. + +- If basis is less than 0 or greater than 4, `PRICE` returns the `#NUM!` error. + +- If settlement is greater than or equal to maturity, `PRICE` returns the `#NUM!` error. + + + +## TBILLPRICE + +The `TBILLPRICE` function returns the price per $100 face value for a Treasury bill. + +**Syntax** + +*TBILLPRICE(settlement, maturity, discount)* + +**Where:** + +* settlement: The Treasury bill's settlement date, when it is traded to the buyer. + +* maturity: The Treasury bill's maturity date, when it expires. + +* discount: The Treasury bill's discount rate. + +**Remarks** + +* Dates are stored as sequential serial numbers (e.g., January 1, 1900, is serial number 1). + +* If settlement or maturity is not a valid date, the function returns the `#VALUE!` error. + +* If discount is less than or equal to 0, the function returns the `#NUM!` error. + +* If settlement > maturity or if maturity is more than one year after settlement, the function returns the `#NUM!` error. + + + +## TBILLYIELD + +The `TBILLYIELD` function returns the yield for a Treasury bill. + +**Syntax** + +*TBILLYIELD(settlement, maturity, pr)* + +**Where:** + +* settlement: The Treasury bill's settlement date, when it is traded to the buyer. + +* maturity: The Treasury bill's maturity date, when it expires. + +* pr: The Treasury bill's price per $100 face value. + +**Remarks** + +* If settlement or maturity is not a valid date, the function returns the `#VALUE!` error. + +* If pr is less than or equal to 0, the function returns the `#NUM!` error. + +* If settlement is greater than or equal to maturity or if maturity is more than one year after settlement, the function returns the `#NUM!` error. + + + +## XNPV + +The `XNPV` function returns the net present value for a schedule of cash flows that is not necessarily periodic. + +**Syntax** + +*XNPV(rate, values, dates)* + +**Where:** + +* rate: The discount rate to apply to the cash flows. + +* values: A series of cash flows that corresponds to a schedule of payments in `dates`. The first payment is optional and typically represents a cost (negative value). Subsequent payments are discounted using a 365-day year. + +* dates: A schedule of payment dates corresponding to the cash flow payments. Dates must be in chronological order, with the first date representing the start of the schedule. + +**Remarks** + +* Dates are stored as sequential serial numbers (e.g., January 1, 1900, is serial number 1). + +* If any argument is non-numeric, the function returns the `#VALUE!` error. + +* If values and dates have a different number of entries, the function returns the `#NUM!` error. + +* If any date in dates precedes the starting date, the function returns the `#NUM!` error. + +* The series in values must include at least one positive and one negative value. \ No newline at end of file diff --git a/WindowsForms/Calculation-Engine/Supported-Formulas/Math-Trigonometry.md b/WindowsForms/Calculation-Engine/Supported-Formulas/Math-Trigonometry.md index 7fb3a1e18..1f2b79327 100644 --- a/WindowsForms/Calculation-Engine/Supported-Formulas/Math-Trigonometry.md +++ b/WindowsForms/Calculation-Engine/Supported-Formulas/Math-Trigonometry.md @@ -3053,4 +3053,79 @@ _PHIL(x)_ -* If x of an invalid data type, `PHI` will return the `#VALUE!` error. \ No newline at end of file +* If x of an invalid data type, `PHI` will return the `#VALUE!` error. + + + +## EUROCONVERT + + + +The `EUROCONVERT` function converts a currency between the Euro and member currencies or among member currencies using Euro as the base currency, based on fixed EU (European Union) exchange rates. + + + +**Syntax** + + + +*EUROCONVERT(number, source, target, full_precision, triangulation_precision)* + + + +**Where:** + + + +* number: The currency value you want to convert, or a reference to a cell containing the value. + + + +* source: A three-letter string, or reference to a cell containing the string, corresponding to the ISO (International Organization for Standardization) code for the source currency. + + + +* target: A three-letter string, or reference to a cell containing the string, corresponding to the ISO (International Organization for Standardization) code of the target currency. + + + +* full_precision: A logical value that specifies how to display the result: + + + + * FALSE: Display with currency-specific rounding rules (default). + + + + * TRUE: Display with all significant digits. + + + +* triangulation_precision: An integer (greater than or equal to 3) that specifies the number of significant digits for the intermediate Euro value when converting between two Euro member currencies. + + + +**Remarks:** + + +* Any trailing zeros in the return value are truncated. + + + +* If the source and target ISO codes are the same, the original value is returned. + + + +* Invalid parameters return `#VALUE!`. + + + +* The function `EUROCONVERT` does not apply a number format. + + + +* The function `EUROCONVERT` cannot be used in array formulas. + + + +* To use the function `EUROCONVERT` , the Euro Currency Tools Add-in need to be activated. diff --git a/WindowsForms/Calculation-Engine/Supported-Formulas/Text-Formulas.md b/WindowsForms/Calculation-Engine/Supported-Formulas/Text-Formulas.md index b80e40635..cae83d144 100644 --- a/WindowsForms/Calculation-Engine/Supported-Formulas/Text-Formulas.md +++ b/WindowsForms/Calculation-Engine/Supported-Formulas/Text-Formulas.md @@ -2183,4 +2183,48 @@ _FILTER(array, include, [if_empty])_ -* `FILTER` will return an error if the include array is not Boolean, or if it contains errors such as `#N/A` or `#VALUE!`. \ No newline at end of file +* `FILTER` will return an error if the include array is not Boolean, or if it contains errors such as `#N/A` or `#VALUE!`. + + + +## BAHTTEXT + + + +The function `BAHTTEXT` converts a number to Thai text and adds the suffix "Baht." + + + +**Syntax** + + + +_BAHTTEXT(number)_ + + + +**Where:** + + + +* number: A number you want to convert to text. This can be: + + + + * A numeric value + + + + * A reference to a cell containing a number + + + + * A formula that evaluates to a number + + + +**Remarks:** + + + +* The output of `BAHTTEXT` is in Thai text with "Baht" as the suffix. \ No newline at end of file diff --git a/WindowsForms/Calculation-Engine/Supported-Formulas/statistical.md b/WindowsForms/Calculation-Engine/Supported-Formulas/statistical.md index 786af8873..1bf2c3e35 100644 --- a/WindowsForms/Calculation-Engine/Supported-Formulas/statistical.md +++ b/WindowsForms/Calculation-Engine/Supported-Formulas/statistical.md @@ -2662,4 +2662,348 @@ _FREQUENCY(data_array, bins_array)_ * If bins_array contains no values, `FREQUENCY` returns the total number of elements in data_array. -* `FREQUENCY` ignores blank cells and text in data_array. \ No newline at end of file +* `FREQUENCY` ignores blank cells and text in data_array. + +## F.TEST + +The `F.TEST` function returns the two-tailed probability that the variances in two data sets (array1 and array2) are not significantly different. + +**Syntax** + +*F.TEST(array1, array2)* + +**Where:** + +* array1: The first array or range of numerical data. + +* array2: The second array or range of numerical data. + +**Remarks** + +* The arguments must be either numbers, arrays, range, or references that contain numbers. + +* If an array or reference argument contains text, logical values, or empty cells, those values are ignored; however, cells with the value zero are included. + +* If the number of elements in array1 or array2 is less than 2, or if the variance of array1 or array2 is zero, `F.TEST` returns the `#DIV/0!` error. + +* `F.TEST` is an updated version of the function `FTEST`. + +## FTEST + +The `FTEST` function returns the two-tailed probability that the variances in two data sets (array1 and array2) are not significantly different. + +**Syntax** + +*FTEST(array1, array2)* + +**Where:** + +* array1: The first array or range of numerical data. + +* array2: The second array or range of numerical data. + +**Remarks** + +* The arguments must be either number, arrays, ranges, or references that contain numbers. + +* If an array or reference argument contains text, logical values, or empty cells, those values are ignored; however, cells with the value zero are included. + +* If the number of elements in array1 or array2 is less than 2, or if the variance of array1 or array2 is zero, `FTEST` returns the `#DIV/0!` error. + +* `FTEST` is an older version of the `F.TEST` function + +## F.INV + +The `F.INV` function returns the value at which a given probability corresponds to the F probability distribution, typically used to compare the variability between two data sets. + +**Syntax** + +*F.INV(probability, deg_freedom1, deg_freedom2)* + +**Where:** + +* probability: A probability associated with the F cumulative distribution. + +* deg_freedom1: The numerator degrees of freedom, representing the variability in the first data set or group. + +* deg_freedom2: The denominator degrees of freedom, representing the variability in the second data set or group. + +**Remarks** + +* If any argument is non-numeric, `F.INV` returns the `#VALUE!` error. + +* If probability is less than 0 or greater than 1, `F.INV` returns the `#NUM!` error. + +* If deg_freedom1 or deg_freedom2 is not an integer, it is truncated. + +* If deg_freedom1 or deg_freedom2 is less than 1, `F.INV` returns the `#NUM!` error. + +## BINOM.DIST.RANGE + +The `BINOM.DIST.RANGE` function returns the probability of a trial result using a binomial distribution. + +**Syntax** + +*BINOM.DIST.RANGE(trials, probability_s, number_s, [number_s2])* + +**Where:** + +* trials: The number of independent trials. This value must be greater than or equal to 0. + +* probability_s: The probability of success in each trial. + +* number_s: The number of successes in trials. + +* number_s2 (optional): The probability that the number of successes will be between number_s and number_s2, where number_s is the minimum and number_s2 is the maximum, within the total number of trials. + +**Remarks** + +* If probability is less than 0 or greater than 1, `BINOM.DIST.RANGE` will return the `#NUM!` error. + +* If number_s2 is less than number_s or greater than trails, `BINOM.DIST.RANGE` will return the `#NUM!` error. + +* If number_s less than 0 or greater than trails, `BINOM.DIST.RANGE` will return the `#NUM!` error. + +* If any arguments are non-numeric, `BINOM.DIST.RANGE` will return the `#VALUE!` error. + +* Numeric arguments are truncated to integers. + +## BETADIST + +The `BETADIST` function returns the cumulative beta probability density function. + +**Syntax** + +*BETADIST(x, alpha, beta, [A], [B])* + +**Where:** + +* x: The value between A and B at which to evaluate the function. + +* alpha: A parameter of the distribution. + +* beta: A parameter of the distribution. + +* A (optional): A lower bound to the interval of x. The default value of A is 0. + +* B (optional): An upper bound to the interval of x. The default value of B is 1. + +**Remarks** + +* If any argument is non-numeric, `BETADIST` returns the `#VALUE!` error. + +* If alpha or beta is less than or equal to 0, `BETADIST` returns the `#NUM!` error. + +* If x is less than A or greater than B, or A equals B, `BETADIST` returns the `#NUM!` error. + +## TDIST + +The `TDIST` function returns the percentage points (probability) for the Student's t-distribution, where a numeric value (x) is a calculated value of t for which the percentage points are to be computed. + +**Syntax** + +*TDIST(x, deg_freedom, tails)* + +**Where:** + +* x: The numeric value at which to evaluate the distribution. + +* deg_freedom: An integer indicating the number of degrees of freedom. + +* tails: Specifies the number of distribution tails to return. + + * 1 - one-tailed distribution. + + * 2 - two-tailed distribution. + +**Remarks** + +* If any argument is non-numeric, `TDIST` returns the `#VALUE!` error. + +* If deg_freedom is less than 1, `TDIST` returns the `#NUM!` error. + +* The deg_freedom and tails arguments are truncated to integers. + +* If tails is any value other than 1 or 2, `TDIST` returns the `#NUM!` error. + +* If x is less than 0, `TDIST` returns the `#NUM!` error. + +## TINV + +The `TINV` function returns the two-tailed inverse of the Student's t-distribution. + +**Syntax** + +*TINV(probability, deg_freedom)* + +**Where:** + +* probability: The probability associated with the two-tailed Student's t-distribution. + +* deg_freedom: The number of degrees of freedom to characterize the distribution. + +**Remarks** + +* If the probability or deg_freedom is non-numeric, `TINV` returns the `#VALUE!` error. + +* If the probability is less than or equal to 0 or greater than 1, `TINV` returns the `#NUM!` error. + +* If deg_freedom is not an integer, it is truncated to the nearest integer. + +* If deg_freedom is less than 1, the function `TINV` returns the `#NUM!` error. + +## T.TEST + +The `T.TEST` function returns the probability associated with a Student's t-Test, used to determine if two samples likely come from the same population with an equal mean. + +**Syntax** + +*T.TEST(array1, array2, tails, type)* + +**Where:** + +* array1: The first data set. + +* array2: The second data set. + +* tails: Specifies the number of distribution tails. + + * 1 - One tailed distribution. + + * 2 - Two tailed distribution. + +* type: The kind of t-Test to perform. + + * 1 - Paired. + + * 2 - Two-sample equal variance. + + * 3 - Two-sample unequal variance. + +**Remarks** + +* If array1 and array2 have a different number of data points, and type = 1 (paired), `T.TEST` returns the `#N/A` error value. + +* The tails and type arguments are truncated to integers. + +* If tails or type is non-numeric, `T.TEST` returns the `#VALUE!` error. + +* If tails is any value other than 1 or 2, `T.TEST` returns the `#NUM!` error. + +## T.INV.2T + +The `T.INV.2T` function returns the two-tailed inverse of the Student's t-distribution. + +**Syntax** + +*T.INV.2T(probability, deg_freedom)* + +**Where:** + +* probability: The probability associated with the Student's t-distribution. + +* deg_freedom: The number of degrees of freedom with which to characterize the distribution. + +**Remarks** + +* If probability or deg_freedom is non-numeric, `T.INV.2T` returns the `#VALUE!` error. + +* If the probability is less than or equal to 0 or greater than 1, `T.INV.2T` returns the `#NUM! `error. + +* If deg_freedom is not an integer, it is truncated to the nearest integer. + +* If deg_freedom is less than 1, `T.INV.2T` returns the `#NUM!` error. + +## T.DIST.RT Function + +The `T.DIST.RT` function returns the right-tailed Student's t-distribution. + +**Syntax** + +*T.DIST.RT(x, deg_freedom)* + +**Where:** + +* x: The numeric value at which to evaluate the distribution. + +* deg_freedom: An integer indicating the number of degrees of freedom. + +**Remarks** + +* If x or deg_freedom is non-numeric, `T.DIST.RT` returns the `#VALUE!` error. + +* If deg_freedom is less than 1, `T.DIST.RT` returns the `#NUM!` error. + +## T.DIST.2T + +The `T.DIST.2T` function returns the two-tailed Student's t-distribution. + +**Syntax** + +*T.DIST.2T(x, deg_freedom)* + +**Where:** + +* x: The numeric value at which to evaluate the distribution. + +* deg_freedom: An integer indicating the number of degrees of freedom. + +**Remarks** + +* If x or deg_freedom is non-numeric, `T.DIST.2T` returns the `#VALUE!` error. + +* If deg_freedom is less than 1, `T.DIST.2T` returns the `#NUM!` error. + +* If x is less than 0, `T.DIST.2T` returns the `#NUM!` error. + +## FORECAST.LINEAR + +The `FORECAST.LINEAR` function predicts a future value based on existing data by using linear regression. It calculates the dependent value (y) for a given independent value (x), which is useful for forecasting trends such as sales or inventory needs. + +**Syntax** + +*FORECAST.LINEAR(x, known_y's, known_x's)* + +**Where:** + +* x: The data point for which you want to predict a value. + +* known_y's: The dependent array or range of data. + +* known_x's: The independent array or range of data. + +**Remarks** + +* If x is non-numeric, `FORECAST.LINEAR` returns the `#VALUE!` error. + +* If known_y's or known_x's is empty, or if one has more data points than the other, `FORECAST.LINEAR` returns the `#N/A` error. + +* If the variance of known_x's equals zero, `FORECAST.LINEAR` returns the `#DIV/0!` error. + +## TREND + +The `TREND` function returns values along a linear trend by fitting a straight line to the known y-values and x-values using the method of least squares. It predicts the y-values for a given array of new x-values, which is useful for forecasting data trends. + +**Syntax** + +*TREND(known_y's, [known_x's], [new_x's], [const])* + +**Where:** + +* known_y's: The set of y-values in the equation `y = mx + b`. + +* known_x's (Optional): The independent array or range of data (x-values) corresponding to the known_y's. If omitted, it is assumed to be the array {1,2,3,...} that is the same size as known_y's. + +* new_x's (Optional): The array of new x-values for which you want to predict corresponding y-values. If omitted, it is assumed to be the array {1,2,3,...} that is the same size as known_y's. + +* const (Optional) : A logical value that determines whether the intercept of the regression line is forced to zero. + + * TRUE or Omitted: Calculates normally using - `y = mx + b`. + + * FALSE: In `y = mx + b`, b is set equal to 0, and the m-values are adjusted so that y = mx. + +**Remarks:** + +* If known_y's or known_x's are empty, or if one has more data points than the other, `TREND` function will return the `#N/A` error. + +* If the variance of known_x's equals zero, `TREND` will return the `#DIV/0!` error. \ No newline at end of file