Maths4UBETA

Discrete variables, tables and unknown probabilities

Build a valid table and recover unknown probabilities from total probability and moments.

Try the quick check →
Lesson 1 of 5

Section 1 of 5 · Core · about 9 min

What are the values of the random variable?

A random variable assigns a numerical value to each outcome of an experiment. Use an uppercase letter, such as XX, for the variable and a lowercase letter, such as xx, for one of its values. The statement P(X=x)P(X=x) is the probability of that value; it is not the value itself.

A discrete variable has a finite or countably infinite set of possible values. The values need not be whole numbers or nonnegative. This topic uses finite probability tables. The support is the set of values with positive probability. Values outside it have probability zero; zero-probability entries may still be displayed in a table.

Worked example

Check the inequality against every listed value

The discrete random variable XX has the distribution below. Find P(X≤12)P(X\le\frac{1}{2}), P(∣X∣<1)P(|X|<1), P(X2≥1)P(X^2\ge1) and P(X=1)P(X=1).

xx−1-10012\frac{1}{2}22
P(X=x)P(X=x)15\frac{1}{5}110\frac{1}{10}310\frac{3}{10}25\frac{2}{5}
  1. For X≤12X\le\frac{1}{2}, include the values −1,0,12-1,0,\frac{1}{2}:

    P(X≤12)=15+110+310=35.P\left(X\le\frac{1}{2}\right)=\frac{1}{5}+\frac{1}{10}+\frac{3}{10}=\frac{3}{5}.
  2. The strict inequality ∣X∣<1|X|<1 means −1<X<1-1<X<1, so only zero and one half qualify:

    P(∣X∣<1)=110+310=25.P(|X|<1)=\frac{1}{10}+\frac{3}{10}=\frac{2}{5}.
  3. Square each possible value. The squares are 1,0,14,41,0,\frac{1}{4},4. Therefore the event X2≥1X^2\ge1 occurs at X=−1X=-1 or X=2X=2:

    P(X2≥1)=15+25=35.P(X^2\ge1)=\frac{1}{5}+\frac{2}{5}=\frac{3}{5}.
  4. The value one is not in the support. There is no missing probability between the listed values:

    P(X=1)=0.P(X=1)=0.

Probability bars at minus one, zero, one half and two have heights one fifth, one tenth, three tenths and two fifths. The absolute-value event less than one selects only zero and one half, giving probability two fifths.

The strict inequality ∣X∣<1|X|<1 selects 00 and 12\frac{1}{2}. The value −1-1 is excluded.

P(∣X∣<1)=110+310=25P(|X|<1)=\frac{1}{10}+\frac{3}{10}=\frac25.

Separate bars mark the probabilities at four supported values. The highlighted bars satisfy the event; no probability is spread across the gaps.

Your turn

Use the following distribution to find P(X<1)P(X<1), P(∣X∣≤1)P(|X|\le1), P(X2>1)P(X^2>1) and P(X=0)P(X=0).

xx−2-2−12-\frac{1}{2}1133
P(X=x)P(X=x)110\frac{1}{10}25\frac{2}{5}15\frac{1}{5}310\frac{3}{10}

Enter an exact value or round to 3 significant figures.

Enter an exact value or round to 3 significant figures.

Enter an exact value or round to 3 significant figures.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Section 2 of 5 · Core · about 9 min

Does the proposed table define a distribution?

When a table includes every possible value exactly once, its entries must satisfy both requirements:

0≤P(X=x)≤1for every listed x,∑xP(X=x)=1.0\le P(X=x)\le1\quad\text{for every listed }x,\qquad\sum_xP(X=x)=1.

The sum is taken over the listed values. A negative entry cannot be balanced by an entry above one. A row of acceptable individual entries can still fail because its total is wrong.

If all entries are nonnegative and their total is one, the upper bound follows automatically: no single entry can exceed their total. It is still useful to inspect the entries when checking an algebraic answer.

Worked example

A sum of one does not by itself make a valid distribution

