{
  "id": "normal-distribution",
  "version": "8d1f09c775da",
  "status": "published",
  "name": "Normal Distribution Calculator",
  "question": "What is the normal distribution area?",
  "summary": "Computes the probability that a normal random variable falls between two bounds, below one, or above one, with the tails outside and the z-scores.",
  "category": "statistics",
  "subcategory": "distributions",
  "url": "https://www.acalculator.org/statistics/normal-distribution-calculator",
  "markdown": "https://www.acalculator.org/statistics/normal-distribution-calculator.md",
  "kind": "function",
  "method": "z = (x − μ) ÷ σ; P(a < X < b) = Φ(z(b)) − Φ(z(a)), where Φ is the standard normal cumulative distribution function; an empty bound is −∞ or +∞.",
  "assumptions": [
    "X follows a normal distribution with the mean and standard deviation you enter.",
    "Each area is worked out from the tail it lies in, not by subtracting from 1, so tiny probabilities keep their precision."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "mean": {
        "title": "Mean (μ)",
        "description": "The mean of the normal distribution.",
        "type": "number",
        "minimum": -1000000000000,
        "maximum": 1000000000000
      },
      "sd": {
        "title": "Standard deviation (σ)",
        "description": "The standard deviation of the normal distribution, at least 0.000000000001.",
        "type": "number",
        "minimum": 1e-12,
        "maximum": 1000000000000
      },
      "a": {
        "title": "Lower bound (a)",
        "description": "The low end of the range. Leave empty for no lower end: P(X < b).",
        "type": "number",
        "minimum": -1000000000000000,
        "maximum": 1000000000000000
      },
      "b": {
        "title": "Upper bound (b)",
        "description": "The high end of the range. Leave empty for no upper end: P(X > a).",
        "type": "number",
        "minimum": -1000000000000000,
        "maximum": 1000000000000000
      }
    }
  },
  "outputs": {
    "probability": {
      "label": "P(a < X < b)",
      "description": "The probability that X falls between the bounds; an empty bound is open (minus or plus infinity).",
      "format": "number"
    },
    "outside": {
      "label": "Outside the bounds",
      "description": "The probability that X falls below a or above b: 1 − P(a < X < b).",
      "format": "number"
    },
    "belowLower": {
      "label": "P(X < a)",
      "description": "The probability below the lower bound. Shown when there is a lower bound.",
      "format": "number"
    },
    "aboveUpper": {
      "label": "P(X > b)",
      "description": "The probability above the upper bound. Shown when there is an upper bound.",
      "format": "number"
    },
    "zLower": {
      "label": "z-score of a",
      "description": "How many standard deviations the lower bound is from the mean: (a − μ) ÷ σ.",
      "format": "number"
    },
    "zUpper": {
      "label": "z-score of b",
      "description": "How many standard deviations the upper bound is from the mean: (b − μ) ÷ σ.",
      "format": "number"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "mean": 0,
      "sd": 1,
      "a": -1,
      "b": 1
    },
    "outputs": {
      "probability": 0.6826894921370861,
      "outside": 0.3173105078629138,
      "belowLower": 0.1586552539314569,
      "aboveUpper": 0.1586552539314569,
      "zLower": -1,
      "zUpper": 1
    },
    "text": "For a normal distribution with mean 0 and standard deviation 1, P(a < X < b) = 0.682689."
  },
  "examples": [
    {
      "given": {
        "mean": 0,
        "sd": 1,
        "a": -1,
        "b": 1
      },
      "expect": {
        "probability": 0.6826894921370859,
        "outside": 0.31731050786291415,
        "belowLower": 0.15865525393145707
      },
      "source": "hand calculation in content.mdx: erf(1 ÷ √2) = 0.682689; NIST/SEMATECH e-Handbook of Statistical Methods, §1.3.6.6.1 Normal Distribution. https://www.itl.nist.gov/div898/handbook/eda/section3/eda3661.htm"
    },
    {
      "given": {
        "mean": 0,
        "sd": 1,
        "a": -1.96,
        "b": 1.96
      },
      "expect": {
        "probability": 0.9500042097035591,
        "outside": 0.04999579029644087
      },
      "source": "hand calculation in content.mdx: 1 − 2 × Φ(−1.96); NIST/SEMATECH e-Handbook of Statistical Methods, §1.3.6.6.1 Normal Distribution. https://www.itl.nist.gov/div898/handbook/eda/section3/eda3661.htm (table: Φ(1.96) = 0.97500)"
    },
    {
      "given": {
        "mean": 100,
        "sd": 15,
        "b": 130
      },
      "expect": {
        "probability": 0.9772498680518208,
        "aboveUpper": 0.022750131948179216,
        "zUpper": 2
      },
      "source": "hand calculation in content.mdx: z = (130 − 100) ÷ 15 = 2, Φ(2) = 0.97725; NIST/SEMATECH e-Handbook of Statistical Methods, §1.3.6.6.1 Normal Distribution. https://www.itl.nist.gov/div898/handbook/eda/section3/eda3661.htm"
    },
    {
      "given": {
        "mean": 5,
        "sd": 2,
        "a": 7
      },
      "expect": {
        "probability": 0.15865525393145707,
        "zLower": 1
      },
      "source": "OpenStax, Introductory Statistics 2e, §6.2 Using the Normal Distribution. https://openstax.org/books/introductory-statistics-2e/pages/6-2-using-the-normal-distribution; hand calculation in content.mdx: z = (7 − 5) ÷ 2 = 1, P(Z > 1) = 0.158655"
    },
    {
      "given": {
        "mean": 0,
        "sd": 1,
        "a": 10
      },
      "expect": {
        "probability": 7.619853024160593e-24
      },
      "source": "hand calculation in content.mdx: erfc(10 ÷ √2) ÷ 2; NIST/SEMATECH e-Handbook of Statistical Methods, §1.3.6.6.1 Normal Distribution. https://www.itl.nist.gov/div898/handbook/eda/section3/eda3661.htm",
      "tolerance": 1e-12
    },
    {
      "given": {
        "mean": 0,
        "sd": 1,
        "a": 8,
        "b": 9
      },
      "expect": {
        "probability": 6.219831985865867e-16
      },
      "source": "hand calculation in content.mdx: Φ(−8) − Φ(−9); NIST/SEMATECH e-Handbook of Statistical Methods, §1.3.6.6.1 Normal Distribution. https://www.itl.nist.gov/div898/handbook/eda/section3/eda3661.htm",
      "tolerance": 1e-12
    }
  ],
  "sources": [
    "NIST/SEMATECH e-Handbook of Statistical Methods, §1.3.6.6.1 Normal Distribution. https://www.itl.nist.gov/div898/handbook/eda/section3/eda3661.htm",
    "NIST/SEMATECH e-Handbook of Statistical Methods, §1.3.6.7.1 Cumulative Distribution Function of the Standard Normal Distribution. https://www.itl.nist.gov/div898/handbook/eda/section3/eda3671.htm",
    "OpenStax, Introductory Statistics 2e, §6.2 Using the Normal Distribution. https://openstax.org/books/introductory-statistics-2e/pages/6-2-using-the-normal-distribution"
  ],
  "related": [
    "z-score",
    "binomial-distribution",
    "confidence-interval",
    "empirical-rule"
  ],
  "changelog": []
}
