Returns the value for the statistical binomial distribution. Binomial distribution is the probability of observing X number of successes in a fixed number of independent trials.
This function belongs to the Statistical category.
Syntax
BinomDist(X, Trials, ProbabilityOfSuccess, Cumulative)
Return Value
Numeric
Examples
A test consists of 16 questions. For each question, the answer can be true or false. The probability of getting a true answer for a question is 0.5. The following expression returns 0.89 as the binomial distribution for getting a true answer for at most 10 questions:
BinomDist(10, 16, 0.5, TRUE)
The following expression returns 0.12 as the binomial distribution for getting a true answer for exactly 10 questions:
BinomDist(10, 16, 0.5, FALSE)
Argument Datatype Description
X Numeric Required. Number for which you want to perform the calculation. Must be between 0 and Trials, inclusive.
Trials Numeric Required. Number of independent trials.
ProbabilityOfSuccess Numeric Required. Probability of a success on a single trial. Must be between 0 and 1, inclusive.
Cumulative Boolean Required. Logical value that determines the form of the function. If cumulative is TRUE, the function returns the cumulative answer.
Otherwise, it does not return the cumulative answer.
BinomInv 61
B INOM I NV
Returns the number (integer) for which the cumulative binomial distribution is greater than or equal to a criterion value. The cumulative binomial distribution is the first argument (Probability) that you pass to the function. The BinomInv function is the statistical inverse of binomial distribution (BinomDist) function.
This function belongs to the Statistical category.
Syntax
BinomInv(Probability, Trials, ProbabilityOfSuccess)
Return Value
Numeric
Examples
In an experiment, you flip a coin six times. For each flip, you can get heads or tails. The probability of getting heads for a coin flip is 0.5. The following expression returns 3 as the smallest number of coin flips for a cumulative binomial distribution of 0.75:
BinomInv(0.75, 6, 0.5)
Argument Datatype Description
Probability Numeric Required. Probability associated with the distribution. Must be between 0 and 1, inclusive.
Trials Numeric Required. Number of independent trials.
ProbabilityOfSuccess Numeric Required. Probability of a success on a single trial. Must be between 0 and 1, inclusive.
C EILING
Returns the value rounded up to the specified number of digits, towards positive infinity. The PowerAnalyzer Ceiling function differs from the Microsoft Excel Ceiling function. In the PowerAnalyzer Ceiling function, Significance is the number of digits to the right of the decimal point. In Excel, Significance is the multiple to which you want to round. The PowerAnalyzer Ceiling function rounds a number towards positive infinity, whereas the Excel Ceiling function rounds a number away from zero.
This function belongs to the Rounding category.
Syntax
Ceiling(NumericValue [, Significance])
Return Value
Numeric
Examples
The following expression returns the number rounded up to the significance, towards positive infinity:
If you pass a negative number (-n) as the value of the Significance argument, the Ceiling function returns 10 raised to the nth power. For example, Ceiling(2.425, -2) returns 100.
Argument Datatype Description
NumericValue Numeric Required. Numeric value you want to pass to the function. You can enter a numeric literal, numeric metric name, or numeric attribute name.
Significance Numeric Optional. Number of places to the right of decimal point. Negative value indicates number of places to the left of decimal point. Default is 0.
Ceiling 63
To generate the same result as the Excel Ceiling(value, significance) function, use the following expression:
RoundUp(value/significance) * significance
C HI D IST
Returns the probability of the chi-squared distribution. The chi-squared distribution is associated with a squared test and a certain number of degrees of freedom. The chi-squared test allows you to compare observed and expected values.
This function belongs to the Statistical category.
Syntax
ChiDist(X, DegreesOfFreedom)
Return Value
Numeric
Examples
In an experiment involving the student test scores, the value of a chi-squared test is 2.5 and the degrees of freedom is 8. The following expression returns 0.96 as the probability of the chi-squared distribution:
ChiDist(2.5, 8)
Argument Datatype Description
X Numeric Required. Number for which you want to perform the calculation. Must be greater than or equal to 0.
DegreesOfFreedom Numeric Required. Whole number representing the degrees of freedom. Degrees of freedom is the number of values in a statistical calculation that are free to vary. Must be between 1 and 10,000, inclusive.
ChiInv 65
C HI I NV
Returns the inverse of the probability associated with a chi-squared distribution. The ChiInv (Probability, DegressofFreedom) function returns the value X, where Probability is the return value of the ChiDist(X, DegressofFreedom) function.
This function belongs to the Statistical category.
Syntax
ChiInv(Probability, DegreesOfFreedom)
Return Value
Numeric
Examples
The following expression returns 2.5 as the value of a chi-squared test:
ChiInv(0.96, 8)
Argument Datatype Description
Probability Numeric Required. Probability associated with the distribution. Must be between 0 and 1, inclusive.
DegreesOfFreedom Numeric Required. Whole number representing the degrees of freedom. Degrees of freedom is the number of values in a statistical calculation that are free to vary. Must be between 1 and 10,000, inclusive.
C HI T EST
Returns the chi-squared goodness of fit between expected and observed lists. You can use this function to find out if results based on a hypothesis are verified by an experiment. Pass numeric metrics or attributes as the values for the ListExpected and ListObserved arguments.
Use the Context argument to narrow the scope of the function to specific metric or attribute values. The Context1 argument corresponds to the ListObserved argument and the Context2 argument corresponds to the ListExpected argument.
This function belongs to the Aggregate category.
Syntax
ChiTest(ListObserved, ListExpected [, Context1, Context2])
Return Value
Numeric
Examples
The following expression returns 0.944 as the Chitest value between expected satisfaction rating and the actual satisfaction rating for customers in the 30-39 years age group:
ChiTest({Actual Rating}, {Expected Rating}, "{Age Group}='30-39'", "{Age Group}='30-39'")
ListObserved Numeric List Required. List of observed values. Use a metric or attribute name.
ListExpected Numeric List Required. List of expected results. Use a metric or attribute name.
Context1 String Optional. First filter for setting a scope for the function. Context allows you to narrow the calculation to a set of attribute or metric values. You must enclose the Context within quotation marks. The syntax for the Context argument depends on the function where you are using it.
Context2 String Optional. Second filter for setting a scope for the function. Default is the same as the value of Context1. Context allows you to narrow the calculation to a set of attribute or metric values. You must enclose the Context within quotation marks. The syntax for the Context argument depends on the function where you are using it.
ChiTest 67 30-39 7 7
30-39 4.3 5 30-39 2 4
Notes
The two lists must have equal number of values. If there is a NULL in one list, the corresponding value in the other list is skipped. In this case, the function does not include either value in the calculation.
When you pass an optional argument, you must also pass all other optional arguments that occur before it in the function syntax.
C LEAN
Cleans a string of control characters. Removes all nonprintable characters from a string. You can use this function to remove control characters from a string. These control characters are characters that may not print with your operating system.
This function belongs to the String category.
Syntax
Clean(String)
Return Value
String
Argument Datatype Description
String String Required. String value you want to pass to the function.
Concat 69
C ONCAT
Concatenates two strings. If one of the strings is NULL, the Concat function ignores it and returns the other string. If both strings are NULL, the Concat function returns NULL.
This function belongs to the String category.
Syntax
Concat(String1, String2)
Return Value
String
Examples
The following expression concatenates the names in the First Name and Last Name attributes:
Concat({First Name}, {Last Name}) First Name Last Name Return Value --- --- Beth Kelley BethKelley Marin Jones MarinJones george cash georgecash Ally NULL Ally
Notes
The Concat function does not add spaces between the two strings. If you want to add a space between the strings, use an expression with two nested Concat functions:
Concat(Concat({First Name}, " "), {Last Name})
Argument Datatype Description
String1 String Required. String value you want to pass to the function.
String2 String Required. String value you want to pass to the function.
C ONFIDENCE
Returns the confidence range for the mean of a population. The confidence range is a value on either side of a sample mean, which allows you to determine the standard deviation with a particular level of confidence. The level of confidence determines the value of the Alpha argument. Alpha equals (1-confidence level/100). For example, for an 80 percent confidence level, Alpha equals 0.2.
This function belongs to the Statistical category.
Syntax
Confidence(Alpha, StdDev, Size)
Return Value
Numeric
Examples
In an experiment to determine the time taken to complete a test, you have a sample of 100 students. The average time taken to complete the test is 45 minutes. The population standard deviation is 5.5. Use the following expression to determine, with 90 percent confidence, the interval within which the population mean lies:
Confidence(0.1, 5.5, 100)
The above expression returns the value 0.90. Thus, you can say with 90 percent confidence that the average time taken to complete the test equals 45 plus/minus 0.90 minutes, or 44.1 to 45.9 minutes.
Argument Datatype Description
Alpha Numeric Required. The alpha variable.
StdDev Numeric Required. Standard deviation of a list of numbers.
Size Numeric Required. Number of elements for which you want to perform the calculation. Must be greater than or equal to 0.
Correl 71
C ORREL
Returns the correlation coefficient of two sets of values. You can use the correlation
coefficient to determine the relationship between two sets of values. Pass numeric metrics or attributes as the values for the first and second List arguments. Use the Context argument to narrow the scope of the function to specific metric or attribute values. The Context1 argument corresponds to the List1 argument and the Context2 argument corresponds to the List2 argument.
This function belongs to the Aggregate category.
Syntax
Correl(List1, List2 [, Context1, Context2])
Return Value
Numeric
Examples
The following expression returns 0.1685 as the correlation coefficient of Sales in 2003 and 2004 for products in the Drinks category:
Correl({2003 Sales}, {2004 Sales}, "{Category}='Drinks'",
"{Category}='Drinks'")
List1 Numeric List Required. Name of a metric or attribute.
List2 Numeric List Required. Name of a metric or attribute.
Context1 String Optional. First filter for setting a scope for the function. Context allows you to narrow the calculation to a set of attribute or metric values. You must enclose the Context within quotation marks. The syntax for the Context argument depends on the function where you are using it.
Context2 String Optional. Second filter for setting a scope for the function. Default is the same as the value of Context1. Context allows you to narrow the calculation to a set of attribute or metric values. You must enclose the Context within quotation marks. The syntax for the Context argument depends on the function where you are using it.
Drinks 2000 750 Food 28195 16974
Notes
The two lists must have equal number of values. If there is a NULL in one list, the corresponding value in the other list is skipped. In this case, the function does not include either value in the calculation.
When you pass an optional argument, you must also pass all other optional arguments that occur before it in the function syntax.
Cos 73
C OS
Returns the cosine of a numeric value.
This function belongs to the Trigonometric category.
Syntax
Cos(Angle)
Return Value
Numeric. The value is in the range -1 to +1.
Examples
The following expression returns the cosine for all values of the Degrees metric:
Cos({Degrees}*PI/180) Degrees Return Value --- 0 1.0 90 0.0 70 0.342020143325593 NULL NULL
Argument Datatype Description
Angle Numeric Required. An angle, expressed in radians. To convert degrees to radians, multiply the degrees by PI/180 or use the Units function.
C OSH
Returns the hyperbolic cosine of a numeric value.
This function belongs to the Trigonometric category.
Syntax
Cosh(Angle)
Return Value
Numeric
Examples
The following expression returns the hyperbolic cosine for all values of the Angles metric:
Cosh({Angles}) Degrees Return Value --- 1.0 1.54308063481524 3.66 19.4435376920294 0 1.0 NULL NULL
Argument Datatype Description
Angle Numeric Required. An angle, expressed in radians. To convert degrees to radians, multiply the degrees by PI/180 or use the Units function.
Cot 75
C OT
Returns the cotangent of a numeric value.
This function belongs to the Trigonometric category.
Syntax
Cot(Angle)
Return Value
Numeric
Examples
The following expression returns the cotangent for all values of the Angles metric:
Cot({Angles}) Degrees Return Value --- 1.0 0.64 0.52 1.74653 5 -0.30 NULL NULL
Argument Datatype Description
Angle Numeric Required. An angle, expressed in radians. To convert degrees to radians, multiply the degrees by PI/180 or use the Units function.
C OTH
Returns the hyperbolic cotangent of a numeric value.
This function belongs to the Trigonometric category.
Syntax
Coth(Angle)
Return Value
Numeric
Examples
The following expression returns the value 2.16:
Coth(0.5)
Argument Datatype Description
Angle Numeric Required. An angle, expressed in radians. To convert degrees to radians, multiply the degrees by PI/180 or use the Units function.
CountAll 77
C OUNT A LL
Counts the number of values within a given metric or attribute. You can use this function to get the number of rows in a column. The Context argument allows you to count only a specific set of metric or attribute values.
This function belongs to the Aggregate category.
Syntax
CountAll(List [, Context])
Return Value
Numeric
Examples
The following expression returns 2 as the number of values in the Sales Person attribute for the Northern region:
CountAll({Sales Person}, "{Region}='Northern'") Sales Person Region
---- Roger Northern Sean Eastern Tim Northern Pearce Western
Argument Datatype Description
List Numeric List Required. Name of a metric or attribute.
Context String Optional. Filter for setting a scope for the function. Context allows you to narrow the calculation to a set of attribute or metric values. You must enclose the Context within quotation marks. The syntax for the Context argument depends on the function where you are using it.