A score change can be negative or positive, but often the quantity of interest is its size, its square, or only the gains. Each of these is a new random variable, and its probabilities have to come from the distribution of the original one. The difficulty is that several inputs can produce the same output, so the probability that the square equals can collect the masses of both and . This lesson gives one rule that works for every discrete random variable, namely adding the masses of all inputs that land on a given output, and applies it to one-to-one maps, many-to-one maps and the positive part.
Key terms
Function of a random variable
Definition Let be a discrete random variable on a sample space with support , the set of values with positive probability, and let be a real-valued function defined at every value that can take. The random variable assigns to each outcome the number . It is again discrete, and its support is the set of outputs of support points,
In plain words Apply the rule to the number that produces. No new randomness enters, because the value of fixes the value of , so every probability about is inherited from .
Example In the key terms on this page, is a constructed score change with the following distribution.
The square sends to . Its support is the set with three values, not a list of five outputs with repeats. A constant function such as is allowed too. It gives a random variable that equals with probability .
Preimage
Definition For a function and a set of real numbers, the preimage of under is the set of inputs whose output lies in ,
For a single value it is . The notation does not require to have an inverse function, and a preimage may contain several points or none. The events and are the same event, so
In plain words To find the probability of a statement about , turn it into a statement about by asking which inputs make it true. Only inputs in the support of carry probability, so solutions of outside the support contribute .
Example For the preimage of is and the preimage of is . The event happens exactly when , and the support points with that property are and , so . The preimage of is , which contains no support point of , so .
Collecting probability mass
Definition Let , where is discrete with support and PMF . For every real number ,
the total mass of the support points in the preimage of . An empty sum equals . Each support point of contributes its mass to exactly one output, so the masses of are nonnegative and add to . When a preimage contains infinitely many support points, its sum is a series of nonnegative terms, and its value does not depend on the order of the terms.
In plain words Draw an arrow from each input to its output and carry the input’s probability along the arrow. Where several arrows meet, add what they carry. A transformation can merge probability but cannot create or destroy any, so a total different from signals a mistake, such as a row that was missed or counted twice.
Example For the output collects the input , the output collects and , and the output collects and . So
and the masses total .
One-to-one map
Definition A function is one-to-one on the support of if distinct points of always have distinct outputs, that is, if with and in forces . Then every preimage contains at most one support point, nothing is merged, and has for every in . Whether a map is one-to-one on depends on the support as well as on the formula.
In plain words The values move, but each mass travels with its own value. Write the new support explicitly, and when you sort it, move every probability together with its value.
Example The map sends to , so takes these values with the unchanged masses . The decreasing map reverses the order. Sorted from smallest to largest, takes with masses , and keeping the old probability column beside the sorted values would describe a different distribution. Squaring is not one-to-one on the support of this , but it is one-to-one on , and in general it merges no mass when every support value is nonnegative.
Many-to-one map
Definition A function is many-to-one on the support of if at least two distinct points of have the same output. Then some preimage contains two or more support points, and their masses are added to give a single mass of . On the event that takes such an output, the value of does not determine the value of .
In plain words Several inputs land on one output, so their probabilities pile up there. Solving for one convenient root, as if had an inverse, misses the other inputs.
Example Taking only the positive square root of keeps the input alone and reports for , which misses the input . The correct value is . The absolute value takes with masses . That is the same list of masses as for , but on different values, so the two variables have different distributions. The indicator that equals when and otherwise has and . Knowing that says only that was or .
Positive part
Definition The positive part of a real number is , and the positive part of a random variable is . It keeps nonnegative values and replaces negative values by . For discrete ,
and for every . The negative part is , and every value satisfies and .
In plain words Gains are kept and losses are recorded as zero. Every input at or below goes to , so the mass at collects the old zero together with all the negative values.
Example For the score change, the positive part sends , and to . Its mass at zero is , and the other masses are and , for a total of . Putting only the old zero row’s mass at zero would leave there, and the masses would add to only .
Check yourself
- For the score change on this page, find the PMF of the capped square and check that its masses add to .
Show the answer
The inputs have outputs . Only the input gives the output , so . The other four inputs all give , so . The masses add to . The cap merges and with and , even though their squares are different.
- Let take the values with probabilities . Find the PMF of and the PMF of the positive part .
Show the answer
The outputs of are . So , and . The cap merges the inputs and , whose squares and differ.
For the positive part, the inputs and both go to , so , while and . Both lists of masses add to .
- Let take the values with probabilities . Is one-to-one on the support? Is ? Find the PMF of .
Show the answer
The squares of are , all distinct, so is one-to-one on this support. The variable takes these four values with the unchanged masses .
The map sends to . The inputs and share the output , so is many-to-one on the support. Collecting masses gives , and , which add to . The same formula that merges and on the score change merges nothing here, because whether a map is one-to-one depends on the support.