A proposed table for X∈{0,1,2}X\in\{0,1,2\} gives probabilities k,2k,1−3kk,2k,1-3k. Find every real value of kk that makes it valid. Explain why k=25k=\frac{2}{5} fails even though the probabilities add to one.

  1. The sum condition is automatically satisfied:

    k+2k+(1−3k)=1.k+2k+(1-3k)=1.

    It gives no unique value for kk, so the probability bounds must still be imposed.

  2. Nonnegativity requires

    k≥0,2k≥0,1−3k≥0.k\ge0,\qquad2k\ge0,\qquad1-3k\ge0.

    Together these give 0≤k≤130\le k\le\frac{1}{3}. In this range the three nonnegative entries sum to one, so none exceeds one.

  3. At k=25k=\frac{2}{5}, the final entry is 1−65=−151-\frac{6}{5}=-\frac{1}{5}. A negative probability is impossible. The correct admissible range is

    0≤k≤13.0\le k\le\frac{1}{3}.
  4. At an endpoint some listed values have probability zero. Such values may remain in the table for convenience, but they are not in the support of that particular distribution.

Your turn

Two proposed probability rows cover all listed outcomes. Row A is 14,12,13\frac{1}{4},\frac{1}{2},\frac{1}{3}. Row B is −15,12,710-\frac{1}{5},\frac{1}{2},\frac{7}{10}. Find each row total and decide whether each is valid.

Enter an exact value or round to 3 significant figures.

Is row A valid?

Enter an exact number, for example 3/2 or 2-sqrt(3).

Is row B valid?

Section 3 of 5 · Core · about 11 min

Which equations determine the unknown probabilities?

A normalising constant scales all given probability weights so that they add to one. First sum the expressions for every supported value, solve the total-probability equation, and then check the resulting entries. If a formula is supplied for P(X=x)P(X=x), substitute the listed values of xx before adding.

Worked example

Normalise a probability rule before using it

The values of XX are −1,1,3-1,1,3, with probabilities k,2k,3kk,2k,3k respectively. Find kk, P(X≥1)P(X\ge1) and P(X≠1)P(X\ne1).

  1. These probabilities account for every possible value, so

    k+2k+3k=1,6k=1,k=16.k+2k+3k=1,\qquad6k=1,\qquad k=\frac{1}{6}.
  2. The resulting probabilities are 16,13,12\frac{1}{6},\frac{1}{3},\frac{1}{2}; they are all within the permitted bounds and sum to one.

  3. For X≥1X\ge1, include both one and three:

    P(X≥1)=2k+3k=56.P(X\ge1)=2k+3k=\frac{5}{6}.
  4. Either add the probabilities at minus one and three, or use a complement:

    P(X≠1)=1−P(X=1)=1−13=23.P(X\ne1)=1-P(X=1)=1-\frac{1}{3}=\frac{2}{3}.

Your turn

The values 1,2,51,2,5 have probabilities k,3k,4kk,3k,4k. Find kk, P(X>1)P(X>1) and P(X<5)P(X<5).

Enter an exact value or round to 3 significant figures.

Enter an exact value or round to 3 significant figures.

Enter an exact value or round to 3 significant figures.

Two unknown probabilities generally need two independent pieces of information. The row total gives one equation. A supplied event probability or mean may give another. For a finite table, the mean is

E(X)=∑xxP(X=x).E(X)=\sum_x xP(X=x).

Each value is weighted by its own probability. A value zero contributes nothing to this mean sum but its probability still contributes to the row total.

Worked example

Use the total probability and the given mean together

A variable XX takes values −1,1,4-1,1,4 with probabilities a,b,14a,b,\frac{1}{4}. Its mean is 34\frac{3}{4}. Find aa and bb.

  1. The probabilities sum to one:

    a+b+14=1,a+b=34.a+b+\frac{1}{4}=1,\qquad a+b=\frac{3}{4}.
  2. The mean is a probability-weighted total of the values:

    (−1)a+(1)b+(4)14=34,−a+b=−14.(-1)a+(1)b+(4)\frac{1}{4}=\frac{3}{4},\qquad-a+b=-\frac{1}{4}.
  3. Add the two equations:

    2b=12,b=14,a=12.2b=\frac{1}{2},\qquad b=\frac{1}{4},\qquad a=\frac{1}{2}.
  4. Both answers are valid probabilities. They give total probability one and reproduce the mean:

    −12+14+1=34.-\frac{1}{2}+\frac{1}{4}+1=\frac{3}{4}.

    Solving simultaneous equations is only part of the task: the resulting entries must still define a distribution.

