{"uid":"cap_rxlfm7oQo6mb3dErIWRa9","slug":"outlier-detection-iqr-z-score-94cc5ae5","name":"Outlier Detection (IQR & Z-Score)","description":"Flag outliers in a numeric series using either the IQR rule (Tukey fences at 1.5·IQR - robust, default) or z-score (|z| > threshold - assumes normality). Returns the outlier values + their indices + the thresholds used so you can decide whether to trust them.","url":"https://agent402.tools/api/outliers","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"method":{"type":"string","description":"\"iqr\" (default) or \"zscore\""},"values":{"type":"array","description":"Numeric series (max 10000, at least 4 values)"},"threshold":{"type":"number","description":"IQR multiplier (default 1.5) or z-score cutoff (default 3)"}}},"responseSchema":{"type":"json","example":{"n":10,"method":"iqr","outliers":[{"index":9,"value":100}],"threshold":1.5,"lowerBound":-4.625,"upperBound":14.375,"outlierCount":1}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_SNFMdeehimovPuoitSy51","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Flags outliers in a numeric series using IQR (Tukey fences) or z-score method, returning outlier values, their indices, and the thresholds applied.","exampleAgentPrompt":"Flag any outliers in this list of daily temperatures using the IQR method with a 1.5 multiplier: [72, 74, 71, 300, 73, 70, 68, 72, 999, 74, 71].","exampleUseCases":null,"resultDescription":"Returns the outlier values, their zero-based indices in the input array, and the computed fence or threshold values (e.g., lower/upper Tukey fences for IQR, or z-score cutoff) so the caller can understand why each point was flagged.","failureModes":["Fewer than 4 values provided — returns validation error","Array exceeds 10,000 elements — returns size limit error","Non-numeric values in array — returns type error","Invalid method string (not 'iqr' or 'zscore') — returns parameter error","Empty array — returns validation error"],"whenToPreferThis":"Choose this endpoint when you need a quick, stateless outlier check on a numeric series without setting up a local stats library. Prefer IQR mode for skewed or non-Gaussian data; prefer zscore mode when the data is approximately normal. Ideal for data cleaning pipelines, anomaly alerting, or pre-processing steps inside an AI agent workflow.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T19:14:06.936Z","isFirstParty":false}