{"slug":"stats-openverbs-com-v1-regression-dba7f6","title":"Ordinary-least-squares linear regression of y on x","host":"stats.openverbs.com","method":"POST","resource":"https://stats.openverbs.com/v1/regression","category":"other","description":"Ordinary-least-squares linear regression of y on x: slope, intercept, correlation r and coefficient of determination r². Pass predictAt to also evaluate the fitted line at a given x. Rejected as a clean 400 if lengths differ or x has zero variance.","price_listed":0.004,"price_asked":0.004,"state":"answering","state_label":"Answering","checks_7d":1,"answered_7d":1,"latency_ms_median":446,"reported_calls_30d":3,"reported_payers_30d":1,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"predictAt":1,"x":[1,1],"y":[1,1]},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"additionalProperties":false,"properties":{"predictAt":{"description":"Optional x at which to evaluate the fitted line.","type":"number"},"x":{"description":"Independent variable.","items":{"type":"number"},"maxItems":100000,"minItems":2,"type":"array"},"y":{"description":"Dependent variable (same length as x).","items":{"type":"number"},"maxItems":100000,"minItems":2,"type":"array"}},"required":["x","y"],"type":"object"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-09-24","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.004,"price_match":true,"latency_ms":446,"error":null}],"description_full":"Ordinary-least-squares linear regression of y on x: slope, intercept, correlation r and coefficient of determination r². Pass predictAt to also evaluate the fitted line at a given x. Rejected as a clean 400 if lengths differ or x has zero variance.","last_updated":"2026-09-06T08:11:50.7Z","schemes":["exact"]}