Your turn

The values 0,2,50,2,5 have probabilities a,b,15a,b,\frac{1}{5}, and E(X)=2E(X)=2. Find aa and bb.

Enter an exact value or round to 3 significant figures.

Enter an exact value or round to 3 significant figures.

Section 4 of 5 · Core · about 9 min

What does the expected value measure?

The expected value is a weighted mean of the possible numerical outcomes:

μ=E(X)=∑xxP(X=x).\mu=E(X)=\sum_x xP(X=x).

For a finite valid distribution it lies between the smallest and largest supported values. It can be negative, fractional or absent from the support. With independent repetitions of the same experiment, it is the value around which the long-run average settles.

Equal probabilities allow the weighted mean to simplify to the ordinary arithmetic mean of the listed values. Otherwise use the probability weights. A frequent zero outcome can lower the expectation even though its own product 0P(X=0)0P(X=0) vanishes.

Worked example

A weighted mean need not be a possible outcome

The random variable XX has the distribution below. Find E(X)E(X) and explain why its value need not appear in the table.

xx−2-20033
P(X=x)P(X=x)15\frac{1}{5}12\frac{1}{2}310\frac{3}{10}
  1. Multiply each value by its probability, keeping the sign of the value:

    E(X)=(−2)15+0⋅12+3⋅310.E(X)=(-2)\frac{1}{5}+0\cdot \frac{1}{2}+3\cdot \frac{3}{10}.
  2. E(X)=−25+0+910=12.E(X)=-\frac{2}{5}+0+\frac{9}{10}=\frac{1}{2}.
  3. The mean is a weighted balance point. It describes the long-run average over many independent repetitions with this same distribution; it is not a prediction that one trial will produce exactly 12\frac{1}{2}.

  4. Here the only possible trial values are −2,0,3-2,0,3. The expected value 12\frac{1}{2} lies between the smallest and largest values but is not itself a possible value.

Your turn

The variable XX takes values 0,2,60,2,6 with probabilities 12,13,16\frac{1}{2},\frac{1}{3},\frac{1}{6}. Find its expected value and decide whether one trial can produce that exact value.

Enter an exact value or round to 3 significant figures.

Can one trial equal the expected value?

Section 5 of 5 · Core · about 12 min

How far do outcomes spread around the mean?

Variance is the expected squared deviation from the mean. For a finite distribution,

Var⁡(X)=∑x(x−μ)2P(X=x),μ=E(X).\operatorname{Var}(X)=\sum_x(x-\mu)^2P(X=x),\qquad\mu=E(X).

Every term is nonnegative. Expanding the square and using ∑xP(X=x)=1\sum_xP(X=x)=1 gives the practical calculation rule

Var⁡(X)=E(X2)−[E(X)]2,E(X2)=∑xx2P(X=x).\operatorname{Var}(X)=E(X^2)-[E(X)]^2,\qquad E(X^2)=\sum_xx^2P(X=x).

The standard deviation is the nonnegative square root of the variance. Keep exact values or full calculator precision until the final step.

Worked example

Square the values before taking the second moment

