Logo

CRITBINOM

Updated 2023-11-02 21:27:20.197000

Syntax

SELECT [westclintech].[wct].[CRITBINOM] (
  <@Trials, int,>
 ,<@Probability_s, float,>
 ,<@Alpha, float,>)

Description

Use the scalar function CRITBINOM to calculate the smallest value for the cumulative binomial distribution that is greater than or equal to a criterion value.

Arguments

@Alpha

is the criterion value. @Alpha is an expression of type float or of a type that can be implicitly converted to float.

@Probability_s

is the number of successes in each trial. @Probability_s is an expression of type float or of a type that can be implicitly converted to float.

@Trials

is the number of Bernoulli trials. @Trials is an expression of type float or of a type that can be implicitly converted to float.

Return Type

float

Remarks

If @Trials = 0, CRITBINOM returns an error.

If @Probability_s = 0 or @Probability_s = 1, CRITBINOM returns an error

@Trials is truncated to zero decimal places.

If @Alpha = 0 or @Alpha = 1, CRITBINOM returns an error

Examples

select wct.CRITBINOM(100, .3, .7);

This produces the following result.

{"columns":[{"field":"column 1","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"column 1":"32"}]}