Introduction to Statistics · Chapter 4 · Random Variables

Continuous Distribution

A lab, not a reading: generate fifty values from a random number generator, then hold your empirical distribution up against the uniform theory that is supposed to describe it.


bookSHelf  ·  Introduction to Statistics  ·  §4.6  ·  a self-paced section

Continuous Distribution · bookSHelf Intro Stats§4.6

Learning objectives — by the end of this section you will be able to

Objectives

  1. Compare and contrast empirical data from a random number generator against the uniform distribution it is supposed to follow Definitions 4.6.1–4.6.2
  2. Compute the mean, standard deviation, quartiles, and median of a continuous uniform distribution from its endpoints §4.6.5
  3. Explain why a run of 50 generated values is allowed to miss the theoretical values it is being compared against §4.6.7
4.6

§4.6.1 — Stats Lab: Continuous Distribution

This section is a lab, not a reading. In §4.5 you learned to write down a uniform distribution and compute probabilities from its endpoints. Here you will generate the numbers that distribution describes — 50 of them, straight out of a random number generator — and then hold your own results up against what the formula predicted.

You will end up with two pictures of the same thing: the theoretical distribution the formula gives you, and the empirical distribution your 50 generated values actually produced. The whole point of the lab is that these two will not match exactly, and that the size and direction of the mismatch is itself the lesson.

Continuous Distribution · bookSHelf Intro Stats§4.6

§4.6.1 — naming the two distributions

Empirical Distribution

Definition 4.6.1 — Empirical Distribution

The distribution you get by tallying data you actually collected — the frequencies, relative frequencies, and summary statistics of a real sample. An empirical distribution is measured, so it changes every time the experiment is rerun.

Its counterpart is the theoretical distribution, which is computed from the structure of the experiment before any data is collected and does not change when you rerun anything.

Write down what you actually did, including anything that went sideways — a calculator left at two decimal places, a deleted 51st value. 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.

Continuous Distribution · bookSHelf Intro Stats§4.6

Your turn — which distribution is allowed to change

Try It Now 4.6.1

Try It Now 4.6.1 — theoretical or empirical?

Of the two distributions this lab produces — theoretical and empirical — which one would come out differently if you ran the whole lab again tomorrow? Explain what that tells you about which one you are allowed to call "the right answer".


Step 1 — ask what each one is built from. The theoretical distribution is computed from the generator's design: it is set to produce values between 0 and 1, with no value favored over any other. Nothing in that computation looks at data.

Step 2 — check which one depends on data. The empirical distribution is a tally of the 50 numbers the generator actually handed you this afternoon. It is a measurement.

Answer: the empirical distribution would change and the theoretical one would not. That is why the theoretical distribution is the standard the other one gets compared against — not because it is more accurate about your 50 values, but because it is the only one of the two that is not a sample. You are checking whether your 50-value sample landed where a sample from that formula should land, not whether the formula got your run right.

Continuous Distribution · bookSHelf Intro Stats§4.6

§4.6.2 — the task

Collect the Data

Use a random number generator to generate 50 values between zero and one (inclusive). List them in Tables 4.6.1–4.6.2. Round the numbers to four decimal places, or set your calculator's MODE to four places so the rounding happens for you.

Then calculate the sample mean xˉ\bar{x}, the sample standard deviation ss, and the first quartile, third quartile, and median of your 50 values.

Continuous Distribution · bookSHelf Intro Stats§4.6

Try it in rāSHio — generating your 50 values

You do not need a graphing calculator for this step — open rāSHio and choose File → Random Numbers…. rāSHio draws whole numbers, so ask it for 50 values with Min 0, Max 9999 and How many 50, then divide each by 10,000 to land in the 0-to-1 range at exactly the four decimal places this lab asks for. Leave No repeats unticked: the values are drawn independently, so a repeat is allowed and forbidding one would quietly bias your sample.

Continuous Distribution · bookSHelf Intro Stats§4.6

Figure 4.6.1

Generating the 50 values

File → Random Numbers…

Set the minimum, maximum, and how many values to draw, and read off the generated whole numbers — divide each by 10,000 for a four-decimal value between 0 and 1.

Figure 4.6.1: Generating the lab's 50 values in rāSHio: File → Random Numbers…