For the same distribution with values −2,0,3-2,0,3 and probabilities 15,12,310\frac{1}{5},\frac{1}{2},\frac{3}{10}, find E(X2)E(X^2), Var⁡(X)\operatorname{Var}(X) and the standard deviation.

  1. Square each value, then weight it with its original probability:

    E(X2)=(−2)2⋅15+02⋅12+32⋅310=45+2710=72.E(X^2)=(-2)^2\cdot \frac{1}{5}+0^2\cdot \frac{1}{2}+3^2\cdot \frac{3}{10}=\frac{4}{5}+\frac{27}{10}=\frac{7}{2}.
  2. The mean is E(X)=12E(X)=\frac{1}{2}, so its square is [E(X)]2=14[E(X)]^2=\frac{1}{4}. This is a different quantity from E(X2)=72E(X^2)=\frac{7}{2}.

  3. Var⁡(X)=E(X2)−[E(X)]2=72−14=134.\operatorname{Var}(X)=E(X^2)-[E(X)]^2=\frac{7}{2}-\frac{1}{4}=\frac{13}{4}.
  4. σ=Var⁡(X)=132≈1.803.\sigma=\sqrt{\operatorname{Var}(X)}=\frac{\sqrt{13}}{2}\approx1.803.

    The approximation is to three decimal places. Variance uses squared units; standard deviation uses the same units as XX.

  5. The defining squared-deviation calculation gives the same result:

    (−2−12)2⋅15+(0−12)2⋅12+(3−12)2⋅310=134.\left(-2-\frac{1}{2}\right)^2\cdot \frac{1}{5}+\left(0-\frac{1}{2}\right)^2\cdot \frac{1}{2}+\left(3-\frac{1}{2}\right)^2\cdot \frac{3}{10}=\frac{13}{4}.

Weighted moments for the probability distribution

xxP(X=x)P(X=x)xP(X=x)xP(X=x)x2P(X=x)x^2P(X=x)
−2-215\frac{1}{5}−25-\frac{2}{5}45\frac{4}{5}
0012\frac{1}{2}0000
33310\frac{3}{10}910\frac{9}{10}2710\frac{27}{10}
Total1112\frac{1}{2}72\frac{7}{2}

Read E(X)=12E(X)=\frac{1}{2} and E(X2)=72E(X^2)=\frac{7}{2} from the final row. Var⁡(X)=72−(12)2=134\operatorname{Var}(X)=\frac{7}{2}-\left(\frac{1}{2}\right)^2=\frac{13}{4}, σ=132\sigma=\frac{\sqrt{13}}{2}.

One table keeps the probability weights, mean contributions and squared-value contributions separate. Subtract the square of the completed mean only after both weighted sums are known.

Your turn

The values −1,1,2-1,1,2 have probabilities 14,12,14\frac{1}{4},\frac{1}{2},\frac{1}{4}. Find E(X)E(X), E(X2)E(X^2), Var⁡(X)\operatorname{Var}(X) and the exact standard deviation.

Enter an exact value or round to 3 significant figures.

Enter an exact value or round to 3 significant figures.

Enter an exact value or round to 3 significant figures.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Worked example

A constant variable has no spread

A table lists values 2,5,92,5,9 with probabilities 0,1,00,1,0. State the support, mean, variance and standard deviation.

  1. Only five has positive probability. The support is {5}\{5\}; the table entries at two and nine do not create possible outcomes.

  2. E(X)=2(0)+5(1)+9(0)=5,E(X2)=25.E(X)=2(0)+5(1)+9(0)=5,\qquad E(X^2)=25.
  3. Var⁡(X)=25−52=0,σ=0.\operatorname{Var}(X)=25-5^2=0,\qquad\sigma=0.

    Every trial gives the same value, so every deviation from the mean is zero.

  4. For a finite discrete distribution, variance zero means all values with positive probability equal the mean. A second distinct value with positive probability would contribute a strictly positive squared deviation.

Worked examples

Practise the method

Core practice

Question 1 of 4

0 / 4 checked in this collection

Question list

Core practice

Fresh variants

Exam-style

Weights must be normalised

4 marks

X has the following distribution, with positive k.

xx−2-21144
P(X=x)\mathrm P(X=x)kk2k2 kkk

Find k, E(X)\mathrm E(X), Var⁡(X)\operatorname{Var}(X), and P(X>E(X))\mathrm P(X>\mathrm E(X)).

Enter an exact value or round to 3 significant figures.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact value or round to 3 significant figures.

Enter an exact value or round to 3 significant figures.

Full answer-format guide

Exact numbers: 3/2, sqrt(5), 2-sqrt(3), pi/6, 3*pi/2. Sets: {1,4}. Intervals: (3,5]; a round bracket excludes the endpoint. Infinity: inf; union: U; no solutions: empty. Separate coordinate pairs or triples with semicolons. Expressions: 2x^2+3x-1; equations: x^2=3x+1 or the polynomial equal to zero. Factors: x-1 ; x+2. Parameter fraction: numerator ; denominator. List integer answers individually.

Review the method

