{"uid":"cap_nyOxdHESe_dLM3T5clgD1","slug":"openverbs-statistics-pearson-correlation-c1c8b4b5","name":"OpenVerbs Statistics – Pearson Correlation","description":"Pearson correlation coefficient and covariance of two equal-length paired series. Rejected as a clean 400 if the lengths differ or either series has zero variance (correlation undefined).","url":"https://stats.openverbs.com/v1/correlation","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["x","y"],"properties":{"x":{"type":"array","items":{"type":"number"},"maxItems":100000,"minItems":2,"description":"First series."},"y":{"type":"array","items":{"type":"number"},"maxItems":100000,"minItems":2,"description":"Second series (same length as x)."}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004","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.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_r3jKT-mUfS3IkN7A2leGj","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the statistical correlation between two numerical series (x and y arrays)","exampleAgentPrompt":"Calculate the correlation between these two numeric series for me: x = [1, 2, 3, 4, 5] and y = [2.1, 3.9, 6.2, 7.8, 10.1]","exampleUseCases":[{"title":"Sales vs. temperature correlation analysis","prompt":"I have monthly ice cream sales figures and average temperatures for the past 3 years — can you compute the correlation between those two series to see how closely they're linked?"},{"title":"Portfolio return co-movement check","prompt":"Here are the daily returns for two stocks over the last 6 months: [list A] and [list B]. What's the correlation between them? I want to know if they tend to move together."},{"title":"Sensor data relationship validation","prompt":"We have two sensor readings collected simultaneously over 1000 time steps. Can you compute the statistical correlation between sensor A's readings and sensor B's readings to see if they're measuring related phenomena?"}],"resultDescription":"A numeric correlation coefficient (typically Pearson's r) representing the strength and direction of the linear relationship between the two input series, ranging from -1 (perfect negative correlation) to +1 (perfect positive correlation), with 0 indicating no linear relationship.","failureModes":["Arrays x and y are different lengths — endpoint requires equal-length arrays","Array has fewer than 2 elements (minItems: 2) — returns validation error","Array exceeds 100,000 items (maxItems: 100,000) — payload rejected","Non-numeric values in either array — schema validation failure","Network or payment (x402) failure resulting in no response"],"whenToPreferThis":"Choose this endpoint when you need a fast, pay-per-call statistical correlation computation without standing up your own math infrastructure. It is ideal for agents that occasionally need to measure linear relationships between two numeric datasets (up to 100,000 points each) without requiring a full data science library or backend. Prefer alternatives if you need batch processing of many pairs simultaneously, non-linear correlation measures (e.g. Spearman), or if you are already running a Python/R environment where scipy or similar is trivially available.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:30:22.634Z","isFirstParty":false}