Continuous Distribution · bookSHelf Intro Stats§4.6

§4.6.2 — recording what you generate

Table 4.6.1 — values 1 through 25

1–56–1011–1516–2021–25
     
     
     
     
     

Table 4.6.1: Your 50 generated values, rounded to four decimal places.

Sort the 50 values before you touch the quartiles — the next slide walks through why.

Continuous Distribution · bookSHelf Intro Stats§4.6

§4.6.2 — recording what you generate

Table 4.6.2 — values 26 through 50

26–3031–3536–4041–4546–50
     
     
     
     
     

Table 4.6.2: Values 26 through 50, same four-decimal rounding.

Continuous Distribution · bookSHelf Intro Stats§4.6

Context Pause — four decimal places is not fussiness

The theoretical values you will compare against are 0.2500, 0.5000, and 0.7500. Round your data to two places and a quartile of 0.2537 becomes 0.25 — a perfect match you did not actually earn. Matching precision on both sides is what keeps the comparison honest.

Continuous Distribution · bookSHelf Intro Stats§4.6

§4.6.2 — finding a quartile is finding a position

Sort first, then count positions

  1. Sort the 50 values before you touch the quartiles — every one of the five statistics except xˉ\bar{x} and ss is read off a position in the sorted list.
  2. With an even count of 50, the median is the average of the 25th and 26th values.
  3. The first quartile is the median of the lowest 25 values; the third quartile is the median of the highest 25.

Doing this by hand once is worth it — it shows you that a quartile is a location in the data rather than a formula applied to it, which is exactly why a quartile of the generated data can drift away from the theoretical quartile without anything being wrong.

Continuous Distribution · bookSHelf Intro Stats§4.6

Try it in rāSHio — sorting your 50 values

Sorting 50 four-decimal values by hand is where copying mistakes creep in. Paste your column into rāSHio with File → Delimited List…, then choose Transform → Sort to put them in order — and count the positions yourself from there. The 25th and 26th values give the median, the median of the lowest 25 gives the first quartile, and the median of the highest 25 gives the third. Sorting is the mechanical part; locating a quartile is the part worth doing by hand once.

Continuous Distribution · bookSHelf Intro Stats§4.6

Figure 4.6.2

Ordering the 50 values

Transform → Sort

Paste a column of values and rāSHio puts them into ascending order — the mechanical part of finding a quartile, so counting positions is all that is left to do by hand.

Figure 4.6.2: Ordering the lab's 50 values in rāSHio: Transform → Sort.

Continuous Distribution · bookSHelf Intro Stats§4.6

Try it in rāSHio — checking your five blanks at once

Once the column is sorted, check all five of your part-2 blanks at once: rāSHio's Stats → Summary Statistics returns the mean, the standard deviation, the median, and both quartiles for the selected column in one step. Use it to CHECK the numbers you worked out, not to replace them — if the tool and your hand count disagree on a quartile, you have found either a mis-sorted value or a position you counted off by one, and both are worth finding now.

Continuous Distribution · bookSHelf Intro Stats§4.6

Figure 4.6.3

Checking your five blanks

Stats → Summary Statistics

Reads back the mean, standard deviation, median, and both quartiles for a selected column in one step — a check on your hand count, not a replacement for it.

Figure 4.6.3: Checking the five part-2 blanks in rāSHio: Stats → Summary Statistics.

Continuous Distribution · bookSHelf Intro Stats§4.6

Your turn — twelve sorted values

Try It Now 4.6.2

Try It Now 4.6.2 — Hannah's pilot run

Hannah ran a short pilot before the real lab and generated only twelve values, already sorted: 0.0412, 0.1187, 0.2043, 0.2765, 0.3391, 0.4508, 0.5624, 0.6130, 0.7042, 0.8219, 0.8873, 0.9564. Find the median, the first quartile, and the third quartile.


Step 1 — median. Twelve values, so the median sits between the 6th and 7th: median=0.4508+0.56242=0.5066 \text{median} = \frac{0.4508 + 0.5624}{2} = 0.5066

Step 2 — Q1Q_1 from the lower half. The lowest six values run 0.0412–0.4508; their median is the average of the 3rd and 4th: Q1=0.2043+0.27652=0.2404 Q_1 = \frac{0.2043 + 0.2765}{2} = 0.2404

