dataFrame.columns.stat — minDetectableEffect()
Description
The minDetectableEffect() method of the stat object computes the minimum detectable effect (MDE) for the selected sample.
Signature
dataFrame.columns(...columnNames).stat.minDetectableEffect({ power: 0.8, significance: 0.05, variants: 1 })Arguments
...columnNames( string[] )- The name of the columns from which to compute the MDE.
- Column 1: sample size for each observation.
- Column 2: number of observed successes for the corresponding sample.
options(object)- Minimum detectable effect options.
Options
power(number)- The desired statistical power. (Default:
0.8) significance(number)- The significance level of the test. (Default:
0.05) variants(number)- The number of treatment variants compared against the reference group. (Default:
1)
Returns
mask( number[] )- The minimum detectable effect computed for each observation.
Notes
- The method requires exactly two selected columns.
- The method estimates the smallest effect size that can be detected with the available sample size.
- The method automatically computes the baseline proportion from the selected columns.
- Larger samples produce smaller detectable effects.
- Higher statistical power requires larger detectable effects when sample size is fixed.
- Lower significance levels require larger detectable effects when sample size is fixed.
- Increasing the number of variants increases the detectable effect required for each comparison.
- The result should be interpreted as the smallest effect likely to be detected reliably under the specified assumptions.
Example
// computes the MDE from 2 columns of a dataFrame
var mask = dataFrame.columns('visitors', 'conversions').stat.minDetectableEffect();
// add the MDEs to the dataFrame
dataFrame.column('MDE').set(mask);