Progress stays in this browser. Create an account to save it or sign in.

Extra practice from this lesson

Read inequalities against the actual possible values

The random variable XX has distribution

x−3−125P(X=x)1101525310\begin{array}{c|rrrr}x&-3&-1&2&5\\\hline P(X=x)&\frac{1}{10}&\frac{1}{5}&\frac{2}{5}&\frac{3}{10}\end{array}

Find P(X<2)P(X<2), P(−1<X≤5)P(-1<X\le5), E(X)E(X) and Var⁡(X)\operatorname{Var}(X).

Enter an exact value or round to 3 significant figures.

Enter an exact value or round to 3 significant figures.

Enter an exact value or round to 3 significant figures.

Enter an exact value or round to 3 significant figures.

A unit sum does not rule out a negative probability

A proposed distribution assigns probabilities k,1−4k,3kk,1-4k,3k to the respective values −1,2,6-1,2,6. Find the smallest and largest allowed values of kk, including their endpoints. Decide whether k=310k=\frac{3}{10} gives a valid distribution.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact value or round to 3 significant figures.

Is the proposed distribution valid at the stated value?

Normalize a rule before taking weighted averages

A discrete random variable has possible values 1,2,4,51,2,4,5, with P(X=x)=k(x+1)P(X=x)=k(x+1) for these values and probability zero otherwise. Find kk, E(X)E(X) and Var⁡(X)\operatorname{Var}(X).

Enter an exact value or round to 3 significant figures.

Enter an exact value or round to 3 significant figures.

Enter an exact value or round to 3 significant figures.

The mean supplies the second probability equation

The possible values of XX are −2,0,3-2,0,3, with respective probabilities a,b,15a,b,\frac{1}{5}. The expectation is −110-\frac{1}{10}. Find aa, bb and Var⁡(X)\operatorname{Var}(X).

Enter an exact value or round to 3 significant figures.

Enter an exact value or round to 3 significant figures.

Enter an exact value or round to 3 significant figures.

Zero variance permits only the mean to occur

A valid distribution lists values −1,2,7-1,2,7 with respective probabilities a,b,ca,b,c. Its expectation is two and its variance is zero. Find all three probabilities.

Enter the value on its own or write a = … . Fractions and exact square roots are accepted.

Enter the value on its own or write b = … . Fractions and exact square roots are accepted.

Enter the value on its own or write c = … . Fractions and exact square roots are accepted.

Normalise the weights

For three outcomes the probabilities are 2k,3k,k2k,3k,k. Find kk.

Enter an exact value or round to 3 significant figures.

Recover a missing entry

The probabilities for X=−1,0,3X=-1,0,3 are 14,b,12\frac14,b,\frac12. Find bb.

Enter an exact value or round to 3 significant figures.

Use the second moment

A variable is −1-1 with probability 13\frac13 and 22 otherwise. Find its variance.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Identify a parameter by its mean

The probabilities at 0,1,40,1,4 are p,12,12−pp,\frac12,\frac12-p. The mean is 32\frac32. Find pp.

Enter an exact value or round to 3 significant figures.

Apply it · original exam-style problems

Show your working on paper and compare it with the worked solution and marking guidance.

Start after this lesson

Recover the table and then measure its spread 9 marks

The random variable XX has distribution

x−2014P(X=x)a15b110\begin{array}{c|rrrr}x&-2&0&1&4\\\hline P(X=x)&a&\frac{1}{5}&b&\frac{1}{10}\end{array}

It is given that E(X)=12E(X)=\frac{1}{2}. Find aa, bb, P(X>0)P(X>0), E(X2)E(X^2) and the exact standard deviation of XX.

Hint

The total and mean equations determine the two unknown probabilities. Use the recovered table for each later part. Standard deviation is the square root of variance, not the square root of the second moment alone.

