{
  "id": "probability-mass-function",
  "title": "Probability Mass Function",
  "lang": "en",
  "source_lang": "en",
  "summary": "A probability mass function assigns probabilities to the individual values of a discrete random variable.",
  "category": "mathematics",
  "subcategory": "probability-statistics",
  "type": "concept",
  "aliases": [
    "PMF",
    "probability function"
  ],
  "generated_at": "2026-10-04",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/probability-mass-function/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/probability-mass-function/",
      "json": "https://aiwiki.page/zh/probability-mass-function.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "A probability mass function (PMF) is a function that assigns to each possible value of a discrete random variable the probability of that value occurring. It completely specifies a discrete probability distribution, whose probability is concentrated on a finite or countably infinite collection of values. Common notations include \\(p_X(x)\\), \\(p(x)\\), and \\(f(x)\\); the subscript identifies the variable when several distributions are under consideration. (online.stat.psu.edu)"
    },
    {
      "heading": "Definition and basic properties",
      "text": "For a discrete random variable \\(X\\), its PMF is defined by\n\n\\[p_X(x)=P(X=x).\\]\n\nLet \\(S=\\{x:p_X(x)>0\\}\\) denote the set of values with positive probability, commonly called its support in elementary treatments. This is a countable set, and the PMF satisfies\n\n\\[p_X(x)\\geq 0,\\qquad \\sum_{x\\in S}p_X(x)=1.\\]\n\nValues outside \\(S\\) have probability zero. These requirements are also sufficient: any nonnegative assignment to a finite or countable set that sums to one defines a discrete distribution. For any subset \\(A\\) of possible values,\n\n\\[P(X\\in A)=\\sum_{x\\in A\\cap S}p_X(x).\\]\n\nThus probabilities of compound events are obtained by adding the masses of their constituent values. (online.stat.psu.edu)\n\n“Discrete” does not mean that the values must be integers or equally spaced. The essential requirement is that all probability lies on a countable collection of values. A PMF can be represented by a formula, a table, or a graph with separate markers or bars. The heights represent individual probabilities, rather than a continuous density. (online.stat.psu.edu)"
    },
    {
      "heading": "Examples and common distributions",
      "text": "For a fair six-sided die, let \\(X\\) be the number on the upper face. Then\n\n\\[p_X(k)= \\begin{cases} 1/6,&k\\in\\{1,2,3,4,5,6\\},\\\\ 0,&\\text{otherwise}. \\end{cases}\\]\n\nConsequently, \\(P(X>4)=p_X(5)+p_X(6)=1/3\\). This illustrates a finite distribution with equal masses, whereas many discrete distributions assign different probabilities to different values. (online.stat.psu.edu)\n\nThe Bernoulli distribution models a single binary outcome. With success probability \\(q\\), it assigns mass \\(q\\) to 1 and \\(1-q\\) to 0. The binomial distribution describes the number of successes in \\(n\\) independent Bernoulli trials with the same success probability:\n\n\\[p_X(k)=\\binom nk q^k(1-q)^{n-k}, \\qquad k=0,\\ldots,n.\\]\n\nThe binomial coefficient accounts for the different arrangements of \\(k\\) successes among the trials. (online.stat.psu.edu)\n\nAn important infinite-support example is the Poisson distribution, with parameter \\(\\lambda>0\\):\n\n\\[p_X(k)=e^{-\\lambda}\\frac{\\lambda^k}{k!}, \\qquad k=0,1,2,\\ldots.\\]\n\nIt assigns probability to every nonnegative integer and is used in models of event counts. Although infinitely many terms occur, their sum is one. (online.stat.psu.edu)"
    },
    {
      "heading": "Relationship to cumulative distribution and density",
      "text": "For a real-valued discrete variable, the cumulative distribution function (CDF) collects all masses at or below a threshold:\n\n\\[F_X(t)=P(X\\leq t)= \\sum_{\\substack{x\\in S\\\\x\\leq t}}p_X(x).\\]\n\nAt a value \\(x\\) with positive mass, the CDF has a jump of size \\(p_X(x)\\). Equivalently,\n\n\\[p_X(x)=F_X(x)-F_X(x^-),\\]\n\nwhere \\(F_X(x^-)\\) is the left-hand limit. For integer-valued variables, this becomes \\(p_X(k)=F_X(k)-F_X(k-1)\\). Unlike the PMF, the CDF is defined through the same probability expression for both discrete and continuous variables. (online.stat.psu.edu)\n\nA PMF must be distinguished from a probability density function (PDF). A PMF value is itself a probability and cannot exceed one. For a distribution described by a continuous density, interval probabilities are obtained through an integral, and the probability of any single value is zero. Density values are not individual probabilities and may exceed one; their total integral, rather than their sum, equals one. (online.stat.psu.edu)"
    },
    {
      "heading": "Expectations and transformations",
      "text": "The PMF supplies the weights used to calculate the expected value:\n\n\\[E[X]=\\sum_{x\\in S}x\\,p_X(x),\\]\n\nprovided the series is absolutely convergent when a finite expectation is intended. More generally,\n\n\\[E[g(X)]=\\sum_{x\\in S}g(x)p_X(x).\\]\n\nWhen the relevant moments are finite, the variance is\n\n\\[\\operatorname{Var}(X) =\\sum_{x\\in S}(x-\\mu)^2p_X(x) =E[X^2]-\\mu^2, \\qquad \\mu=E[X].\\]\n\nIts square root is the standard deviation. A valid PMF need not have a finite mean or variance, particularly when its support is infinite. (online.stat.psu.edu)"
    },
    {
      "heading": "Joint and conditional mass functions",
      "text": "For two discrete variables, a joint probability distribution is specified by\n\n\\[p_{X,Y}(x,y)=P(X=x,Y=y).\\]\n\nSumming over the other variable gives an individual, or marginal, PMF:\n\n\\[p_X(x)=\\sum_y p_{X,Y}(x,y).\\]\n\nBy the definition of conditional probability, when \\(p_Y(y)>0\\),\n\n\\[p_{X\\mid Y}(x\\mid y) =\\frac{p_{X,Y}(x,y)}{p_Y(y)}.\\]\n\nStatistical independence holds exactly when the joint PMF factorizes as \\(p_{X,Y}(x,y)=p_X(x)p_Y(y)\\) for all pairs of values. (online.stat.psu.edu)"
    },
    {
      "heading": "Role in statistical inference",
      "text": "In statistics, a parameterized PMF \\(p(x;\\theta)\\) describes how probabilities depend on an unknown parameter. For independent observations \\(x_1,\\ldots,x_n\\) sharing that PMF, their product defines the likelihood function:\n\n\\[L(\\theta)=\\prod_{i=1}^{n}p(x_i;\\theta).\\]\n\nMaximum likelihood estimation selects parameter values that maximize this expression. The distinction is interpretive: a PMF treats the outcome as variable with the parameter fixed; a likelihood treats the observed data as fixed and compares parameter values. A likelihood is therefore not generally a probability distribution over the parameter. (online.stat.psu.edu)"
    }
  ],
  "links": [
    "mathematical-function",
    "random-variable",
    "probability",
    "probability-distribution",
    "countable-set",
    "integer",
    "bernoulli-distribution",
    "binomial-distribution",
    "poisson-distribution",
    "cumulative-distribution-function",
    "limit",
    "probability-density-function",
    "integral",
    "expected-value",
    "variance",
    "standard-deviation",
    "joint-probability-distribution",
    "conditional-probability",
    "statistical-independence",
    "statistics",
    "likelihood-function",
    "maximum-likelihood-estimation"
  ],
  "sources": [
    {
      "title": "online.stat.psu.edu/stat414/Lesson07",
      "url": "https://online.stat.psu.edu/stat414/Lesson07"
    },
    {
      "title": "online.stat.psu.edu/stat414/Lesson08",
      "url": "https://online.stat.psu.edu/stat414/Lesson08"
    },
    {
      "title": "online.stat.psu.edu/stat504/Lesson01",
      "url": "https://online.stat.psu.edu/stat504/Lesson01"
    },
    {
      "title": "online.stat.psu.edu/stat414/Lesson12",
      "url": "https://online.stat.psu.edu/stat414/Lesson12"
    },
    {
      "title": "online.stat.psu.edu/stat500/Lesson03",
      "url": "https://online.stat.psu.edu/stat500/Lesson03"
    },
    {
      "title": "online.stat.psu.edu/stat414/Lesson17",
      "url": "https://online.stat.psu.edu/stat414/Lesson17"
    }
  ],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}