Step 3 — Q3Q_3 from the upper half. The highest six run 0.5624–0.9564; their median is the average of the 9th and 10th overall: Q3=0.7042+0.821920.7631 Q_3 = \frac{0.7042 + 0.8219}{2} \approx 0.7631

Answer: median =0.5066= 0.5066, Q1=0.2404Q_1 = 0.2404, Q3=0.7631Q_3 = 0.7631. Hold those against the theoretical 0.5000, 0.2500, 0.7500 — each is off by less than 0.015 from a sample of only twelve. The sample does not land on the theoretical value, it lands near it.

Continuous Distribution · bookSHelf Intro Stats§4.6

Your turn — the sample mean

Try It Now 4.6.3

Try It Now 4.6.3 — Hannah's twelve values, averaged

Using the same twelve values from Hannah's pilot, find the sample mean xˉ\bar{x}.


Step 1 — add the twelve values. 0.0412+0.1187+0.2043+0.2765+0.3391+0.4508+0.5624+0.6130+0.7042+0.8219+0.8873+0.9564=5.9758 0.0412+0.1187+0.2043+0.2765+0.3391+0.4508+0.5624+0.6130+0.7042+0.8219+0.8873+0.9564 = 5.9758

Step 2 — divide by the count. xˉ=5.9758120.4980 \bar{x} = \frac{5.9758}{12} \approx 0.4980

Answer: xˉ0.4980\bar{x} \approx 0.4980, within 0.002 of the theoretical mean 0.5000. Do not read that as "twelve values is plenty" — it is one run, and a different twelve values could easily have come out at 0.44 or 0.56. What the mean does reliably is sit near the center; how near depends on how many values you averaged.

Continuous Distribution · bookSHelf Intro Stats§4.6

Your turn — the sample standard deviation

Try It Now 4.6.4

Try It Now 4.6.4 — Cole's spread

Hannah's lab partner Cole takes the same twelve values and works out the sample standard deviation ss. Do it with him: their sum is 5.9758 and the sum of their squares is 4.0176696.


Step 1 — subtract the part explained by the mean. With n=12n=12 and xˉ0.4980\bar{x}\approx0.4980, s2=x2nxˉ2n1=4.017669612(0.49798)2111.0419110.0947 s^2 = \frac{\sum x^2 - n\bar{x}^2}{n-1} = \frac{4.0176696 - 12(0.49798)^2}{11} \approx \frac{1.0419}{11} \approx 0.0947

Step 2 — take the square root. s=0.09470.3078 s = \sqrt{0.0947} \approx 0.3078

Answer: s0.3078s \approx 0.3078, against a theoretical σ0.2887\sigma \approx 0.2887 — about 7% more spread out than the model predicts. Divide by n1n-1, not nn: these twelve values are a sample, not every value the generator could ever produce. And ss drifted further from σ\sigma than xˉ\bar{x} did from μ\mu — built from squared distances, a single value out near an end moves it more than it moves the mean.

Continuous Distribution · bookSHelf Intro Stats§4.6

§4.6.3 — the task

Organize the Data

Construct two histograms of your empirical data: one with eight bars, one with five — same horizontal axis, running from 0 to 1, same axis label. Title them your eight-bar histogram and your five-bar histogram so you can refer to them in the discussion question.

Both histograms show the same 50 numbers. Nothing about the data changes between them — the only thing that changes is how wide a slice of the interval each bar is allowed to cover, and therefore how many of your 50 values land in it.

Continuous Distribution · bookSHelf Intro Stats§4.6

Try it in rāSHio — drawing both histograms

Draw both histograms in rāSHio rather than by hand, so the only thing that differs between them is the bar count. With your values in the spreadsheet choose Graph → Histogram, set the bin start to 0 and the bin width to 0.125 for the eight-bar version, then re-run it at width 0.2 for the five-bar version. Keeping the same axis on both is what makes the shape comparison mean anything.

Continuous Distribution · bookSHelf Intro Stats§4.6

Insight Note — a histogram is a decision, not a photograph

Two people, two honest pictures

Two people can draw honest, correct histograms of identical data and get pictures that look different, because the bar width is theirs to pick. That is why the lab makes you draw both — so you see the choice before you draw a conclusion from it.

