MultipleTesting.AdjustBonferroni Method

Adjusts p-values using the Bonferroni correction.

Definition

Namespace: Numerics.NET.Statistics.Tests
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.1.2
C#
public static Vector<double> AdjustBonferroni(
	Vector<double> pValues
)

Parameters

pValues  Vector<Double>
A vector of raw p-values.

Return Value

Vector<Double>
A vector of adjusted p-values.

Remarks

This method multiplies each p-value by the number of tests to control the family-wise error rate. The resulting values are capped at 1.0 to ensure they remain valid probabilities.

It is valid for independent or positively correlated tests. Be cautious as it may be overly conservative for large numbers of tests, potentially leading to excessive Type II errors (false negatives).

For datasets with hundreds or thousands of tests, consider using a less conservative method such as Benjamini-Hochberg that controls the false discovery rate instead of the family-wise error rate.

Exceptions

ArgumentNullException

pValues is null.

See Also