The rule of a random variable tells you which number to record, but the rule alone does not say how likely each number is. Suppose a small editing task needs , or corrections. Before you can answer a question such as how likely at least one correction is, you need the probability that belongs to each of those values. This lesson introduces the function that holds that information, shows how to check that a proposed table of probabilities is valid, and turns any question about the variable into a sum of the right masses.
Key terms
Probability mass function
Definition Let be a discrete random variable. Its probability mass function, or PMF, is the function defined for every real number by
It is positive exactly at the values in the support of and equal to at every other real number. The input stands for a value of and can be any real number, and the output is a probability.
In plain words For any number you name, the PMF reports how likely the random variable is to equal exactly that number. Values and masses are different kinds of numbers, which is why a PMF table keeps them in separate rows.
Example In a constructed teaching model, let be the number of corrections an editing task needs, with the following PMF.
So , and the value is a number of corrections whose probability is . The value is not in the support, so , and likewise and . The table assigns probability to three values and zero to every other real number.
Nonnegative masses
Definition A function on the real numbers is the PMF of some discrete random variable exactly when three conditions hold. Every mass is nonnegative, so for all real . The set of values with is finite or countably infinite. The masses on that set add to one,
The last condition is called normalization. Together the conditions give for every , since one nonnegative term cannot exceed a sum of nonnegative terms that equals .
In plain words No probability can be negative, and the masses must account for all of the probability, no more and no less. The nonnegativity check and the total check each catch mistakes that the other one misses.
Example The correction table passes both checks. All three masses are positive, and written in tenths they add to one,
A proposed table with masses , and sums to but has a negative mass, so it is not a PMF. A table with masses , and has no negative entry but sums to . If its three values are claimed to be all the possible values, of the probability is unaccounted for and the table is not a PMF. A table that openly lists only some of the values may total less than , but it is then a partial report, not a complete distribution.
Normalizing constant
Definition Sometimes masses are known only up to a constant factor, for in a stated finite or countably infinite set and otherwise. If on and the sum of over is finite and positive, normalization forces
and this value is the normalizing constant. It is positive, so every mass is then nonnegative. When the proposed formula can take negative values, solving the normalization equation is not enough, and every resulting mass still has to be checked.
In plain words Write the masses with an unknown scale, add them, and choose the scale that makes the total . Then confirm that no mass came out negative.
Example A variable takes the values , and with masses , and . Normalization gives , so , and the masses are , and , all nonnegative with total . The same method works on a countably infinite support. For masses at the geometric series gives
so and the masses are , , and so on. Now try for . Normalization gives , so , but then . Since normalization allows no other value of , this formula defines no PMF.
Event probability as a sum of masses
Definition Let be a discrete random variable with PMF and support . For every set of real numbers,
The set is finite or countably infinite, and the events for its elements are mutually exclusive, so their probabilities add. The values in outside the support contribute together, because lies in with probability . When contains no support value the sum is empty and the probability is .
In plain words Mark the support values that satisfy the condition, then add their masses. Words such as at least, at most, fewer than and greater than decide whether an endpoint belongs in the sum.
Example For the correction count, at least one correction means is or , so
The complement agrees, since . Fewer than three corrections includes and but not , so . At most three includes all three support values, so . Now let have the countably infinite PMF found above, with masses at . The complement of is , which contains the support values , and . That gives .
Finite uniform distribution
Definition Let be a set of distinct real numbers. A random variable has the uniform distribution on if for every in and otherwise. Then for every set of real numbers
where is the number of elements of that lie in . The word uniform refers to equal masses on . The values need not be evenly spaced, and numbers that lie between elements of but are not in receive no probability.
In plain words Every listed value is equally likely, so the probability of an event is the fraction of the listed values it contains. When the masses are unequal, that fraction need not equal the probability.
Example Four tickets labeled , , and are in a box, and one is drawn with each ticket equally likely. Its label is uniform on , so each value has mass and . Although lies between and , the probability is . Even spacing does not make a distribution uniform either. The values , and are evenly spaced, but a variable with masses , and on them is not uniform.
Probability bar chart
Definition A probability bar chart of a discrete distribution places a vertical bar or spike at each support value on a horizontal axis of values, with height . Values outside the support get no bar. The heights are probabilities and add to over the whole support, and the widths of the bars carry no meaning.
In plain words Read a PMF chart by the heights of its bars, not by their areas. A gap in the chart means zero probability at that value.
Example The chart for the correction count has bars at , and with heights , and . The tallest bar is at , the most likely value, and there is no bar at because . Drawing the bars wider or narrower changes nothing about the distribution. Later in the course, density curves are read by area. A PMF bar chart is read by height.
Check yourself
- A ticket is drawn from four tickets labeled , , and , each equally likely, and is its label. Find , and .
Show the answer
Each of the four labels has mass , and is not a label, so . The labels with are , and , so . The labels strictly between and are and , so . Treating the labels as if they filled the interval from to and computing for would be wrong, because the distribution puts mass only on the four labels.
- A score takes the values , , and with masses , , and . Find . Then find , and the probability that is odd.
Show the answer
The masses add to , so and the masses are , , and , all nonnegative. The event includes and , so
The event excludes and includes and , so . No support value is odd, so the probability of an odd score is . As a check, the first two events are disjoint and together cover the support, and their probabilities add to .
- For which constant is for , with for every other , a PMF?
Show the answer
For no value of . At the factor equals , , , and , which add to . Normalization therefore requires
so is the only candidate. With that value , which is negative, so the formula fails nonnegativity. If the formula were used only for , normalization would give and the masses , , and , a valid PMF whose support is .