Continuous Distribution · bookSHelf Intro Stats§4.6

Your turn — widths and expected counts

Try It Now 4.6.5

Try It Now 4.6.5 — eight bars, then five

For 50 values generated between 0 and 1, find the width of each bar and the number of values you would expect in each bar, first for eight bars and then for five.


Step 1 — bar widths. The interval from 0 to 1 has length 1, split into equal pieces: eight bars: 18=0.125five bars: 15=0.2 \text{eight bars: } \frac{1}{8}=0.125 \qquad \text{five bars: } \frac{1}{5}=0.2

Step 2 — width to expected count. Every value between 0 and 1 is equally likely, so the chance of landing in a bar is exactly that bar's width, and the expected count is 50 times the width: 50(0.125)=6.2550(0.2)=10 50(0.125)=6.25 \qquad 50(0.2)=10

Answer: eight bars of width 0.125 with 6.25 values expected in each, five bars of width 0.2 with 10 expected. No bar can hold a quarter of a value — an expected count is an average over many reruns of the lab, not a prediction of what any one histogram will show, which is exactly why a bar holding 4 or 9 is not evidence the generator is broken.

Continuous Distribution · bookSHelf Intro Stats§4.6

§4.6.4 — the task

Describe the Data

In two to three complete sentences, describe the shape of each graph: does it go straight across, have a V shape, a hump in the middle or at either end? Draw a smooth curve roughly through the top of the bars to help you see it — then describe how changing the number of bars might change the shape.

The shape you are hoping to see is flat — every bar about the same height — because that is what "every value is equally likely" looks like once you draw it. What you will actually see is a ragged version of flat. Describing the shape well means naming the flat trend and the raggedness, rather than picking one and pretending the other is not there.

Continuous Distribution · bookSHelf Intro Stats§4.6

Your turn — how two correct descriptions differ

Try It Now 4.6.6

Try It Now 4.6.6 — Aiko and Imani disagree, politely

Two students describe the same 50 values. Aiko says the eight-bar histogram she drew is "roughly flat with some bounce". Imani says the five-bar histogram they drew is "clearly flat". Both are looking at correct histograms of the same data. Explain how both descriptions can be right.


Step 1 — compare expected counts. Aiko's eight bars expect 6.25 values each; Imani's five bars expect 10 each.

Step 2 — ask how much a bar can wobble. A bar 3 above expectation is off by about half its height at 6.25, but only about a third of its height at 10 — the same absolute wobble looks bigger on a shorter bar.

Step 3 — see what wider bars do. Widening the bars pools more values into each one, and pooling averages the wobble out.

Answer: both are right — Imani's fewer, wider bars smooth the picture, while Aiko's more, narrower bars expose the run-to-run variation. Neither histogram is more truthful; they trade detail against steadiness. "The data looks uniform" is partly a statement about the data and partly a statement about how you chose to draw it.

Continuous Distribution · bookSHelf Intro Stats§4.6

§4.6.5 — the fixed standard

Theoretical Distribution

Every one of the five theoretical numbers ahead comes out of the two endpoints a=0a=0 and b=1b=1, and nothing else. The generator never gets consulted — you could compute all five of these on the bus this morning, before anyone in the room had generated a single value.

The quartiles and the median all come from the cumulative distribution function. For XU(0,1)X\sim U(0,1), P(Xx)=xP(X\le x)=x, so the number with 25% of the distribution below it is 0.25, with half below it is 0.5, and with 75% below it is 0.75 — on U(0,1)U(0,1) the percentile and the value coincide, a coincidence of this particular distribution, not a general rule.

Continuous Distribution · bookSHelf Intro Stats§4.6

§4.6.5 — writing down the model

Continuous Uniform Distribution

Definition 4.6.2 — Continuous Uniform Distribution

A continuous random variable XX with equally likely outcomes over the domain a<x<ba < x < b, written XU(a,b)X \sim U(a,b). Its probability density function, mean, and standard deviation are

f(x)=1bafor axb,μ=a+b2,σ=(ba)212 f(x) = \frac{1}{b-a} \quad \text{for } a \le x \le b, \qquad \mu = \frac{a+b}{2}, \qquad \sigma = \sqrt{\frac{(b-a)^2}{12}}

