Sign up and get started with Confidence today! Create your account
Sign up and get started with Confidence today! Create your account
Runs a power analysis.
curl --request POST \
--url https://stats.eu.confidence.dev/v2/stats:runPowerAnalysis \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"plan": {
"alpha": 123,
"power": 123,
"groups": [
{
"id": "<string>",
"weight": 123
}
],
"comparisons": {
"oneVsAll": {
"baseline": "<string>"
},
"allVsAll": {},
"custom": {
"pairs": [
{
"baseline": "<string>",
"compared": "<string>"
}
]
}
},
"hypotheses": [
{
"id": "<string>",
"type": {
"superiority": {
"preferredDirection": {},
"minimumDetectableEffect": 123
},
"nonInferiority": {
"preferredDirection": {},
"nonInferiorityMargin": 123
},
"jointEquivalence": {
"minimumDetectableDeviation": 123
}
},
"segments": [
{
"params": {
"chi2": {
"expectedFrequency": [
{
"group": "<string>",
"frequency": 123
}
]
},
"zTest": {},
"gstZTest": {
"maxSampleSize": 123
},
"ratio": {},
"tunncDesign": {
"optimalSampleSize": 123,
"weight": [
{}
]
},
"gstRatio": {
"maxSampleSize": 123
},
"asympCs": {
"optimalSampleSize": 123
},
"asympCsRatio": {
"optimalSampleSize": 123
}
},
"dimensions": [
{}
]
}
],
"dataType": {}
}
],
"decisionRule": {
"items": [
{
"hypothesis": "<string>",
"rule": {}
}
],
"operator": {}
},
"settings": {
"disableSegmentAlphaAdjustment": true
}
},
"data": {
"hypotheses": [
{
"id": "<string>",
"segments": [
{
"powerData": {
"chi2": {},
"zTest": {
"baselineVariance": 123,
"baselineMean": 123,
"adjustment": {
"baselineVariance": 123,
"baselineCovariance": 123
}
},
"gstZTest": {
"baselineVariance": 123,
"baselineMean": 123,
"adjustment": {
"baselineVariance": 123,
"baselineCovariance": 123
}
},
"ratio": {
"baselineNumeratorVariance": 123,
"baselineDenominatorVariance": 123,
"baselineCovariance": 123,
"baselineNumeratorMean": 123,
"baselineDenominatorMean": 123
},
"tunncDesign": {},
"gstRatio": {
"baselineNumeratorVariance": 123,
"baselineDenominatorVariance": 123,
"baselineCovariance": 123,
"baselineNumeratorMean": 123,
"baselineDenominatorMean": 123
},
"asympCs": {
"baselineVariance": 123,
"baselineMean": 123,
"adjustment": {
"baselineVariance": 123,
"baselineCovariance": 123
}
},
"asympCsRatio": {
"baselineNumeratorVariance": 123,
"baselineDenominatorVariance": 123,
"baselineCovariance": 123,
"baselineNumeratorMean": 123,
"baselineDenominatorMean": 123
}
},
"dimensions": [
{}
],
"expectedSampleSize": 123
}
]
}
]
}
}
'{
"hypotheses": [
{
"id": "<string>",
"requiredSampleSize": 123,
"segments": [
{
"dimensions": [
{}
],
"requiredSampleSize": 123,
"ciWidthAbs": 123,
"ciWidthRel": 123,
"baselineMean": 123,
"baselineVariance": 123,
"varianceReductionRate": 123
}
],
"adjustedAlpha": 123,
"adjustedBeta": 123
}
],
"requiredSampleSize": 123,
"annotations": [
{
"context": [
{
"key": {},
"value": "<string>"
}
],
"info": "<string>",
"warning": "<string>",
"error": {
"details": "<string>",
"category": {}
}
}
],
"statsCacheEntry": "<string>"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
AnalysisPlan: The description of which hypotheses that are going to be tested, which group comparisons that are included, and how the result should be evaluated.
Show child attributes
PowerAnalysisData: Additional data for the power analysis, only required to be set if hypotheses are relative or if ci_width should be computed.
Show child attributes
OK
The sample size for each hypothesis.
Show child attributes
The sample size needed to get the desired power for all hypotheses.
List of issues discovered during the power analysis.
Show child attributes
Cache entry used, empty if not cached.
Was this page helpful?
curl --request POST \
--url https://stats.eu.confidence.dev/v2/stats:runPowerAnalysis \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"plan": {
"alpha": 123,
"power": 123,
"groups": [
{
"id": "<string>",
"weight": 123
}
],
"comparisons": {
"oneVsAll": {
"baseline": "<string>"
},
"allVsAll": {},
"custom": {
"pairs": [
{
"baseline": "<string>",
"compared": "<string>"
}
]
}
},
"hypotheses": [
{
"id": "<string>",
"type": {
"superiority": {
"preferredDirection": {},
"minimumDetectableEffect": 123
},
"nonInferiority": {
"preferredDirection": {},
"nonInferiorityMargin": 123
},
"jointEquivalence": {
"minimumDetectableDeviation": 123
}
},
"segments": [
{
"params": {
"chi2": {
"expectedFrequency": [
{
"group": "<string>",
"frequency": 123
}
]
},
"zTest": {},
"gstZTest": {
"maxSampleSize": 123
},
"ratio": {},
"tunncDesign": {
"optimalSampleSize": 123,
"weight": [
{}
]
},
"gstRatio": {
"maxSampleSize": 123
},
"asympCs": {
"optimalSampleSize": 123
},
"asympCsRatio": {
"optimalSampleSize": 123
}
},
"dimensions": [
{}
]
}
],
"dataType": {}
}
],
"decisionRule": {
"items": [
{
"hypothesis": "<string>",
"rule": {}
}
],
"operator": {}
},
"settings": {
"disableSegmentAlphaAdjustment": true
}
},
"data": {
"hypotheses": [
{
"id": "<string>",
"segments": [
{
"powerData": {
"chi2": {},
"zTest": {
"baselineVariance": 123,
"baselineMean": 123,
"adjustment": {
"baselineVariance": 123,
"baselineCovariance": 123
}
},
"gstZTest": {
"baselineVariance": 123,
"baselineMean": 123,
"adjustment": {
"baselineVariance": 123,
"baselineCovariance": 123
}
},
"ratio": {
"baselineNumeratorVariance": 123,
"baselineDenominatorVariance": 123,
"baselineCovariance": 123,
"baselineNumeratorMean": 123,
"baselineDenominatorMean": 123
},
"tunncDesign": {},
"gstRatio": {
"baselineNumeratorVariance": 123,
"baselineDenominatorVariance": 123,
"baselineCovariance": 123,
"baselineNumeratorMean": 123,
"baselineDenominatorMean": 123
},
"asympCs": {
"baselineVariance": 123,
"baselineMean": 123,
"adjustment": {
"baselineVariance": 123,
"baselineCovariance": 123
}
},
"asympCsRatio": {
"baselineNumeratorVariance": 123,
"baselineDenominatorVariance": 123,
"baselineCovariance": 123,
"baselineNumeratorMean": 123,
"baselineDenominatorMean": 123
}
},
"dimensions": [
{}
],
"expectedSampleSize": 123
}
]
}
]
}
}
'{
"hypotheses": [
{
"id": "<string>",
"requiredSampleSize": 123,
"segments": [
{
"dimensions": [
{}
],
"requiredSampleSize": 123,
"ciWidthAbs": 123,
"ciWidthRel": 123,
"baselineMean": 123,
"baselineVariance": 123,
"varianceReductionRate": 123
}
],
"adjustedAlpha": 123,
"adjustedBeta": 123
}
],
"requiredSampleSize": 123,
"annotations": [
{
"context": [
{
"key": {},
"value": "<string>"
}
],
"info": "<string>",
"warning": "<string>",
"error": {
"details": "<string>",
"category": {}
}
}
],
"statsCacheEntry": "<string>"
}