Tutorials › AP Statistics › Setting Up the Calculation Table Efficiently

Expected value and variability · Tutorial 339 of 1000

Setting Up the Calculation Table Efficiently

Use a staged calculation table to make every contribution to the mean and variability visible, organized, and easy to check.

Intermediate 9 min read

What You'll Learn

  • Set up columns for each possible value and its probability.
  • Use the weighted-value column to calculate the mean before filling deviation columns.
  • Organize squared deviations and their probability-weighted contributions.
  • Check column totals, units, and arithmetic without rounding the mean too early.
  • Present a complete calculation table that makes the method clear on an AP response.

A Table Makes Each Calculation Visible

When a question asks for both the mean and standard deviation of a discrete random variable, the arithmetic has a natural order: find the mean first, then measure the values’ squared distances from that mean. A well-planned table follows that order and makes it easy to see whether every possible value and probability has been used.

In The Mean of a Discrete Random Variable, you found the mean by adding the products \(xP(X=x)\). In Variance of a Discrete Random Variable, you found variance by adding the probability-weighted squared deviations. This tutorial introduces a single table layout for displaying both calculations clearly. It builds on those procedures rather than replacing them.

Key idea: Use one row for each possible value of \(X\). First fill in \(x\), \(P(X=x)\), and \(xP(X=x)\). Add the weighted values to find \(\mu_X\). Then use that mean to complete \(x-\mu_X\), \((x-\mu_X)^2\), and \((x-\mu_X)^2P(X=x)\).

The table has six working columns, plus a total row. The first three find the mean; the final three find the variance. You can draw all six columns before calculating, but fill them in stages: the mean is needed before the deviation columns can be completed.

\(x\)\(P(X=x)\)\(xP(X=x)\)\(x-\mu_X\)\((x-\mu_X)^2\)\((x-\mu_X)^2P(X=x)\)
Each possible valueIts probabilityContribution to the meanDeviation from the meanSquared deviationContribution to the variance
Total row1\(\mu_X\)Not totaledNot totaled\(\sigma_X^2\)

The probability total should be 1 for a valid distribution. The total in the \(xP(X=x)\) column is \(\mu_X\). The total in the last column is \(\sigma_X^2\), and its square root is \(\sigma_X\). The deviation and squared-deviation columns are intermediate steps; do not add them as if their totals were the mean or variance.

Build the Table in Two Passes

The staged approach prevents a common organizational problem: trying to calculate deviations before the mean is established. Start with the value and probability columns, then calculate and total the weighted-value column. Once you have \(\mu_X\), return to each row and finish the deviation columns.

1
Enter the distribution.
List every possible value \(x\) and its matching probability \(P(X=x)\), keeping each pair on the same row.
2
Find the mean.
Calculate \(xP(X=x)\) in each row and add those products. Record the total as \(\mu_X\).
3
Find the variance.
Subtract the mean from each value, square each deviation, multiply by that row’s probability, and add the final-column contributions.
4
Find and report standard deviation.
Take the nonnegative square root of the variance. State the mean, variance, and standard deviation with appropriate units if requested.

The column headings themselves serve as a checklist. In particular, the final column must include the probability: \((x-\mu_X)^2P(X=x)\), not just \((x-\mu_X)^2\). Squared deviations without probability weights do not give the variance unless all the outcomes have equal probabilities and the calculation is adjusted accordingly.

Worked Table: Calculate Both Summaries

Worked Example: A Daily Count of Misrouted Parcels

In a fictional sorting center, let \(X\) be the number of misrouted parcels found during a randomly selected shift. The probability distribution is:

\(x\), parcels\(P(X=x)\)
00.10
10.30
20.40
30.20

State. \(X\) is the number of misrouted parcels in one randomly selected shift. We want the mean \(\mu_X\) and standard deviation \(\sigma_X\).

Plan. The stated probabilities are between 0 and 1 and add to \(0.10+0.30+0.40+0.20=1.00\). Use the weighted-value column to find the mean. Then complete the squared-deviation and weighted-squared-deviation columns to find variance and standard deviation.

Do. First calculate each product \(xP(X=x)\). Their sum is the mean:

$$ \begin{aligned} \mu_X &=(0)(0.10)+(1)(0.30)+(2)(0.40)+(3)(0.20)\\ &=0+0.30+0.80+0.60\\ &=1.70\text{ parcels}. \end{aligned} $$

