# Saylor Innovations Data Desk – Linear Regression

> Saylor Innovations Data Desk – Linear Regression is a paid API for AI agents from saylorinnovations.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-27).

Performs simple linear regression on two numeric lists, returning slope, intercept, R², p-value, standard errors, 95% confidence interval, fitted equation, and an optional prediction for a new x value

## Facts

- Endpoint: GET https://saylorinnovations.com/api/stats/regression?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-27
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/saylor-innovations-data-desk-linear-regression-cd4362d3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lYTVLkvZFIN1ZsVkYl9w2

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability saylor-innovations-data-desk-linear-regression-cd4362d3
```

Example prompt: Run a linear regression on these x values [1,2,3,4,5,6,7,8,9,10] and y values [2.1,4.0,5.9,8.2,9.8,12.1,14.0,15.9,18.1,20.0], and also predict y when x is 12.

## When to prefer this

Choose this endpoint when you need a complete, single-call simple linear regression with statistical significance testing (p-value, confidence interval) and optional point prediction, especially within an agent workflow where you want a structured JSON response plus a plain-language interpretation rather than running a stats library locally.

## Known failure modes

- Mismatched x and y list lengths returns a 4xx validation error
- Fewer than 3 data points triggers a minimum-count error
- Non-numeric values in the comma-separated strings cause a parsing/validation error
- Perfect collinearity or zero variance in x may produce infinite or null standard errors
- predict_x outside data range returns a valid prediction but with extrapolated=true flag

## How this service works

Linear regression on two lists - slope, intercept, r, r-squared, standard errors, p-value, 95% slope interval, equation and a prediction for a new x

## Output

Returns a JSON object with: number of data points (n), slope, intercept, Pearson r, R-squared, slope standard error, slope t-statistic, slope p-value, 95% confidence interval for the slope as a two-element array, the fitted line as a human-readable equation string, a plain-language interpretation, and (if predict_x was supplied) a prediction object containing the input x, predicted y, and a boolean indicating whether the prediction extrapolates beyond the observed data range.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "x",
      "y"
     ],
     "properties": {
      "x": {
       "type": "string",
       "description": "Comma-separated x values, 3-500"
      },
      "y": {
       "type": "string",
       "description": "Comma-separated y values, same count as x"
      },
      "predict_x": {
       "type": "string",
       "description": "optional x to predict y for"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {
     "type": "object",
     "required": [
      "n",
      "slope",
      "intercept",
      "r_squared"
     ],
     "properties": {
      "n": {
       "type": "number",
       "description": "Number of points"
      },
      "r": {
       "type": "number",
       "description": "Pearson correlation coefficient"
      },
      "slope": {
       "type": "number",
       "description": "Change in y per unit of x"
      },
      "source": {
       "type": "string",
       "description": "Data source the values come from"
      },
      "slope_t": {
       "type": [
        "number",
        "null"
       ],
       "description": "Slope t"
      },
      "equation": {
       "type": "string",
       "description": "Fitted line as text"
      },
      "intercept": {
       "type": "number",
       "description": "Value of y when x is 0"
      },
      "r_squared": {
       "type": "number",
       "description": "R squared"
      },
      "prediction": {
       "type": [
        "object",
        "null"
       ],
       "properties": {
        "x": {
         "type": [
          "number",
          "null"
         ],
         "description": "The x that was predicted for"
        },
        "y": {
         "type": [
          "number",
          "null"
         ],
         "description": "Predicted y"
        },
        "extrapolated": {
         "type": [
          "boolean",
          "null"
         ],
         "description": "True when x is 
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/saylor-innovations-data-desk-linear-regression-cd4362d3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from saylorinnovations.com](https://www.zero.xyz/host/saylorinnovations.com/llms.txt)
