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": {
      "allVsAll": {}
    },
    "hypotheses": [
      {
        "id": "<string>",
        "type": {},
        "segments": [
          {
            "params": {
              "zTest": {},
              "ratio": {},
              "tunncDesign": {
                "optimalSampleSize": 123,
                "weight": [
                  {}
                ]
              },
              "asympCs": {
                "optimalSampleSize": 123
              },
              "asympCsRatio": {
                "optimalSampleSize": 123
              }
            },
            "dimensions": [
              {}
            ]
          }
        ],
        "dataType": "DATA_TYPE_UNSPECIFIED"
      }
    ],
    "settings": {
      "disableSegmentAlphaAdjustment": true
    }
  },
  "data": {
    "hypotheses": [
      {
        "id": "<string>",
        "segments": [
          {
            "dimensions": [
              {}
            ],
            "groups": [
              {
                "group": "<string>",
                "data": {
                  "chi2": {},
                  "zTest": {},
                  "gstZTest": {},
                  "ratio": {},
                  "tunncDesign": {},
                  "gstRatio": {},
                  "asympCs": {},
                  "asympCsRatio": {}
                }
              }
            ],
            "labels": [
              {}
            ]
          }
        ]
      }
    ]
  }
}
'
{
  "hypotheses": [
    {
      "id": "<string>",
      "segments": [
        {
          "dimensions": [
            {}
          ],
          "comparisons": [
            {
              "groups": {
                "single": "<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": "DATA_TYPE_UNSPECIFIED",
              "groupStats": [
                {
                  "id": "<string>",
                  "sampleSize": 123
                }
              ]
            }
          ],
          "labels": [
            {}
          ]
        }
      ],
      "adjustedAlpha": 123,
      "adjustedBeta": 123
    }
  ],
  "recommendations": [
    {
      "groups": {
        "single": "<string>"
      },
      "shipmentRecommendation": "SHIPMENT_RECOMMENDATION_UNSPECIFIED"
    }
  ],
  "annotations": [
    {
      "context": [
        {
          "key": "CONTEXT_UNSPECIFIED",
          "value": "<string>"
        }
      ],
      "info": "<string>",
      "warning": "<string>",
      "error": {
        "details": "<string>",
        "category": "ERROR_CATEGORY_UNSPECIFIED"
      }
    }
  ],
  "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.