and its cumulative distribution function is P(Xx)=xabaP(X \le x) = \dfrac{x-a}{b-a}.

Here a=0a=0 and b=1b=1, so XU(0,1)X \sim U(0,1) — the distribution the lab's 50 generated values are supposed to follow.

Continuous Distribution · bookSHelf Intro Stats§4.6

Insight Note — the endpoints are the whole story

Nothing else to know

Every number in the Theoretical Distribution section comes out of a=0a=0 and b=1b=1 — the mean, the spread, and all three quartiles. A uniform distribution has nothing else to know, which is exactly what makes it a clean standard to test a generator against.

Continuous Distribution · bookSHelf Intro Stats§4.6

Your turn — the theoretical mean and spread

Try It Now 4.6.7

Try It Now 4.6.7μ\mu and σ\sigma for U(0,1)U(0,1)

Compute μ\mu and σ\sigma for XU(0,1)X \sim U(0,1).


Step 1 — identify the endpoints. a=0a=0, b=1b=1.

Step 2 — the mean. μ=a+b2=0+12=0.5 \mu = \frac{a+b}{2} = \frac{0+1}{2} = 0.5

Step 3 — the standard deviation. σ=(ba)212=1120.2887 \sigma = \sqrt{\frac{(b-a)^2}{12}} = \sqrt{\frac{1}{12}} \approx 0.2887

Answer: μ=0.5\mu = 0.5, σ0.2887\sigma \approx 0.2887 — a good deal smaller than the 0.5 half-width of the interval. The uniform distribution's shape shows up in that number: values are spread evenly rather than piled at the two ends, so a typical value sits about 0.29 from the center rather than the 0.5 you'd get if every value sat at 0 or 1.

Continuous Distribution · bookSHelf Intro Stats§4.6

Your turn — reading quartiles off the cdf

Try It Now 4.6.8

Try It Now 4.6.8Q1Q_1, median, Q3Q_3 for U(0,1)U(0,1)

Use the cumulative distribution function to find the first quartile, the median, and the third quartile of XU(0,1)X \sim U(0,1).


Step 1 — write the cdf. P(Xx)=xaba=x010=x P(X \le x) = \frac{x-a}{b-a} = \frac{x-0}{1-0} = x

Step 2 — set it to each target proportion. Q1Q_1 has 0.25 below it, so solve x=0.25x=0.25; the median has 0.50, so x=0.50x=0.50; Q3Q_3 has 0.75, so x=0.75x=0.75.

Answer: Q1=0.2500Q_1 = 0.2500, median =0.5000= 0.5000, Q3=0.7500Q_3 = 0.7500 — the four-decimal values your sorted 50 values get held up against. The median equals the mean here because the uniform distribution is symmetric, a fact that will stop being true the moment you meet a skewed distribution.

Continuous Distribution · bookSHelf Intro Stats§4.6

Your turn — is Hannah's pilot close?

Try It Now 4.6.9

Try It Now 4.6.9 — twelve values against the theoretical four

Hannah's twelve pilot values gave xˉ0.4980\bar{x} \approx 0.4980, median =0.5066=0.5066, Q1=0.2404Q_1=0.2404, Q3=0.7631Q_3=0.7631. Are the empirical values close to the theoretical ones, and why or why not?


Step 1 — line the pairs up. Mean 0.4980 vs. 0.5000; median 0.5066 vs. 0.5000; Q1Q_1 0.2404 vs. 0.2500; Q3Q_3 0.7631 vs. 0.7500.

Step 2 — measure each gap. The gaps are 0.0020, 0.0066, 0.0096, and 0.0131 — all under 0.014, on a scale where the whole distribution is only 1 wide.

Answer: yes, close — every statistic is within about 1.3% of the width of the distribution. They are not exact because the empirical values are measurements of a random sample while the theoretical values are computed from the generator's design; the quartiles drifted more than the mean, which is normal — each quartile is pinned by the position of just two of the twelve values, so it is the shakier estimate of the pair.

Continuous Distribution · bookSHelf Intro Stats§4.6

§4.6.6 — the task

Plot the Data

