4.4 Discrete Distribution (Playing Card Experiment)
SLO 3
Describe and apply probability concepts and distributions.
This lab is where a distribution stops being a formula: you draw ten cards, build the theoretical B(10, 0.25) table beside your class's own tallies, and see how far a ten-draw sample is allowed to drift from the probabilities that produced it.
Learning Objectives
By the end of this section, you will be able to:
- compare empirical data from a card-drawing experiment against the theoretical distribution the experiment is supposed to follow;
- compare a technology-generated simulation of that same experiment against the same theoretical distribution;
- explain what a long-term probability is, and why a run of only ten draws is allowed to miss it.
4.4.1 Stats Lab: Discrete Distribution (Playing Card Experiment)
This section is a lab, not a reading. In §4.3 you learned to write down a binomial distribution and compute its probabilities on paper. Here you will run the experiment those probabilities describe — draw a card, look at the suit, put it back, do it ten times — and then hold your own results up against the numbers the formula predicted.
Class Time:
Names:
You will end up with three pictures of the same experiment: the theoretical distribution the formula gives you, the empirical distribution your class actually got with real cards, and a simulated distribution a calculator produces in a few seconds. The whole point of the lab is that these three will not match, and that the way they fail to match is itself the lesson.
A fair coin lands heads half the time, and yet ten flips landing 7-3 surprises nobody. The same slack applies here: the formula says you should average 2.5 diamonds out of ten draws, and a group that gets 5 has not done anything wrong. Watch what happens when the class pools its results — the pooled tally sits much closer to the prediction than any single group's ten draws did.
Write down what you actually did, including anything that went sideways. If somebody forgot to reshuffle once, if a card stuck to another and two came out together, if a group ran nine draws instead of ten — record it. A lab report that hides its own irregularities cannot be checked by anyone, and being checkable is most of what makes a result worth anything.
Of the three distributions this lab produces — theoretical, empirical, and simulated — which ones would come out differently if your class ran the whole lab again tomorrow with a fresh deck? Explain what that tells you about which one you are allowed to call "the right answer".
Solution
Step 1 — ask what each one is built from. The theoretical distribution is computed from the deck's structure: 13 diamonds in 52 cards, ten replaced draws. Nothing in that computation looks at data.
Step 2 — check which ones depend on data. The empirical distribution is a tally of what the cards actually did today, and the simulated distribution is a tally of what the random number generator actually did today. Both are measurements.
Answer: the empirical and simulated distributions would both change; the theoretical one would not. That is why the theoretical distribution is the standard the other two get compared against — not because it is more accurate about your class, but because it is the only one of the three that is not a sample. It is worth being clear about the direction of that comparison: you are not checking whether the formula got your class right, you are checking whether your class's ten-draw sample landed where a sample from that formula should land.
4.4.2 Supplies
- One full deck of playing cards
- One programming calculator, or the random-number tool in a statistics app
4.4.3 Procedure
The probability of an event computed from the structure of the experiment itself, before any data is collected. For a well-described chance experiment with equally likely outcomes,
$$ P(\text{event}) = \frac{\text{number of outcomes in the event}}{\text{total number of outcomes}} $$After you replace the card and reshuffle, the deck is in exactly the state it was in before the draw. It has no record of having just handed you the ace of diamonds, and so it has no tendency to "make up for it" on the next draw. Every one of the ten draws is the first draw all over again.
It is a statement about the long run, not a prediction about any particular short run.
The experimental procedure for empirical data is to pick one card from a deck of shuffled cards.
- The theoretical probability of picking a diamond from a deck is _________.
- Shuffle a deck of cards.
- Pick one card from it.
- Record whether it was a diamond or not a diamond.
- Put the card back and reshuffle.
- Do this a total of ten times.
- Record the number of diamonds picked.
- Let \(X\) = number of diamonds. Theoretically, \(X \sim\) ______(_____,_____)
Step 5 is the one students skip, and it is the one that makes the arithmetic work. Because the card goes back before the next draw, every one of the ten draws faces the same full 52-card deck, so every draw has exactly the same chance of being a diamond and no draw tells you anything about the next one. That is sampling with replacement, and it is what lets you treat the ten draws as ten independent trials — the condition a binomial distribution requires.
Once you know the theoretical probability of a diamond, you know the whole distribution. The number of diamonds in ten independent draws, each with the same success probability, is exactly the setup §4.3 called binomial — so \(X\) is a binomial random variable and you can name its two parameters without collecting a single card.
The simulation. After you have run the ten real draws by hand, run the same experiment again with technology. Have your calculator or statistics app generate ten random whole numbers from 1 to 4, count how many of them come up as a chosen value (say, a 1), and treat that count as one simulated repetition of the experiment. Repeat until you have as many simulated repetitions as the class produced with real cards, so the two data sets are comparable. The point is not that the machine is more accurate — it is that the machine will happily give you a thousand repetitions while the deck gives you ten, and the difference between ten and a thousand is exactly what "long-term probability" means.
Fill in the two blanks from the Procedure section: what is the theoretical probability of drawing a diamond, and what are the two parameters of \(X\)?
Solution
Step 1 — count the diamonds. A standard deck has 52 cards in four suits of 13 each, so 13 of the 52 cards are diamonds.
$$ P(\text{diamond}) = \frac{13}{52} = \frac{1}{4} = 0.25 $$Step 2 — check the binomial conditions. There are ten draws, fixed in advance. Each draw is either a diamond (success) or not (failure). Because the card is replaced and the deck reshuffled, the draws are independent and the success probability stays at 0.25 for every one of them. All four conditions hold.
Step 3 — name the parameters. The number of trials is \(n = 10\) and the success probability is \(p = 0.25\).
Answer: the theoretical probability is \(0.25\), and \(X \sim B(10,\ 0.25)\). Notice how much the replacement step is carrying here. Without it, the second draw would face a 51-card deck whose composition depends on the first draw, \(p\) would drift from draw to draw, and \(X\) would be hypergeometric instead of binomial.
Put a number on what step 5 buys you. Find the probability that the first two draws are both diamonds, once with replacement and once without, and say which of the two the binomial formula assumes.
Solution
Step 1 — with replacement. The card goes back, so the second draw faces the same 52-card deck as the first and the two draws are independent.
$$ P(\text{both diamonds}) = \left(\frac{13}{52}\right)\left(\frac{13}{52}\right) = (0.25)(0.25) = 0.0625 $$Step 2 — without replacement. The first diamond is gone, so the second draw faces 51 cards of which only 12 are diamonds.
$$ P(\text{both diamonds}) = \left(\frac{13}{52}\right)\left(\frac{12}{51}\right) = (0.25)(0.2353) \approx 0.0588 $$Answer: 0.0625 with replacement and about 0.0588 without — and the binomial formula assumes the first one. The gap looks small, and on two draws it is. It is not small in principle: without replacement, the second draw's probability depends on the first draw's outcome, and dependence is the one thing the binomial model is not allowed to have. Replacing the card is not a fussy detail of lab procedure; it is the step that makes \(B(10,\ 0.25)\) the correct model rather than an approximation to one.
Try it in rāSHio
You do not need a programming calculator to run the simulation — open rāSHio and choose File → Random Numbers…, then set Min 1, Max 4, and How many 10; count how many 1s come back and that is one simulated repetition. One setting matters more than all the others here: leave No repeats unticked. The walkthrough below ticks it, because it is drawing distinct sample IDs — that is sampling without replacement. Your ten draws put the card back every time, so repeats are not just allowed, they are the whole point; ticking that box would break the independence the binomial model needs.
Figure 4.4.1 — Drawing the simulation’s random values in rāSHio: File → Random Numbers…
4.4.4 Organize the Data
The proportion of times an outcome actually occurred in a collected data set:
$$ RF(x) = \frac{\text{frequency of } x}{\text{total number of repetitions}} $$The P(x) column you are about to build comes out of a formula and will be the same for every class in every school forever. The RF(x) column comes out of your deck this afternoon and belongs to your class alone. When the lab asks you to compare them, it is asking how close a measurement got to the thing it was measuring.
Relative frequency is an empirical quantity — it is measured, not derived. Unlike a theoretical probability, its value changes every time you rerun the experiment.
The two columns are built to be compared, so build them the same way. Round every relative frequency to four decimal places, the same precision the theoretical table will use, and check that your relative frequencies add to 1.0000 before you go any further. If they do not, you have either lost a repetition or divided by the wrong total, and finding that now is much cheaper than finding it in the discussion questions.
- Record the number of diamonds picked for your class with playing cards in Table 4.4.1. Then calculate the relative frequency.
| X | Frequency | Relative Frequency |
|---|---|---|
| 0 | ||
| 1 | ||
| 2 | ||
| 3 | ||
| 4 | ||
| 5 | ||
| 6 | ||
| 7 | ||
| 8 | ||
| 9 | ||
| 10 |
Try it in rāSHio
Rather than tallying Table 4.4.1 by hand, paste your class’s ten-draw counts into rāSHio with File → Delimited List…, then choose Graph → Frequency Table and tick Discrete values so every whole number from 0 to 10 gets its own row — the relative frequency column is built for you.
Figure 4.4.2 — Building a discrete-value frequency table in rāSHio: Graph → Frequency Table.
- Calculate the following:
a. \(\bar{x} =\) _________
b. \(s =\) _________
- Construct a histogram of the empirical data. Put \(X\) — the number of diamonds — on the horizontal axis, running from 0 to 10, and the frequency on the vertical axis. Give the axis the label Number of diamonds and title the picture your empirical histogram, so you can refer to it in the discussion questions.
Try it in rāSHio
To draw the empirical histogram, keep your counts in the rāSHio spreadsheet and choose Graph → Histogram; set the bin start to 0 and the bin width to 1 so each bar is one value of \(X\). Re-run the same steps on the \(P(x)\) column to get the theoretical histogram on a matching scale.
Ms. Delgado's class splits into 30 groups, and each group runs the experiment once. She records these results: 2 groups got 0 diamonds, 5 got 1, 9 got 2, 7 got 3, 4 got 4, 2 got 5, and 1 got 6. Find the relative frequency of \(x = 2\), and find the sample mean \(\bar{x}\).
Solution
Step 1 — check the total. \(2 + 5 + 9 + 7 + 4 + 2 + 1 = 30\) repetitions, which matches the 30 groups she recorded.
Step 2 — take the relative frequency of 2.
$$ RF(x = 2) = \frac{9}{30} = 0.3000 $$Step 3 — find the mean by weighting each value by how often it happened.
$$ \bar{x} = \frac{0(2) + 1(5) + 2(9) + 3(7) + 4(4) + 5(2) + 6(1)}{30} = \frac{0 + 5 + 18 + 21 + 16 + 10 + 6}{30} = \frac{76}{30} \approx 2.5333 $$Answer: \(RF(x = 2) = 0.3000\) and \(\bar{x} \approx 2.5333\). That mean sits within a rounding error of the theoretical 2.5, which is what pooling 30 repetitions buys you. Any one of those 30 groups, looking only at its own ten draws, saw a whole number — 0, or 4, or 6 — and none of them saw 2.5 at all. The average is not a value the experiment can produce; it is a value the experiment's results cluster around.
Using the same 30-group data from Ms. Delgado's class, find the sample standard deviation \(s\).
Solution
Step 1 — get the sum of the squared values, weighted by frequency.
$$ \sum x^2 f = 0^2(2) + 1^2(5) + 2^2(9) + 3^2(7) + 4^2(4) + 5^2(2) + 6^2(1) = 0 + 5 + 36 + 63 + 64 + 50 + 36 = 254 $$Step 2 — subtract the part explained by the mean. With \(n = 30\) and \(\bar{x} \approx 2.5333\),
$$ s^2 = \frac{\sum x^2 f - n\bar{x}^2}{n - 1} = \frac{254 - 30(2.5333)^2}{29} = \frac{254 - 192.5333}{29} = \frac{61.4667}{29} \approx 2.1195 $$Step 3 — take the square root.
$$ s = \sqrt{2.1195} \approx 1.4559 $$Answer: \(s \approx 1.4559\). Hold that beside the theoretical \(\sigma \approx 1.3693\) you will compute in the next section. The sample came out slightly more spread out than the model predicts, which is the ordinary behavior of 30 repetitions — the standard deviation of a sample is itself a measurement, and it wobbles just like the mean does. Divide by \(n - 1\), not \(n\); this is a sample, not the whole population of every ten-draw run that could ever happen.
Try it in rāSHio
Once your counts are in the spreadsheet, rāSHio’s Stats → Summary Statistics returns \(\bar{x}\) and \(s\) for the number-of-diamonds column in one step, so you can check the two blanks in part 2 against the \(\mu\) and \(\sigma\) you compute from the formula later in this lab.
Figure 4.4.3 — Reading the mean and standard deviation in rāSHio: Stats → Summary Statistics.
4.4.5 Theoretical Distribution
a. Build the theoretical PDF chart based on the distribution in the Procedure section.
| X | P(x) |
|---|---|
| 0 | |
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 |
b. Calculate the following:
a. \(\mu =\) _________
b. \(\sigma =\) _________
c. Construct a histogram of the theoretical distribution. Use the same horizontal axis, the same axis label, and the same scale you used for the empirical histogram, and title it your theoretical histogram. Drawing the two pictures at different scales is the single easiest way to fool yourself about how well they agree.
Every entry in the \(P(x)\) column comes from the binomial probability formula of §4.3, with \(n = 10\) and \(p = 0.25\):
$$ P(X = x) = \binom{10}{x}(0.25)^x (0.75)^{10-x} $$and the mean and standard deviation come from the binomial shortcuts \(\mu = np\) and \(\sigma = \sqrt{npq}\), where \(q = 1 - p\). You do not have to compute all eleven probabilities by hand — a calculator's binomial PDF command fills the column in one pass — but compute two or three of them the long way first, so you know what the command is doing for you.
Getting all ten draws to come up diamonds has probability \(0.25^{10}\), which is about one chance in a million. That is not zero. A probability table that rounds it to 0.0000 is telling you the outcome is rare, not that it is impossible, and the difference matters the day somebody's class actually rolls one.
Compute \(P(X = 2)\) from the formula, then find \(\mu\) and \(\sigma\) for this distribution.
Solution
Step 1 — count the arrangements. Two diamonds among ten draws can happen in \(\binom{10}{2} = \frac{10 \times 9}{2} = 45\) different orders.
Step 2 — take the probability of any one such order and multiply.
$$ P(X = 2) = 45 (0.25)^2 (0.75)^8 = 45 (0.0625)(0.1001) \approx 0.2816 $$Step 3 — use the binomial shortcuts for the center and spread.
$$ \mu = np = 10(0.25) = 2.5 $$ $$ \sigma = \sqrt{npq} = \sqrt{10(0.25)(0.75)} = \sqrt{1.875} \approx 1.3693 $$Answer: \(P(X = 2) \approx 0.2816\), \(\mu = 2.5\), and \(\sigma \approx 1.3693\). Compare that \(\mu\) to the \(\bar{x}\) your class computed and that \(\sigma\) to your \(s\). They are answering the same question — where is the center, how spread out is it — from two completely different directions, one from the formula and one from the cards.
Try it in rāSHio
Filling all eleven rows of Table 4.4.2 by hand is a lot of arithmetic — open rāSHio and choose Calculators → Binomial, set Trials 10 and Probability 0.25, then pick the Exact (P(X = k)) tab and step \(k\) from 0 to 10 to read each row of the \(P(x)\) column. The walkthrough below demonstrates the calculator in its At Least mode on different numbers, so use it for where the controls live rather than for this table's values. It reports probabilities only — \(\mu\) and \(\sigma\) for part b still come from \(np\) and \(\sqrt{npq}\).
Figure 4.4.4 — Building a binomial probability table in rāSHio: Calculators → Binomial.
Compute \(P(X = 0)\), and explain what the eleven entries of the \(P(x)\) column must add to and why.
Solution
Step 1 — apply the formula with \(x = 0\). There is exactly one way to get no diamonds at all, and \((0.25)^0 = 1\), so the whole expression collapses to the probability that all ten draws miss.
$$ P(X = 0) = \binom{10}{0}(0.25)^0(0.75)^{10} = (0.75)^{10} \approx 0.0563 $$Step 2 — ask what the column covers. The values 0 through 10 are every number of diamonds ten draws could possibly produce. There is no twelfth outcome and no overlap between any two of them.
Answer: \(P(X = 0) \approx 0.0563\), and the column must add to exactly 1. That is the definition of a probability distribution function doing its job — §4.1's requirement that the probabilities of a discrete random variable are each between 0 and 1 and sum to 1. Use it as your check: if your eleven entries total 0.9987 or 1.0021 you have a rounding artifact and can move on, but if they total 0.87 you have dropped or mis-entered a row, and the histogram you build next will be wrong in a way that is hard to see by eye.
The theoretical distribution says \(P(X = 2) \approx 0.2816\). If 30 groups each run the experiment once, how many of them should get exactly 2 diamonds? Compare that to the 9 groups in Ms. Delgado's class who actually did, back in Try It Now 4.4.4.
Solution
Step 1 — turn a probability into an expected count. Multiply the probability of the outcome by the number of repetitions.
$$ 30 \times 0.2816 = 8.448 $$Step 2 — put it beside the observed count. The class observed 9 groups at \(x = 2\), against an expected 8.448.
Answer: about 8.4 groups were expected and 9 were observed — a difference of roughly half a group. Two things are worth noticing. The expected count is not a whole number even though the observed count has to be, which is the same "you cannot draw 2.5 diamonds" point from a different angle. And this is the arithmetic that turns "the graphs look similar" into something you can defend: instead of comparing two pictures by eye in the discussion questions, compare each bar's observed count against \(30 \times P(x)\) and say which bars are off and by how much.
4.4.6 Using the Data
From here on, \(P(x)\) always means a probability read off the theoretical table, and \(RF(x)\) always means a relative frequency read off your class's empirical table. The questions below come in matched pairs on purpose: the same three events, answered first from the formula and then from the deck.
Use the table from the Theoretical Distribution section to calculate the following answers. Round your answers to four decimal places.
\(P(x = 3) =\) _________
\(P(1 < x < 4) =\) _________
\(P(x \geq 8) =\) _________
Use the data from the Organize the Data section to calculate the following answers. Round your answers to four decimal places.
\(RF(x = 3) =\) _________
\(RF(1 < x < 4) =\) _________
\(RF(x \geq 8) =\) _________
Read the inequalities carefully before you add anything up. \(1 < x < 4\) is a strict inequality on both ends, so it covers \(x = 2\) and \(x = 3\) only — 1 and 4 are outside it. \(x \geq 8\) does include 8, so it covers 8, 9, and 10. Getting an endpoint wrong here changes the answer far more than any rounding decision will, and it is the mistake that shows up most often in this lab.
Using the theoretical distribution \(X \sim B(10,\ 0.25)\), compute \(P(1 < x < 4)\) and \(P(x \geq 8)\) to four decimal places.
Solution
Step 1 — translate each inequality into a list of values. \(1 < x < 4\) means \(x \in \{2, 3\}\). And \(x \geq 8\) means \(x \in \{8, 9, 10\}\).
Step 2 — add the probabilities for the first event.
$$ P(1 < x < 4) = P(2) + P(3) = 0.2816 + 0.2503 = 0.5319 $$Step 3 — add the probabilities for the second event.
$$ P(x \geq 8) = P(8) + P(9) + P(10) = 0.0004 + 0.0000 + 0.0000 = 0.0004 $$Answer: \(P(1 < x < 4) = 0.5319\) and \(P(x \geq 8) = 0.0004\). Those two numbers say something worth pausing on: more than half of all classes will land on 2 or 3 diamonds, while fewer than 1 class in 2,000 will land on 8 or more. If your class did get 8 or more, you have not broken statistics — you have met the tail, and that is a better lab result than the boring one.
Now do the empirical half with the 30-group data Ms. Delgado recorded in Try It Now 4.4.4 (2 groups at 0, 5 at 1, 9 at 2, 7 at 3, 4 at 4, 2 at 5, 1 at 6). Compute \(RF(x = 3)\), \(RF(1 < x < 4)\), and \(RF(x \geq 8)\), and hold each beside its theoretical partner.
Solution
Step 1 — take each count over the 30 repetitions.
$$ RF(x = 3) = \frac{7}{30} \approx 0.2333 \qquad RF(1 < x < 4) = \frac{9 + 7}{30} = \frac{16}{30} \approx 0.5333 $$Step 2 — handle the empty event. No group in this class got 8, 9, or 10 diamonds, so the count is 0.
$$ RF(x \geq 8) = \frac{0}{30} = 0.0000 $$Step 3 — line the three pairs up. Theoretical 0.2503 against empirical 0.2333; theoretical 0.5319 against empirical 0.5333; theoretical 0.0004 against empirical 0.0000.
Answer: \(RF(x = 3) \approx 0.2333\), \(RF(1 < x < 4) \approx 0.5333\), \(RF(x \geq 8) = 0.0000\) — close on the first two for her class, and dead-on for the middle one. The third pair is the interesting one, and it is where students most often write the wrong conclusion. An empirical relative frequency of 0 does not mean the event is impossible; it means 30 repetitions were nowhere near enough to see something that happens about four times in ten thousand. A rare event's relative frequency will read 0.0000 in almost every small sample, which is exactly why you need the theoretical column to know it is there at all.
4.4.7 Discussion Questions
For questions 1 and 2, think about the shapes of the two graphs, the probabilities, the relative frequencies, the means, and the standard deviations.
- Knowing that data vary, describe three similarities between the graphs and distributions of the theoretical, empirical, and simulation distributions. Use complete sentences.
- Describe the three most significant differences between the graphs or distributions of the theoretical, empirical, and simulation distributions.
- Using your answers from questions 1 and 2, does it appear that the two sets of data fit the theoretical distribution? In complete sentences, explain why or why not.
- Suppose that the experiment had been repeated 500 times. Would you expect Table 4.4.1 or Table 4.4.2 to change, and how would it change? Why wouldn't the other table(s) change?
Work question 4 above all the way through for yourself before you discuss it. Which of the two tables changes when the experiment is repeated 500 times instead of 30, in which direction, and what stays fixed?
Solution
Step 1 — identify what each table is made of. Table 4.4.1 holds frequencies and relative frequencies, which are counts of what actually happened. Table 4.4.2 holds \(P(x)\) values computed from \(n = 10\) and \(p = 0.25\).
Step 2 — see which one has data in it. Only Table 4.4.1 does. Table 4.4.2 never looks at the deck, so running the experiment more times cannot move a single entry in it.
Step 3 — say which direction Table 4.4.1 moves. With 500 repetitions instead of 30, each relative frequency is an average over many more trials, so the whole column settles closer to the matching \(P(x)\) — including \(RF(x \geq 8)\), which would finally start showing something other than 0.
Answer: Table 4.4.1 changes and Table 4.4.2 does not; the empirical relative frequencies tighten around the theoretical probabilities, and the empirical histogram takes on the theoretical one's shape. This is the whole meaning of "long-term probability" and it is the lab's real payoff. The 0.25 was never a promise about your ten draws — it was a promise about what the fraction of diamonds does as the number of draws grows. Ten draws cannot show you that. Five hundred can start to.
Key Terms
empirical probability — the relative frequency with which an outcome actually occurred in collected data; a measured quantity that changes each time the experiment is rerun.
long-term probability — the value a relative frequency settles toward as the number of repetitions grows large; what a theoretical probability is a statement about.
relative frequency — the frequency of an outcome divided by the total number of repetitions.
sampling with replacement — returning each selected item to the population before the next selection, so every trial faces the same population and the trials stay independent.
simulation — a technology-generated imitation of a chance experiment, used to produce many more repetitions than could be collected by hand.
theoretical probability — the probability of an outcome computed from the structure of the experiment rather than from data.