Now use \(\mu_X=1.70\) in every row. The table shows the mean contributions first and the variance contributions last:

\(x\)\(P(X=x)\)\(xP(X=x)\)\(x-\mu_X\)\((x-\mu_X)^2\)\((x-\mu_X)^2P(X=x)\)
00.100.00-1.702.890.289
10.300.30-0.700.490.147
20.400.800.300.090.036
30.200.601.301.690.338
Total1.001.70——0.810

For example, the row with \(x=0\) has deviation \(0-1.70=-1.70\), squared deviation \((-1.70)^2=2.89\), and variance contribution \(2.89(0.10)=0.289\). The table’s last-column total gives:

$$ \begin{aligned} \sigma_X^2 &=0.289+0.147+0.036+0.338\\ &=0.810\text{ parcels}^2,\\ \sigma_X &=\sqrt{0.810}=0.900\text{ parcels}. \end{aligned} $$

As a check on the final total, the contributions add to \(0.289+0.147=0.436\) and \(0.036+0.338=0.374\); \(0.436+0.374=0.810\). Also, \(0.900^2=0.810\). A separate check using the weighted squared values gives \(E(X^2)=0+0.30+1.60+1.80=3.70\), and \(3.70-(1.70)^2=3.70-2.89=0.81\), matching the table’s variance.

Conclude. The modeled number of misrouted parcels per shift has mean 1.70 parcels and standard deviation 0.90 parcels. The standard deviation describes a typical distance from the mean count of 1.70 parcels; it does not guarantee that each shift’s count is within 0.90 parcels of the mean.

Use the Same Layout When a Deviation Is Zero

A row whose value equals the mean has a deviation of zero, so its contribution to variance is zero regardless of its probability. Keeping that row in the table still matters: it is part of the full distribution and contributes to the mean calculation. Do not omit a possible value simply because its variance contribution turns out to be zero.

Worked Example: A Mean That Matches One Possible Value

For a fictional daily equipment check, \(X\) is the number of alerts recorded. Its possible values are 0, 3, and 5, with probabilities 0.20, 0.50, and 0.30. Find the mean and standard deviation using the table layout.

State. \(X\) is the alert count during one equipment check. The probabilities are between 0 and 1 and sum to \(0.20+0.50+0.30=1\).

Plan. Find the mean from the \(xP(X=x)\) column. Then calculate deviations using that mean and add the weighted squared deviations.

Do. The weighted values are \((0)(0.20)=0\), \((3)(0.50)=1.50\), and \((5)(0.30)=1.50\), so \(\mu_X=3.00\) alerts. The complete table is:

\(x\)\(P(X=x)\)\(xP(X=x)\)\(x-\mu_X\)\((x-\mu_X)^2\)\((x-\mu_X)^2P(X=x)\)
00.200.00-391.80
30.501.50000.00
50.301.50241.20
Total1.003.00——3.00

The variance contributions are \(9(0.20)=1.80\), \(0(0.50)=0\), and \(4(0.30)=1.20\). Therefore:

$$ \sigma_X^2=1.80+0+1.20=3.00\text{ alerts}^2 \qquad\text{and}\qquad \sigma_X=\sqrt{3.00}\approx1.7321\text{ alerts}. $$

The variance also checks using \(E(X^2)-\mu_X^2\): \(E(X^2)=(0^2)(0.20)+(3^2)(0.50)+(5^2)(0.30)=0+4.50+7.50=12\), and \(12-3^2=3\). The zero-deviation row remains in the table, even though it contributes zero to the variance.

Conclude. The modeled alert count has mean 3 alerts and standard deviation approximately 1.7321 alerts.

Make the Table Work for Signed Values

The layout also works when \(X\) can be negative, such as net gain or loss. Keep the sign in both the value and its weighted-value product. For variance, square the entire deviation; the resulting squared deviation and its weighted contribution cannot be negative.

Worked Example: Net Gain from a Fictional Promotion

A fictional promotion assigns a participant a net gain \(X\), in dollars, of \(-4\), \(0\), or \(6\), with probabilities 0.25, 0.50, and 0.25. Find the mean and standard deviation.

State. \(X\) is the participant’s net gain in dollars from one entry. The probabilities are valid because they are between 0 and 1 and \(0.25+0.50+0.25=1\).

