Skip to main content
POST
/
v2
/
stats:runAnalysis
Run Analysis
curl --request POST \
  --url https://stats.eu.confidence.dev/v2/stats:runAnalysis \
  --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": [
          {
            "dimensions": [
              {}
            ],
            "groups": [
              {
                "group": "<string>",
                "data": {
                  "chi2": {
                    "summary": {
                      "count": 123
                    }
                  },
                  "zTest": {
                    "summary": {
                      "mean": 123,
                      "variance": 123,
                      "count": 123,
                      "adjustment": {
                        "mean": 123,
                        "variance": 123,
                        "covariance": 123,
                        "completeMean": 123,
                        "completeCount": 123
                      }
                    }
                  },
                  "gstZTest": {
                    "summary": {
                      "data": [
                        {
                          "timeLabel": "<string>",
                          "value": {
                            "mean": 123,
                            "variance": 123,
                            "count": 123,
                            "adjustment": {
                              "mean": 123,
                              "variance": 123,
                              "covariance": 123,
                              "completeMean": 123,
                              "completeCount": 123
                            }
                          }
                        }
                      ]
                    }
                  },
                  "ratio": {
                    "summary": {
                      "numeratorMean": 123,
                      "numeratorVariance": 123,
                      "denominatorMean": 123,
                      "denominatorVariance": 123,
                      "covariance": 123,
                      "count": 123,
                      "adjustment": {
                        "numeratorMean": 123,
                        "numeratorVariance": 123,
                        "denominatorMean": 123,
                        "denominatorVariance": 123,
                        "covariance": 123,
                        "preNumeratorPostNumeratorCovariance": 123,
                        "preNumeratorPostDenominatorCovariance": 123,
                        "preDenominatorPostNumeratorCovariance": 123,
                        "preDenominatorPostDenominatorCovariance": 123,
                        "completeNumeratorMean": 123,
                        "completeDenominatorMean": 123,
                        "completeCount": 123
                      }
                    }
                  },
                  "tunncDesign": {
                    "summary": {
                      "data": [
                        {
                          "timeLabel": "<string>",
                          "value": {
                            "mean": 123,
                            "variance": 123,
                            "count": 123,
                            "adjustment": {
                              "mean": 123,
                              "variance": 123,
                              "covariance": 123,
                              "completeMean": 123,
                              "completeCount": 123
                            }
                          }
                        }
                      ]
                    }
                  },
                  "gstRatio": {
                    "summary": {
                      "data": [
                        {
                          "timeLabel": "<string>",
                          "value": {
                            "numeratorMean": 123,
                            "numeratorVariance": 123,
                            "denominatorMean": 123,
                            "denominatorVariance": 123,
                            "covariance": 123,
                            "count": 123,
                            "adjustment": {
                              "numeratorMean": 123,
                              "numeratorVariance": 123,
                              "denominatorMean": 123,
                              "denominatorVariance": 123,
                              "covariance": 123,
                              "preNumeratorPostNumeratorCovariance": 123,
                              "preNumeratorPostDenominatorCovariance": 123,
                              "preDenominatorPostNumeratorCovariance": 123,
                              "preDenominatorPostDenominatorCovariance": 123,
                              "completeNumeratorMean": 123,
                              "completeDenominatorMean": 123,
                              "completeCount": 123
                            }
                          }
                        }
                      ]
                    }
                  },
                  "asympCs": {
                    "summary": {
                      "data": [
                        {
                          "timeLabel": "<string>",
                          "value": {
                            "mean": 123,
                            "variance": 123,
                            "count": 123,
                            "adjustment": {
                              "mean": 123,
                              "variance": 123,
                              "covariance": 123,
                              "completeMean": 123,
                              "completeCount": 123
                            }
                          }
                        }
                      ]
                    }
                  },
                  "asympCsRatio": {
                    "summary": {
                      "data": [
                        {
                          "timeLabel": "<string>",
                          "value": {
                            "numeratorMean": 123,
                            "numeratorVariance": 123,
                            "denominatorMean": 123,
                            "denominatorVariance": 123,
                            "covariance": 123,
                            "count": 123,
                            "adjustment": {
                              "numeratorMean": 123,
                              "numeratorVariance": 123,
                              "denominatorMean": 123,
                              "denominatorVariance": 123,
                              "covariance": 123,
                              "preNumeratorPostNumeratorCovariance": 123,
                              "preNumeratorPostDenominatorCovariance": 123,
                              "preDenominatorPostNumeratorCovariance": 123,
                              "preDenominatorPostDenominatorCovariance": 123,
                              "completeNumeratorMean": 123,
                              "completeDenominatorMean": 123,
                              "completeCount": 123
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            ],
            "labels": [
              {}
            ]
          }
        ]
      }
    ]
  }
}
'
{
  "hypotheses": [
    {
      "id": "<string>",
      "segments": [
        {
          "dimensions": [
            {}
          ],
          "comparisons": [
            {
              "groups": {
                "single": "<string>",
                "pair": {
                  "baseline": "<string>",
                  "compared": "<string>"
                },
                "multiple": {
                  "groups": [
                    "<string>"
                  ]
                }
              },
              "result": {
                "chi2": {
                  "frequency": [
                    {
                      "group": "<string>",
                      "value": 123,
                      "expected": 123
                    }
                  ],
                  "chi2Statistic": 123,
                  "pValue": 123
                },
                "zTest": {
                  "baselineMeanAbs": 123,
                  "comparedMeanAbs": 123,
                  "baselineMeanRel": 123,
                  "comparedMeanRel": 123,
                  "differenceAbs": {
                    "estimate": 123,
                    "stdErr": 123,
                    "lower": 123,
                    "upper": 123,
                    "powered": 123,
                    "isSignificant": {
                      "value": true
                    }
                  },
                  "differenceRel": {
                    "estimate": 123,
                    "stdErr": 123,
                    "lower": 123,
                    "upper": 123,
                    "powered": 123,
                    "isSignificant": {
                      "value": true
                    }
                  },
                  "zStatistic": 123,
                  "pValue": 123,
                  "varianceReductionRate": 123,
                  "unadjustedBaselineMeanAbs": 123,
                  "unadjustedComparedMeanAbs": 123,
                  "baselineSampleSize": 123,
                  "comparedSampleSize": 123
                },
                "gstZTest": {
                  "baselineMeanAbs": [
                    123
                  ],
                  "comparedMeanAbs": [
                    123
                  ],
                  "baselineMeanRel": [
                    123
                  ],
                  "comparedMeanRel": [
                    123
                  ],
                  "differenceAbs": [
                    {
                      "timeLabel": "<string>",
                      "estimate": {
                        "estimate": 123,
                        "stdErr": 123,
                        "lower": 123,
                        "upper": 123,
                        "powered": 123,
                        "isSignificant": {
                          "value": true
                        }
                      }
                    }
                  ],
                  "differenceRel": [
                    {
                      "timeLabel": "<string>",
                      "estimate": {
                        "estimate": 123,
                        "stdErr": 123,
                        "lower": 123,
                        "upper": 123,
                        "powered": 123,
                        "isSignificant": {
                          "value": true
                        }
                      }
                    }
                  ],
                  "zStatistic": [
                    123
                  ],
                  "varianceReductionRate": [
                    123
                  ],
                  "unadjustedBaselineMeanAbs": [
                    123
                  ],
                  "unadjustedComparedMeanAbs": [
                    123
                  ],
                  "baselineSampleSize": [
                    123
                  ],
                  "comparedSampleSize": [
                    123
                  ]
                },
                "ratio": {
                  "baselineRatioAbs": 123,
                  "comparedRatioAbs": 123,
                  "baselineRatioRel": 123,
                  "comparedRatioRel": 123,
                  "ratioDifferenceAbs": {
                    "estimate": 123,
                    "stdErr": 123,
                    "lower": 123,
                    "upper": 123,
                    "powered": 123,
                    "isSignificant": {
                      "value": true
                    }
                  },
                  "ratioDifferenceRel": {
                    "estimate": 123,
                    "stdErr": 123,
                    "lower": 123,
                    "upper": 123,
                    "powered": 123,
                    "isSignificant": {
                      "value": true
                    }
                  },
                  "zStatistic": 123,
                  "pValue": 123,
                  "varianceReductionRate": 123,
                  "unadjustedBaselineRatioAbs": 123,
                  "unadjustedComparedRatioAbs": 123,
                  "unadjustedBaselineNumerator": 123,
                  "unadjustedComparedNumerator": 123,
                  "unadjustedBaselineDenominator": 123,
                  "unadjustedComparedDenominator": 123,
                  "baselineSampleSize": 123,
                  "comparedSampleSize": 123
                },
                "tunncDesign": {
                  "baselineMeanAbs": [
                    123
                  ],
                  "comparedMeanAbs": [
                    123
                  ],
                  "baselineMeanRel": [
                    123
                  ],
                  "comparedMeanRel": [
                    123
                  ],
                  "differenceAbs": [
                    {
                      "timeLabel": "<string>",
                      "estimate": {
                        "estimate": 123,
                        "stdErr": 123,
                        "lower": 123,
                        "upper": 123,
                        "powered": 123,
                        "isSignificant": {
                          "value": true
                        }
                      }
                    }
                  ],
                  "differenceRel": [
                    {
                      "timeLabel": "<string>",
                      "estimate": {
                        "estimate": 123,
                        "stdErr": 123,
                        "lower": 123,
                        "upper": 123,
                        "powered": 123,
                        "isSignificant": {
                          "value": true
                        }
                      }
                    }
                  ],
                  "varianceReductionRate": [
                    123
                  ]
                },
                "gstRatio": {
                  "baselineRatioAbs": [
                    123
                  ],
                  "comparedRatioAbs": [
                    123
                  ],
                  "baselineRatioRel": [
                    123
                  ],
                  "comparedRatioRel": [
                    123
                  ],
                  "ratioDifferenceAbs": [
                    {
                      "timeLabel": "<string>",
                      "estimate": {
                        "estimate": 123,
                        "stdErr": 123,
                        "lower": 123,
                        "upper": 123,
                        "powered": 123,
                        "isSignificant": {
                          "value": true
                        }
                      }
                    }
                  ],
                  "ratioDifferenceRel": [
                    {
                      "timeLabel": "<string>",
                      "estimate": {
                        "estimate": 123,
                        "stdErr": 123,
                        "lower": 123,
                        "upper": 123,
                        "powered": 123,
                        "isSignificant": {
                          "value": true
                        }
                      }
                    }
                  ],
                  "zStatistic": [
                    123
                  ],
                  "varianceReductionRate": [
                    123
                  ],
                  "unadjustedBaselineRatioAbs": [
                    123
                  ],
                  "unadjustedComparedRatioAbs": [
                    123
                  ],
                  "unadjustedBaselineNumerator": [
                    123
                  ],
                  "unadjustedComparedNumerator": [
                    123
                  ],
                  "unadjustedBaselineDenominator": [
                    123
                  ],
                  "unadjustedComparedDenominator": [
                    123
                  ],
                  "baselineSampleSize": [
                    123
                  ],
                  "comparedSampleSize": [
                    123
                  ]
                },
                "asympCs": {
                  "baselineMeanAbs": [
                    123
                  ],
                  "comparedMeanAbs": [
                    123
                  ],
                  "baselineMeanRel": [
                    123
                  ],
                  "comparedMeanRel": [
                    123
                  ],
                  "differenceAbs": [
                    {
                      "timeLabel": "<string>",
                      "estimate": {
                        "estimate": 123,
                        "stdErr": 123,
                        "lower": 123,
                        "upper": 123,
                        "powered": 123,
                        "isSignificant": {
                          "value": true
                        }
                      }
                    }
                  ],
                  "differenceRel": [
                    {
                      "timeLabel": "<string>",
                      "estimate": {
                        "estimate": 123,
                        "stdErr": 123,
                        "lower": 123,
                        "upper": 123,
                        "powered": 123,
                        "isSignificant": {
                          "value": true
                        }
                      }
                    }
                  ],
                  "varianceReductionRate": [
                    123
                  ],
                  "unadjustedBaselineMeanAbs": [
                    123
                  ],
                  "unadjustedComparedMeanAbs": [
                    123
                  ],
                  "baselineSampleSize": [
                    123
                  ],
                  "comparedSampleSize": [
                    123
                  ]
                },
                "asympCsRatio": {
                  "baselineRatioAbs": [
                    123
                  ],
                  "comparedRatioAbs": [
                    123
                  ],
                  "baselineRatioRel": [
                    123
                  ],
                  "comparedRatioRel": [
                    123
                  ],
                  "ratioDifferenceAbs": [
                    {
                      "timeLabel": "<string>",
                      "estimate": {
                        "estimate": 123,
                        "stdErr": 123,
                        "lower": 123,
                        "upper": 123,
                        "powered": 123,
                        "isSignificant": {
                          "value": true
                        }
                      }
                    }
                  ],
                  "ratioDifferenceRel": [
                    {
                      "timeLabel": "<string>",
                      "estimate": {
                        "estimate": 123,
                        "stdErr": 123,
                        "lower": 123,
                        "upper": 123,
                        "powered": 123,
                        "isSignificant": {
                          "value": true
                        }
                      }
                    }
                  ],
                  "zStatistic": [
                    123
                  ],
                  "varianceReductionRate": [
                    123
                  ],
                  "unadjustedBaselineRatioAbs": [
                    123
                  ],
                  "unadjustedComparedRatioAbs": [
                    123
                  ],
                  "unadjustedBaselineNumerator": [
                    123
                  ],
                  "unadjustedComparedNumerator": [
                    123
                  ],
                  "unadjustedBaselineDenominator": [
                    123
                  ],
                  "unadjustedComparedDenominator": [
                    123
                  ],
                  "baselineSampleSize": [
                    123
                  ],
                  "comparedSampleSize": [
                    123
                  ]
                }
              },
              "currentSampleSize": 123,
              "requiredSampleSize": 123,
              "isSignificant": {
                "value": true
              },
              "comparisonId": "<string>",
              "usedDataType": {},
              "groupStats": [
                {
                  "id": "<string>",
                  "sampleSize": 123
                }
              ]
            }
          ],
          "labels": [
            {}
          ]
        }
      ],
      "adjustedAlpha": 123,
      "adjustedBeta": 123
    }
  ],
  "recommendations": [
    {
      "groups": {
        "single": "<string>",
        "pair": {
          "baseline": "<string>",
          "compared": "<string>"
        },
        "multiple": {
          "groups": [
            "<string>"
          ]
        }
      },
      "shipmentRecommendation": {}
    }
  ],
  "annotations": [
    {
      "context": [
        {
          "key": {},
          "value": "<string>"
        }
      ],
      "info": "<string>",
      "warning": "<string>",
      "error": {
        "details": "<string>",
        "category": {}
      }
    }
  ],
  "statsCacheEntry": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
plan
AnalysisPlan · object
required

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.

data
AnalysisData · object
required

AnalysisData: The data for each hypothesis.

Response

200 - application/json

OK

hypotheses
object[]

The analysis results for each hypothesis.

recommendations
object[]

Overall recommendations for each comparison according to specified decision rule.

annotations
object[]

List of issues discovered during the analysis.

statsCacheEntry
string

Cache entry used, empty if not cached.