Construct a box plot of the data — use a ruler to scale accurately and draw straight edges. Then say whether you notice any potential outliers, and justify your answer numerically: compute both fences from your own quartiles and say which of your 50 values, if any, fall outside them.

Write both fence values down even when nothing crosses them, because "no outliers" is a claim, and the fences are the evidence for it.

Continuous Distribution · bookSHelf Intro Stats§4.6

§4.6.6 — flagging a value for a second look

Potential Outlier

Definition 4.6.3 — Potential Outlier

A data value that falls unusually far from the middle half of the data. Using the interquartile range IQR=Q3Q1IQR = Q_3 - Q_1, a value xx is a potential outlier when

x<Q11.5(IQR)orx>Q3+1.5(IQR) x < Q_1 - 1.5(IQR) \quad \text{or} \quad x > Q_3 + 1.5(IQR)

The two boundary values are called the fences. Anything outside them is flagged for a second look, not automatically thrown away.

Figure 4.6.4: Checking the lab's box plot in rāSHio: Graph → Box Plot.

Continuous Distribution · bookSHelf Intro Stats§4.6

Try it in rāSHio — checking your box plot

rāSHio's Graph → Box Plot draws the five-number summary for your sorted column and marks any value outside the fences as a separate point, so you can check your hand-drawn plot against it. Read the tool as a second opinion on the picture, not as the justification — the lab wants the two fence values written out, and those come from your own Q1Q_1, Q3Q_3, and IQRIQR.

Continuous Distribution · bookSHelf Intro Stats§4.6

Your turn — can the theoretical distribution have outliers?

Try It Now 4.6.10

Try It Now 4.6.10 — fences for U(0,1)U(0,1)

Compute the two outlier fences for the theoretical distribution XU(0,1)X \sim U(0,1), and say what they imply about finding outliers in this lab.


Step 1 — the theoretical IQRIQR. IQR=Q3Q1=0.750.25=0.50 IQR = Q_3 - Q_1 = 0.75 - 0.25 = 0.50

Step 2 — the fences. Q11.5(IQR)=0.250.75=0.50Q3+1.5(IQR)=0.75+0.75=1.50 Q_1 - 1.5(IQR) = 0.25 - 0.75 = -0.50 \qquad Q_3 + 1.5(IQR) = 0.75 + 0.75 = 1.50

Answer: the fences sit at 0.50-0.50 and 1.501.50 — outside the 0-to-1 interval the generator can ever produce — so no value it produces could ever be flagged as a potential outlier. That is a real property of the uniform distribution: with the data spread evenly and no tails, there is nothing far from the middle for the rule to catch. If your own sample's fences do flag a value, look at it — a typo or a mis-entered decimal is the likelier explanation, not a surprising draw.

Continuous Distribution · bookSHelf Intro Stats§4.6

§4.6.7 — the task

Compare the Data

For each of the minimum, first quartile, median, third quartile, maximum, width of the IQRIQR, and overall shape, use a complete sentence to compare the value from your data to the theoretical value you expected — then say how the box plot fits or does not fit what you would expect of U(0,1)U(0,1).

Parts b through d are matched pairs, answered the same way each time: state your value, state the theoretical value, and say how far apart they are in the units of the data.

Continuous Distribution · bookSHelf Intro Stats§4.6

Context Pause — the minimum and maximum are the odd ones out

The theoretical distribution has no smallest or largest value it expects — it runs right up to 0 and 1 without ever promising to reach them. Your sample's minimum is whichever of 50 draws happened to land lowest, so "close to 0" is the most you can ask of it.

Continuous Distribution · bookSHelf Intro Stats§4.6

Your turn — write up the comparison

Try It Now 4.6.11

Try It Now 4.6.11 — Mateo's write-up

Mateo is writing up Hannah's pilot for the class. Her twelve values gave Q1=0.2404Q_1=0.2404 and Q3=0.7631Q_3=0.7631, with a minimum of 0.0412 and a maximum of 0.9564. Answer parts b (Q1Q_1), d (Q3Q_3), e (maximum), and f (width of IQRIQR) as he would.


b. Q1=0.2404Q_1 = 0.2404 vs. theoretical 0.2500 — 0.0096 lower than expected.

d. Q3=0.7631Q_3 = 0.7631 vs. theoretical 0.7500 — 0.0131 higher than expected.

