Statistics Utilities

Calculate Zscore

Calculates z-score (standard score) to measure how many standard deviations a value is from the mean. Access via MCP in Cursor or Windsurf, or REST API at `/v1/stats/z-score`. Input a value, mean, and standard deviation to get the normalized score. Essential for statistical analysis and outlier detection in AI data processing workflows.

API Endpoint

GET /v1/stats/z-score

Code Examples

curl "https://tinyfn.io/v1/stats/z-score" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/stats/z-score', {
  headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests

response = requests.get('https://tinyfn.io/v1/stats/z-score',
    headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)

Use via MCP

Add to your AI agent

Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's statistics tools:

{
  "mcpServers": {
    "tinyfn-stats": {
      "url": "https://tinyfn.io/mcp/stats",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

How do I calculate z-score with TinyFn?

Pass the value, mean, and standard deviation to the z-score tool. It returns (value - mean) / standard_deviation as the standardized score.

What does a z-score of -2.5 mean?

The value is 2.5 standard deviations below the mean. Values beyond ±2 are typically considered outliers in normal distributions.

Can I use z-score calculation in MCP agents for data analysis?

Yes, MCP agents in Cursor or Claude Code can call this tool to standardize datasets, identify outliers, or compare values across different scales.

What happens if standard deviation is zero?

The calculation returns undefined or infinity since you cannot divide by zero. All values in the dataset would be identical.

How is z-score different from percentiles?

Z-score measures distance from mean in standard deviations, while percentiles show relative ranking. Z-score assumes normal distribution, percentiles work with any distribution.

Try Calculate Zscore Now

Get your free API key and start using Calculate Zscore in seconds.

Get Free API Key