{
  "openapi": "3.0.1",
  "info": {
    "title": "Statistics Calculator: A/B Test, t-Test, ANOVA, Regression",
    "description": "A/B test significance, t-tests, ANOVA, chi-square, correlation, linear and logistic regression, sample size and more, with plain-language results, effect sizes, assumption checks and charts. From numbers, CSV, Excel, Google Sheets or an Apify dataset. Checked against R. For AI agents.",
    "version": "0.1",
    "x-build-id": "MAdGYtHrcW3EqJqGf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jumblemog~statistics-calculator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jumblemog-statistics-calculator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/jumblemog~statistics-calculator/runs": {
      "post": {
        "operationId": "runs-sync-jumblemog-statistics-calculator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/jumblemog~statistics-calculator/run-sync": {
      "post": {
        "operationId": "run-sync-jumblemog-statistics-calculator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "analysis": {
            "title": "Analysis",
            "enum": [
              "auto",
              "abTest",
              "compareGroups",
              "paired",
              "oneSample",
              "correlation",
              "regression",
              "crosstab",
              "describe",
              "normality",
              "outliers",
              "sampleSize"
            ],
            "type": "string",
            "description": "What to run. Auto picks from the data: variants give an A/B test, groups a group comparison, a table of counts a chi-square test, values descriptive statistics (a one-sample test with Test value), and baselineRate alone a sample size. For rows, the columns named decide: predictors give a regression, Group column a group comparison (an A/B test for a yes/no outcome), Row and Column fields a crosstab, two or more columns a correlation.",
            "default": "auto"
          },
          "analyses": {
            "title": "Several analyses on the same data",
            "type": "array",
            "description": "Runs each of these on the same data, such as describe, normality and correlation. Each analysis is one charge.",
            "items": {
              "type": "string",
              "enum": [
                "abTest",
                "compareGroups",
                "paired",
                "oneSample",
                "correlation",
                "regression",
                "crosstab",
                "describe",
                "normality",
                "outliers",
                "sampleSize"
              ],
              "enumTitles": [
                "A/B test (conversion rates, z-test or Fisher, Bayesian)",
                "Compare groups (t-test, ANOVA, Mann-Whitney, Kruskal-Wallis)",
                "Paired or before/after (paired t-test, Wilcoxon, repeated measures)",
                "One sample vs a target (one-sample t-test, binomial test)",
                "Correlation (Pearson, Spearman, Kendall, matrix)",
                "Regression (linear or logistic)",
                "Crosstab (chi-square, Fisher's exact, goodness of fit)",
                "Descriptive statistics",
                "Normality test (Shapiro-Wilk, D'Agostino)",
                "Outliers (IQR, z-score, modified z, Grubbs)",
                "Sample size and power (A/B test planning)"
              ]
            }
          },
          "tasks": {
            "title": "Tasks (JSON)",
            "type": "array",
            "description": "Many analyses in one run, each an object with its analysis, data and settings: [{\"analysis\": \"abTest\", \"variants\": [...]}, {\"analysis\": \"t-test\", \"groups\": {...}}]. Settings outside tasks apply to every task, and a task with its own data doesn't use the shared data. Common names such as t-test, anova, mann-whitney, chi-square, pearson, logistic or power work too. Up to 500 tasks, one charge each."
          },
          "variants": {
            "title": "A/B test counts",
            "type": "array",
            "description": "Visitors and conversions per variant, control first: [{\"name\": \"A\", \"visitors\": 4800, \"conversions\": 192}, ...]. Users, sessions, trials or n work for visitors; successes, orders, clicks or signups for conversions; a rate works too. One entry with Test value runs a one-sample test of the rate."
          },
          "groups": {
            "title": "Groups of numbers",
            "type": "object",
            "description": "Each group's values: {\"Control\": [12.1, 9.8, 11.4, ...], \"Treatment\": [14.2, 13.1, ...]}. Two groups give a t-test (or Mann-Whitney U), three or more an ANOVA (or Kruskal-Wallis) with pairwise comparisons. For a paired analysis, equal-length lists are matched by position."
          },
          "values": {
            "title": "Values (one list)",
            "type": "array",
            "description": "One list of numbers, such as [31, 28, 35, 30, 41]: descriptive statistics, a one-sample test against Test value, a normality test or outliers."
          },
          "table": {
            "title": "Table of counts",
            "type": "array",
            "description": "Counts for a chi-square or Fisher's exact test, rows with a header: [[\"\", \"Bought\", \"Didn't buy\"], [\"Women\", 30, 10], [\"Men\", 20, 25]], or plain [[30, 10], [20, 25]]. One list of counts such as [18, 22, 30, 30] tests goodness of fit against an even split (or Expected split)."
          },
          "data": {
            "title": "Data rows (JSON)",
            "type": "array",
            "description": "Rows as objects, such as [{\"variant\": \"A\", \"revenue\": 12.5}, ...], or the items of any API. Name the columns below, or leave them empty to have them found."
          },
          "csv": {
            "title": "CSV data",
            "type": "string",
            "description": "CSV or TSV text with a header row, such as group,score on the first line and A,12.5 on the next. Comma, semicolon, tab and pipe separators work."
          },
          "dataUrl": {
            "title": "Data file link",
            "type": "string",
            "description": "A link to a CSV, TSV, JSON or Excel (.xlsx) file. Google Sheets share links (shared as \"Anyone with the link\"), GitHub file links and JSON API answers work. The site's robots.txt is respected."
          },
          "datasetId": {
            "title": "Apify dataset",
            "type": "string",
            "description": "Analyze the items of a dataset in your account, such as a scraper's results (prices, ratings, review counts). Up to 500,000 items; the tool gets read access to this dataset only."
          },
          "outcome": {
            "title": "Outcome column",
            "type": "string",
            "description": "The measured or predicted column, such as revenue, score or converted. With Group column, a yes/no outcome gives an A/B test and numbers a group comparison; with predictors, a regression."
          },
          "groupField": {
            "title": "Group column",
            "type": "string",
            "description": "The column that splits the rows into groups, such as variant, group, treatment or country."
          },
          "predictors": {
            "title": "Predictor columns",
            "type": "array",
            "description": "Columns that predict the outcome in a regression. Number columns are used as they are; text columns become categories compared with their most common level (or Reference level).",
            "items": {
              "type": "string"
            }
          },
          "columns": {
            "title": "Columns to analyze",
            "type": "array",
            "description": "Number columns: two for a correlation (three or more for a correlation matrix), any for descriptive statistics, normality or outliers, or one column per group (wide data) for a group comparison or a paired test. Empty: all number columns.",
            "items": {
              "type": "string"
            }
          },
          "subjectField": {
            "title": "Subject column (paired data)",
            "type": "string",
            "description": "For paired data in long form: the column that identifies each subject (person, store, page) measured once in each condition of Group column."
          },
          "rowField": {
            "title": "Crosstab row column",
            "type": "string",
            "description": "The first category column of a crosstab, such as gender."
          },
          "columnField": {
            "title": "Crosstab column column",
            "type": "string",
            "description": "The second category column of a crosstab, such as purchased."
          },
          "countField": {
            "title": "Count column",
            "type": "string",
            "description": "For rows that are already counted (one row per combination): the column with the counts."
          },
          "categoricalColumns": {
            "title": "Number columns to treat as categories",
            "type": "array",
            "description": "Regression predictors that hold numbers but are categories, such as a cylinder count, a year or a store number.",
            "items": {
              "type": "string"
            }
          },
          "labelField": {
            "title": "Label column",
            "type": "string",
            "description": "A column that names each row (product, name, ID), shown with each outlier."
          },
          "confidenceLevel": {
            "title": "Confidence level (%)",
            "minimum": 50,
            "maximum": 99.99,
            "type": "number",
            "description": "The level of confidence intervals and the significance threshold: 95 means a p-value below 0.05 is significant.",
            "default": 95
          },
          "alpha": {
            "title": "Significance level (alpha)",
            "minimum": 0.0001,
            "maximum": 0.5,
            "type": "number",
            "description": "Instead of a confidence level: the p-value threshold, such as 0.05 or 0.01."
          },
          "alternative": {
            "title": "Hypothesis",
            "enum": [
              "two-sided",
              "greater",
              "less"
            ],
            "type": "string",
            "description": "Two-sided looks for a difference either way. Greater and less test one direction: the variant, the second group or condition, or the data above (or below) the control, the first group or the test value; for correlations, a positive (or negative) correlation.",
            "default": "two-sided"
          },
          "method": {
            "title": "Test family",
            "enum": [
              "auto",
              "parametric",
              "nonparametric"
            ],
            "type": "string",
            "description": "Auto uses t-tests and ANOVA unless a group with fewer than 30 values fails a normality test, then the rank-based test. Both results are always reported.",
            "default": "auto"
          },
          "equalVariances": {
            "title": "Assume equal variances",
            "type": "boolean",
            "description": "Off (recommended): Welch's t-test and Welch's ANOVA, which don't assume equal spreads. On: Student's t-test and the classic ANOVA with Tukey's HSD.",
            "default": false
          },
          "correction": {
            "title": "Multiple-comparison correction",
            "enum": [
              "holm",
              "bonferroni",
              "fdr_bh",
              "none"
            ],
            "type": "string",
            "description": "Adjusts p-values when several variants, group pairs or correlations are tested at once.",
            "default": "holm"
          },
          "control": {
            "title": "Control group",
            "type": "string",
            "description": "The name of the control or baseline variant or group. Empty: one named control, baseline, original, A..., or else the first."
          },
          "testValue": {
            "title": "Test value",
            "type": "number",
            "description": "For a one-sample test: the target or benchmark the data are tested against, such as 30 (minutes) or, for a rate, 5 or 0.05 (5%)."
          },
          "correlationMethod": {
            "title": "Correlation method",
            "enum": [
              "pearson",
              "spearman",
              "kendall"
            ],
            "type": "string",
            "description": "For correlations. All three are reported for a pair of columns.",
            "default": "pearson"
          },
          "regressionType": {
            "title": "Regression type",
            "enum": [
              "auto",
              "linear",
              "logistic"
            ],
            "type": "string",
            "description": "Linear regression for a number outcome, logistic regression for a yes/no outcome.",
            "default": "auto"
          },
          "robustErrors": {
            "title": "Robust standard errors",
            "enum": [
              "auto",
              "always",
              "never"
            ],
            "type": "string",
            "description": "Heteroscedasticity-robust (HC3) standard errors for linear regression. Auto switches them on when the Breusch-Pagan test finds the residuals' spread changing.",
            "default": "auto"
          },
          "reference": {
            "title": "Reference level",
            "type": "string",
            "description": "For category predictors: the level the others are compared with. Empty: each column's most common level."
          },
          "predict": {
            "title": "Predict for",
            "type": "array",
            "description": "New rows to predict with the fitted model, each with a value for every predictor: [{\"ad_spend\": 1200, \"region\": \"West\"}]. Linear models give the prediction with its confidence and prediction intervals; logistic models the probability with its interval."
          },
          "baselineRate": {
            "title": "Baseline conversion rate (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "The control's current conversion rate, such as 4 (or 0.04) for 4%. Values below 1 are read as a fraction, so write 0.5% as 0.005."
          },
          "minimumDetectableEffect": {
            "title": "Minimum detectable effect",
            "minimum": 0,
            "type": "number",
            "description": "The smallest lift worth detecting: a relative lift in % (10 means 4% to 4.4%), or with Effect type absolute, percentage points (or units for averages). Empty with Visitors per variant: the lift those visitors can detect."
          },
          "mdeType": {
            "title": "Effect type",
            "enum": [
              "relative",
              "absolute"
            ],
            "type": "string",
            "description": "How Minimum detectable effect is meant.",
            "default": "relative"
          },
          "power": {
            "title": "Power (%)",
            "minimum": 50,
            "maximum": 99.9,
            "type": "number",
            "description": "The chance of detecting the effect if it is real; 80 is usual, 90 for important tests.",
            "default": 80
          },
          "numberOfVariants": {
            "title": "Number of variants",
            "minimum": 2,
            "maximum": 20,
            "type": "integer",
            "description": "Variants in the test including the control; with more than two, each comparison is held to a Bonferroni-corrected significance level.",
            "default": 2
          },
          "dailyTraffic": {
            "title": "Visitors per day",
            "minimum": 0,
            "type": "number",
            "description": "Visitors entering the test per day, across all variants, to estimate how many days it takes."
          },
          "sampleSizePerVariant": {
            "title": "Visitors per variant",
            "minimum": 2,
            "type": "integer",
            "description": "Instead of a minimum detectable effect: the visitors you have per variant, to find the smallest lift they can detect."
          },
          "standardDeviation": {
            "title": "Standard deviation (averages)",
            "minimum": 0,
            "type": "number",
            "description": "For tests of averages (revenue per visitor, time on page): the metric's standard deviation, with Minimum detectable effect in the same units and Effect type absolute."
          },
          "effectSize": {
            "title": "Effect size (Cohen's d)",
            "minimum": 0,
            "type": "number",
            "description": "For tests of averages, instead of a standard deviation: the standardized difference to detect (0.2 small, 0.5 medium, 0.8 large)."
          },
          "expectedSplit": {
            "title": "Expected split",
            "type": "array",
            "description": "The planned traffic split for the sample ratio mismatch check, such as [50, 50] or [90, 10], in the order of the variants. For a goodness-of-fit test: the expected share of each category."
          },
          "outlierMethod": {
            "title": "Outlier rule",
            "enum": [
              "iqr",
              "zscore",
              "modifiedZ",
              "grubbs"
            ],
            "type": "string",
            "description": "How outliers are found.",
            "default": "iqr"
          },
          "outlierThreshold": {
            "title": "Outlier threshold",
            "minimum": 0,
            "type": "number",
            "description": "The rule's cut-off: the IQR multiple (default 1.5; 3 for extreme outliers), or the z-score or modified z-score (defaults 3 and 3.5)."
          },
          "chart": {
            "title": "Charts",
            "type": "boolean",
            "description": "Draws a chart for each analysis: rates with intervals, box plots, scatter plots with the fit, heatmaps, histograms, Q-Q plots or sample-size curves.",
            "default": true
          },
          "chartFormats": {
            "title": "Chart formats",
            "type": "array",
            "description": "PNG for chats, emails, docs and slides; SVG and PDF stay sharp at any size; HTML shows values on hover.",
            "items": {
              "type": "string",
              "enum": [
                "png",
                "svg",
                "pdf",
                "html"
              ],
              "enumTitles": [
                "PNG",
                "SVG",
                "PDF",
                "Interactive HTML (hover for values)"
              ]
            },
            "default": [
              "png"
            ]
          },
          "chartTheme": {
            "title": "Chart theme",
            "enum": [
              "light",
              "dark"
            ],
            "type": "string",
            "description": "Light or dark background.",
            "default": "light"
          },
          "title": {
            "title": "Title",
            "type": "string",
            "description": "A title for the result and its chart. Empty: one made from the analysis and the data."
          },
          "valueLabel": {
            "title": "Value name",
            "type": "string",
            "description": "What the numbers measure, for sentences and axis titles, such as order value or minutes."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}