Worked solution
  1. a+b=1−15−110=710,−2a+b+4(110)=12.a+b=1-\frac{1}{5}-\frac{1}{10}=\frac{7}{10},\qquad -2a+b+4\left(\frac{1}{10}\right)=\frac{1}{2}.
  2. The mean equation simplifies to b−2a=110b-2a=\frac{1}{10}. Subtract it from the normalization equation:

    3a=610⟹a=15,b=12.3a=\frac{6}{10}\quad\Longrightarrow\quad a=\frac{1}{5},\qquad b=\frac{1}{2}.

    The completed table passes both normalization and nonnegativity.

  3. Only the supported values one and four are positive:

    P(X>0)=12+110=35.P(X>0)=\frac{1}{2}+\frac{1}{10}=\frac{3}{5}.
  4. E(X2)=4⋅15+0⋅15+1⋅12+16⋅110=2910.E(X^2)=4\cdot \frac{1}{5}+0\cdot \frac{1}{5}+1\cdot \frac{1}{2}+16\cdot \frac{1}{10}=\frac{29}{10}.
  5. Var⁡(X)=2910−(12)2=5320,σ=5320=26510.\operatorname{Var}(X)=\frac{29}{10}-\left(\frac{1}{2}\right)^2=\frac{53}{20},\qquad\sigma=\sqrt{\frac{53}{20}}=\frac{\sqrt{265}}{10}.

    The positive square root is used because a standard deviation cannot be negative.

Marking guidance
  • 1 mark: form the normalization equation.
  • 1 mark: form the correct expectation equation, including the negative contribution.
  • 1 mark: solve for a.
  • 1 mark: solve for b and retain valid probabilities.
  • 1 mark: identify the positive supported values and obtain their total probability.
  • 1 mark: square the values while retaining their probabilities.
  • 1 mark: obtain the second moment.
  • 1 mark: subtract the squared mean to obtain the variance.
  • 1 mark: take the positive square root and give an exact standard deviation.
A probability parameter must survive the domain check 9 marks

A random variable has possible values zero, one and three, with respective probabilities (1−t)2,2t(1−t),t2(1-t)^2,2t(1-t),t^2, where 0≤t≤10\le t\le1. Its expectation is 54\frac{5}{4}. Find tt, P(X≥2)P(X\ge2), E(X2)E(X^2), Var⁡(X)\operatorname{Var}(X) and its exact standard deviation.

Hint

The probabilities already sum to one. Form the expectation equation using the actual value three, solve the quadratic, then apply the stated parameter domain. The value two is not a possible outcome.

Worked solution
  1. (1−t)2+2t(1−t)+t2=1.(1-t)^2+2t(1-t)+t^2=1.

    For the stated domain, each probability is nonnegative.

  2. E(X)=2t(1−t)+3t2=2t+t2=54.E(X)=2t(1-t)+3t^2=2t+t^2=\frac{5}{4}.

    Thus

    4t2+8t−5=(2t−1)(2t+5)=0.4t^2+8t-5=(2t-1)(2t+5)=0.
  3. The candidates are t=12t=\frac{1}{2} and t=−52t=-\frac{5}{2}. Only the first is in the stated domain. The probabilities are therefore 14,12,14\frac{1}{4},\frac{1}{2},\frac{1}{4}.

  4. The event X≥2X\ge2 contains only the possible value three:

    P(X≥2)=14,E(X2)=1⋅12+9⋅14=114.P(X\ge2)=\frac{1}{4},\qquad E(X^2)=1\cdot \frac{1}{2}+9\cdot \frac{1}{4}=\frac{11}{4}.
  5. Var⁡(X)=114−(54)2=1916,σ=194.\operatorname{Var}(X)=\frac{11}{4}-\left(\frac{5}{4}\right)^2=\frac{19}{16},\qquad\sigma=\frac{\sqrt{19}}{4}.

    Do not insert an extra row for two or substitute three squared into the probabilities.

Marking guidance
  • 1 mark: form the expectation using the actual possible values.
  • 1 mark: obtain the quadratic equation.
  • 1 mark: find both algebraic candidates.
  • 1 mark: reject the candidate outside the probability-parameter domain.
  • 1 mark: obtain the upper-tail probability from the supported values.
  • 1 mark: calculate the second moment.
  • 1 mark: use the correct squared mean.
  • 1 mark: obtain the variance.
  • 1 mark: take the positive square root for the exact standard deviation.

Come back to what needs practice

Quick revision sheet (A4)

Your review plan starts after your first check.

Question bank and saved work