A probability mass function (PMF) and a probability density function (PDF) are both ways of describing the probability distribution of a random variable. However, they are different in how they are defined and the types of random variables they describe.
A probability mass function (PMF) is a function that gives the probability that a discrete random variable takes on a certain value. That is, for each possible value of the random variable, the PMF gives the probability of that value occurring. The PMF is typically denoted by P(X = x), where X is the random variable and x is a possible value it can take on. The PMF satisfies two important properties:
1. Non-negativity: P(Xβ=βx)ββ€β0 for all x.
2. Normalization: βP(Xβ=βx)β=β1 over all possible values of X.
For example, let X be the result of rolling a fair six-sided die. The PMF of X is P(Xβ=β1)β=βP(Xβ=β2)β=βP(Xβ=β3)β=βP(Xβ=β4)β=βP(Xβ=β5)β=βP(Xβ=β6)β=β1/6.
On the other hand, a probability density function (PDF) is a function that gives the relative likelihood of observing a continuous random variable within a certain range of values. That is, for a continuous random variable, the PDF gives the probability density at various points along the continuous range of possible values, but not the probability of any specific value occurring. The PDF is typically denoted by f(x). The properties that a PDF satisfies are:
1. Non-negativity: f(x)β>β0 for all x.
2. Normalization: β«f(x)dxβ=β1 over the entire range of x.
For example, let X be a continuous random variable that represents the length of a certain type of fish in a lake, measured in inches. A possible PDF for X is f(x)β=β0.5β *β e(β ββ 0.5β *β x) for xβ>β0, where e represents the mathematical constant e 2.718. This PDF satisfies the two properties listed above and gives the relative likelihood of observing a fish of a given length.
In summary, PMFs are used to describe the probability of observing specific values for a discrete random variable, while PDFs are used to describe the relative likelihood of observing continuous values for a continuous random variable.