{
  "x402Version": 2,
  "id": 72415,
  "slug": "saylorinnovations-api-stats-outliers",
  "resource": "https://saylorinnovations.com/api/stats/outliers",
  "description": "Find outliers in a list of numbers with IQR fences or z-scores - quartiles, fences, flagged values with index and side, and the mean without them",
  "type": "http",
  "serviceName": "Saylor Innovations Data Desk",
  "mimeType": "application/json",
  "resourceType": "API",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0xA2A8dF0f7CaaBEa4e120a2568118f141569fc8aa",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "10000",
      "amountUsd": 0.01,
      "maxTimeoutSeconds": 120
    },
    {
      "scheme": "exact",
      "network": "eip155:137",
      "payTo": "0xA2A8dF0f7CaaBEa4e120a2568118f141569fc8aa",
      "asset": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
      "amount": "10000",
      "amountUsd": 0.01,
      "maxTimeoutSeconds": 120
    },
    {
      "scheme": "exact",
      "network": "eip155:42161",
      "payTo": "0xA2A8dF0f7CaaBEa4e120a2568118f141569fc8aa",
      "asset": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
      "amount": "10000",
      "amountUsd": 0.01,
      "maxTimeoutSeconds": 120
    },
    {
      "scheme": "exact",
      "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
      "payTo": "7LSjfrJf8fNsB8VA9u7N3WEn25smQLpob3SvyUvXacy7",
      "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      "amount": "10000",
      "amountUsd": 0.01,
      "maxTimeoutSeconds": 120
    },
    {
      "scheme": "exact",
      "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
      "payTo": "7LSjfrJf8fNsB8VA9u7N3WEn25smQLpob3SvyUvXacy7",
      "asset": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
      "amount": "10000",
      "amountUsd": 0.01,
      "maxTimeoutSeconds": 120
    },
    {
      "scheme": "exact",
      "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
      "payTo": "7LSjfrJf8fNsB8VA9u7N3WEn25smQLpob3SvyUvXacy7",
      "asset": "So11111111111111111111111111111111111111112",
      "amount": "95830",
      "amountUsd": 0.01,
      "maxTimeoutSeconds": 120
    }
  ],
  "outputSchema": {
    "type": "object",
    "properties": {
      "method": {
        "type": "string",
        "description": "Method used"
      },
      "n": {
        "type": "number",
        "description": "Number of values"
      },
      "mean": {
        "type": "number",
        "description": "Mean of all values"
      },
      "median": {
        "type": "number",
        "description": "Median of all values"
      },
      "q1": {
        "type": "number",
        "description": "First quartile"
      },
      "q3": {
        "type": "number",
        "description": "Third quartile"
      },
      "lower_fence": {
        "type": "number",
        "description": "Lower fence"
      },
      "upper_fence": {
        "type": "number",
        "description": "Upper fence"
      },
      "outlier_count": {
        "type": "number",
        "description": "Number of outlier"
      },
      "outliers": {
        "type": "array",
        "description": "Flagged values with index, value, z-score and which side",
        "items": {
          "type": "object",
          "properties": {
            "side": {
              "description": "low or high relative to the fences",
              "type": [
                "string",
                "null"
              ]
            },
            "index": {
              "description": "Index value"
            },
            "value": {
              "description": "Value of the requested item"
            },
            "z_score": {
              "description": "Z score"
            }
          }
        }
      },
      "mean_without_outliers": {
        "type": [
          "number",
          "null"
        ],
        "description": "Mean without outliers"
      },
      "source": {
        "type": "string",
        "description": "Data source the values come from"
      },
      "k": {
        "description": "Multiplier used for the fences or threshold",
        "type": [
          "number",
          "null"
        ]
      },
      "iqr": {
        "description": "Interquartile range",
        "type": [
          "number",
          "null"
        ]
      },
      "std_dev": {
        "type": [
          "number",
          "null"
        ],
        "description": "Std dev"
      }
    },
    "required": [
      "method",
      "outlier_count",
      "outliers"
    ]
  },
  "extensions": {
    "bazaar": {
      "info": {
        "input": {
          "type": "http",
          "method": "GET",
          "queryParams": {
            "method": "iqr",
            "values": "10,12,11,13,12,95,11,10"
          }
        },
        "output": {
          "type": "json",
          "example": {
            "method": "iqr",
            "k": 1.5,
            "n": 8,
            "mean": 21.75,
            "std_dev": 29.61539175,
            "median": 11.5,
            "q1": 10.75,
            "q3": 12.25,
            "iqr": 1.5,
            "lower_fence": 8.5,
            "upper_fence": 14.5,
            "outlier_count": 1,
            "outliers": [
              {
                "index": 5,
                "value": 95,
                "z_score": 2.473,
                "side": "high"
              }
            ],
            "mean_without_outliers": 11.28571429,
            "source": "Tukey fences or z-score threshold on the supplied values (quartiles by linear interpolation)"
          }
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "input": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "http"
              },
              "method": {
                "type": "string",
                "enum": [
                  "GET"
                ]
              },
              "queryParams": {
                "type": "object",
                "properties": {
                  "method": {
                    "type": "string",
                    "description": "optional iqr (default) or zscore"
                  },
                  "values": {
                    "type": "string",
                    "description": "Comma-separated numbers, 4-1000"
                  }
                },
                "required": [
                  "values"
                ]
              }
            },
            "required": [
              "type",
              "method"
            ],
            "additionalProperties": false
          },
          "output": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "json"
              },
              "example": {
                "type": "object",
                "properties": {
                  "method": {
                    "type": "string",
                    "description": "Method used"
                  },
                  "n": {
                    "type": "number",
                    "description": "Number of values"
                  },
                  "mean": {
                    "type": "number",
                    "description": "Mean of all values"
                  },
                  "median": {
                    "type": "number",
                    "description": "Median of all values"
                  },
                  "q1": {
                    "type": "number",
                    "description": "First quartile"
                  },
                  "q3": {
                    "type": "number",
                    "description": "Third quartile"
                  },
                  "lower_fence": {
                    "type": "number",
                    "description": "Lower fence"
                  },
                  "upper_fence": {
                    "type": "number",
                    "description": "Upper fence"
                  },
                  "outlier_count": {
                    "type": "number",
                    "description": "Number of outlier"
                  },
                  "outliers": {
                    "type": "array",
                    "description": "Flagged values with index, value, z-score and which side",
                    "items": {
                      "type": "object",
                      "properties": {
                        "side": {
                          "description": "low or high relative to the fences",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "index": {
                          "description": "Index value"
                        },
                        "value": {
                          "description": "Value of the requested item"
                        },
                        "z_score": {
                          "description": "Z score"
                        }
                      }
                    }
                  },
                  "mean_without_outliers": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "Mean without outliers"
                  },
                  "source": {
                    "type": "string",
                    "description": "Data source the values come from"
                  },
                  "k": {
                    "description": "Multiplier used for the fences or threshold",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "iqr": {
                    "description": "Interquartile range",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "std_dev": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "Std dev"
                  }
                },
                "required": [
                  "method",
                  "outlier_count",
                  "outliers"
                ]
              }
            },
            "required": [
              "type"
            ]
          }
        },
        "required": [
          "input"
        ]
      }
    }
  },
  "tags": [
    "find outliers in a list",
    "iqr outlier fences",
    "z score outlier detection",
    "which values are anomalies",
    "clean data by removing outliers"
  ],
  "sourceHost": "saylorinnovations.com",
  "lastUpdated": "2026-10-26T22:14:01.943Z",
  "quality": {},
  "metadata": {
    "serviceName": "Saylor Innovations Data Desk",
    "method": "GET",
    "mimeType": "application/json",
    "inputSchema": {
      "type": "object",
      "properties": {
        "method": {
          "type": "string",
          "description": "optional iqr (default) or zscore"
        },
        "values": {
          "type": "string",
          "description": "Comma-separated numbers, 4-1000"
        }
      },
      "required": [
        "values"
      ]
    },
    "exampleResponse": {
      "method": "iqr",
      "k": 1.5,
      "n": 8,
      "mean": 21.75,
      "std_dev": 29.61539175,
      "median": 11.5,
      "q1": 10.75,
      "q3": 12.25,
      "iqr": 1.5,
      "lower_fence": 8.5,
      "upper_fence": 14.5,
      "outlier_count": 1,
      "outliers": [
        {
          "index": 5,
          "value": 95,
          "z_score": 2.473,
          "side": "high"
        }
      ],
      "mean_without_outliers": 11.28571429,
      "source": "Tukey fences or z-score threshold on the supplied values (quartiles by linear interpolation)"
    },
    "parameterLocation": "query",
    "extensions": {
      "bazaar": {
        "info": {
          "input": {
            "type": "http",
            "method": "GET",
            "queryParams": {
              "method": "iqr",
              "values": "10,12,11,13,12,95,11,10"
            }
          },
          "output": {
            "type": "json",
            "example": {
              "method": "iqr",
              "k": 1.5,
              "n": 8,
              "mean": 21.75,
              "std_dev": 29.61539175,
              "median": 11.5,
              "q1": 10.75,
              "q3": 12.25,
              "iqr": 1.5,
              "lower_fence": 8.5,
              "upper_fence": 14.5,
              "outlier_count": 1,
              "outliers": [
                {
                  "index": 5,
                  "value": 95,
                  "z_score": 2.473,
                  "side": "high"
                }
              ],
              "mean_without_outliers": 11.28571429,
              "source": "Tukey fences or z-score threshold on the supplied values (quartiles by linear interpolation)"
            }
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "type": "object",
          "properties": {
            "input": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "http"
                },
                "method": {
                  "type": "string",
                  "enum": [
                    "GET"
                  ]
                },
                "queryParams": {
                  "type": "object",
                  "properties": {
                    "method": {
                      "type": "string",
                      "description": "optional iqr (default) or zscore"
                    },
                    "values": {
                      "type": "string",
                      "description": "Comma-separated numbers, 4-1000"
                    }
                  },
                  "required": [
                    "values"
                  ]
                }
              },
              "required": [
                "type",
                "method"
              ],
              "additionalProperties": false
            },
            "output": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "json"
                },
                "example": {
                  "type": "object",
                  "properties": {
                    "method": {
                      "type": "string",
                      "description": "Method used"
                    },
                    "n": {
                      "type": "number",
                      "description": "Number of values"
                    },
                    "mean": {
                      "type": "number",
                      "description": "Mean of all values"
                    },
                    "median": {
                      "type": "number",
                      "description": "Median of all values"
                    },
                    "q1": {
                      "type": "number",
                      "description": "First quartile"
                    },
                    "q3": {
                      "type": "number",
                      "description": "Third quartile"
                    },
                    "lower_fence": {
                      "type": "number",
                      "description": "Lower fence"
                    },
                    "upper_fence": {
                      "type": "number",
                      "description": "Upper fence"
                    },
                    "outlier_count": {
                      "type": "number",
                      "description": "Number of outlier"
                    },
                    "outliers": {
                      "type": "array",
                      "description": "Flagged values with index, value, z-score and which side",
                      "items": {
                        "type": "object",
                        "properties": {
                          "side": {
                            "description": "low or high relative to the fences",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "index": {
                            "description": "Index value"
                          },
                          "value": {
                            "description": "Value of the requested item"
                          },
                          "z_score": {
                            "description": "Z score"
                          }
                        }
                      }
                    },
                    "mean_without_outliers": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Mean without outliers"
                    },
                    "source": {
                      "type": "string",
                      "description": "Data source the values come from"
                    },
                    "k": {
                      "description": "Multiplier used for the fences or threshold",
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "iqr": {
                      "description": "Interquartile range",
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "std_dev": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Std dev"
                    }
                  },
                  "required": [
                    "method",
                    "outlier_count",
                    "outliers"
                  ]
                }
              },
              "required": [
                "type"
              ]
            }
          },
          "required": [
            "input"
          ]
        }
      }
    },
    "examples": [
      {
        "label": "Unpaid discovery call",
        "method": "GET",
        "url": "https://saylorinnovations.com/api/stats/outliers?values=10,12,11,13,12,95,11,10&method=iqr",
        "expectedStatus": 402
      }
    ],
    "cacheTtlSeconds": 0,
    "capabilities": [],
    "noAccountRequired": true,
    "noApiKeyRequired": true,
    "sideEffects": "Paid calls settle the advertised payment; see the provider contract for execution behavior.",
    "payment": {
      "protocol": "x402",
      "settlement": "direct-to-provider"
    },
    "provider": {
      "name": "Saylor Innovations",
      "host": "saylorinnovations.com",
      "manifestUrl": "https://saylorinnovations.com/.well-known/x402.json"
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": true,
  "featured": false,
  "provider": {
    "host": "saylorinnovations.com",
    "manifest_name": "Saylor Innovations Knowledge Base",
    "source": "submitted",
    "source_manifest_url": "https://saylorinnovations.com/.well-known/x402.json",
    "submitted_at": "2026-10-26T05:52:02.113Z"
  },
  "exampleResponse": {
    "method": "string",
    "n": 0,
    "mean": 0,
    "median": 0,
    "q1": 0,
    "q3": 0,
    "lower_fence": 0,
    "upper_fence": 0,
    "outlier_count": 0,
    "outliers": [
      {
        "side": "string",
        "index": null,
        "value": null,
        "z_score": null
      }
    ],
    "mean_without_outliers": 0,
    "source": "string",
    "k": 0,
    "iqr": 0,
    "std_dev": 0
  }
}