e. Maximum 0.9564, 0.0436 short of the top of the interval — expected, since landing in the top 4% of the range takes a lucky draw with only twelve.

f. IQR=0.76310.2404=0.5227 IQR = 0.7631 - 0.2404 = 0.5227 against a theoretical 0.5000 — about 4.5% wider.

Answer: both quartiles drifted outward, so of course the distance between them grew — reporting the IQRIQR gap as a separate surprise, when it is just the sum of the two quartile gaps already reported, is the most common way this part gets written up wrong.

Continuous Distribution · bookSHelf Intro Stats§4.6

§4.6.8 — discuss with your group

Suppose the number of values generated was 500, not 50. How would that affect what you would expect the empirical data to be, and the shape of its graph to look like?

Continuous Distribution · bookSHelf Intro Stats§4.6

Your turn — work it through before you discuss it

Try It Now 4.6.12

Try It Now 4.6.12 — 50 values versus 500

Which of your two columns — empirical or theoretical — changes when you generate 500 values instead of 50, in which direction, and what stays fixed?


Step 1. The empirical column holds xˉ\bar{x}, ss, the quartiles, and the median of numbers the generator actually produced. The theoretical column holds values computed from a=0a=0 and b=1b=1 — it never looks at the generator.

Step 2. With 500 values, every empirical statistic is built from ten times as much information, so each settles closer to its theoretical partner: the mean tightens toward 0.5000, the quartiles toward 0.2500 and 0.7500, ss toward 0.2887.

Step 3. With eight bars, the expected count per bar rises from 6.25 to 62.5, so a bar a few values off is now a small fraction of its height instead of a large one — the histogram flattens toward the rectangle the density function actually is.

Answer: the empirical column changes and tightens around the theoretical one, which does not move. The 0.5 was never a promise about your 50 values — it was a promise about what the average of generated values does as you keep generating. Fifty values cannot show you that. Five hundred can start to.

Continuous Distribution · bookSHelf Intro Stats§4.6

Key Terminology

Terms from this lab

empirical distribution — the distribution of data actually collected, summarized by frequencies and sample statistics; a measured quantity that changes each time the experiment is rerun.

theoretical distribution — the distribution computed from the structure of the experiment rather than from data; the fixed standard an empirical distribution is compared against.

uniform distribution — a continuous random variable with equally likely outcomes over a domain a<x<ba<x<b, written XU(a,b)X\sim U(a,b).

random number generator — a calculator or software tool that produces values which behave as if drawn from a stated distribution, used here to produce values from U(0,1)U(0,1).

fences — the two boundary values Q11.5(IQR)Q_1 - 1.5(IQR) and Q3+1.5(IQR)Q_3 + 1.5(IQR) used to flag potential outliers.

potential outlier — a data value below the lower fence or above the upper fence, flagged for a second look rather than automatically discarded.

Continuous Distribution · bookSHelf Intro Stats§4.6

The headline result

The 0.5 was never a promise about your 50 values — it was a promise about what the average does as you keep generating.

Fifty values cannot show you that a uniform distribution's parameters are limits, not guarantees. Five hundred can start to.

Only the empirical column has data in it; the theoretical column never looks at the generator. With ten times the values, every empirical statistic settles closer to its theoretical partner — the mean tightens toward 0.5000, the quartiles toward 0.2500 and 0.7500 — and the histogram flattens toward the rectangle the density function actually is.

† This is the whole meaning of a continuous distribution's parameters, and it is the lab's real payoff — a property of what happens as you keep sampling, not a claim about any one run of 50.

4.6
Continuous Distribution · bookSHelf Intro Stats§4.6

§4.6 — conclusions

What §4.6 leaves you with

The core idea

A theoretical distribution is computed from structure and never changes; an empirical distribution is measured and changes every run. The two will not match exactly — the size and direction of that mismatch, measured against the fixed U(0,1)U(0,1) standard, is the lesson the whole lab is built to teach.

Watch for

Rounding to fewer decimal places than the theoretical values manufactures agreement you did not earn. And a quartile drifts further from its theoretical partner than the mean does — a quartile is pinned by the position of just two sorted values, while the mean uses all fifty.

Next: Chapter 5 — The Normal Distribution, the continuous distribution you will spend the most time with next.