Plan. Preserve the negative sign when finding \(xP(X=x)\). After finding the mean, square each full deviation and weight it by the probability in that row.

Do. The weighted values are \((-4)(0.25)=-1\), \((0)(0.50)=0\), and \((6)(0.25)=1.50\). Their sum gives \(\mu_X=0.50\) dollars. Complete the table:

\(x\), dollars\(P(X=x)\)\(xP(X=x)\)\(x-\mu_X\)\((x-\mu_X)^2\)\((x-\mu_X)^2P(X=x)\)
-40.25-1.00-4.5020.255.0625
00.500.00-0.500.250.1250
60.251.505.5030.257.5625
Total1.000.50——12.7500

For the first row, the deviation is \(-4-0.50=-4.50\), and its weighted squared-deviation contribution is \((-4.50)^2(0.25)=20.25(0.25)=5.0625\). The variance and standard deviation are:

$$ \begin{aligned} \sigma_X^2 &=5.0625+0.1250+7.5625\\ &=12.7500\text{ dollars}^2,\\ \sigma_X &=\sqrt{12.75}\approx3.5707\text{ dollars}. \end{aligned} $$

The last-column addition checks because \(5.0625+7.5625=12.6250\), and \(12.6250+0.1250=12.7500\). The square of approximately \(3.5707\) is approximately \(12.75\), allowing for rounding.

Conclude. The modeled net gain has mean \(\$0.50\) per entry and standard deviation approximately \(\$3.5707\) per entry. The negative possible value affects the mean through its signed product, while its squared deviation contributes positively to the variance.

Common Mistakes and AP Exam Tips

A clear table helps earn credit because it shows which operation was applied to each value and probability. It also makes several specific errors easier to catch.

  • Pairing a probability with the wrong value. Keep each \(x\) and \(P(X=x)\) on the same row, and calculate both weighted columns from that row’s pair.
  • Putting the wrong quantity in the mean column. The mean uses \(xP(X=x)\), not just \(x\) and not just \(P(X=x)\). Show the products and their sum.
  • Starting deviations before finding the mean. Finish and total the weighted-value column first. Then use that single \(\mu_X\) consistently throughout the deviation columns.
  • Forgetting the probability in the last column. \((x-\mu_X)^2\) is an intermediate value. The variance contribution is \((x-\mu_X)^2P(X=x)\).
  • Adding intermediate columns. Add the weighted values to get the mean and the weighted squared deviations to get variance. The deviations themselves are not a summary to total.
  • Rounding the mean too soon. Keep enough digits for the deviation calculations. If the mean is not exact, carry additional digits and round the final variance or standard deviation only at the end.
  • Dropping a row with zero contribution. Include every possible value, even if \(x=\mu_X\) makes its variance contribution zero.

A full-credit response does not have to use a table if the work is clearly shown another way, but this layout makes the method visible. Label the columns, show the mean from the weighted products, show the squared-deviation contributions, and identify the variance and standard deviation separately. Use original units for the mean and standard deviation and squared units for variance, as in Interpreting Standard Deviation of a Random Variable.

Key Takeaway

A calculation table is most efficient when it follows the dependency between the quantities: the mean comes before the deviations, and the weighted squared deviations come before the standard deviation. Keep all possible values in the table and let each column do one job.

Key takeaway: Use \(x\), \(P(X=x)\), and \(xP(X=x)\) to find \(\mu_X\). Then calculate \(x-\mu_X\), \((x-\mu_X)^2\), and \((x-\mu_X)^2P(X=x)\) to find \(\sigma_X^2\). Take the square root of the variance to find \(\sigma_X\).

Check Your Understanding

Use the staged table layout in your work. Keep each value paired with its probability and show enough entries to make the calculation clear.

  1. A random variable takes values 1 and 4 with probabilities 0.60 and 0.40. What should the total of the \(xP(X=x)\) column represent?
  2. After finding \(\mu_X=2\), a row has \(x=5\) and \(P(X=x)=0.20\). Find the row’s deviation, squared deviation, and variance contribution.
  3. Why should a value equal to the mean remain in the table even though its contribution to variance is zero?
  4. In a table for a net-gain variable, what sign should be used for \(xP(X=x)\) when \(x\) is negative and the probability is positive?
  5. Which two column totals give the variance and the mean, respectively? State what you do to the variance total to obtain standard deviation.