AI Grounds

Open AI Grounds on a desktop

These interactive lessons need a larger screen. Please continue on a desktop or laptop computer.

Guided discovery

Confidence Intervals Explorer

See which repeated intervals capture the fixed true mean.

Independent normal observations; known population SD 4. Simulator truth μ = 20 stays fixed. Each of 100 sample means is generated directly from its normal sampling law; individual observations are not shown.

Observations represented by each mean. Rescales the same standardized draws and margins. Use arrow keys on the slider. Press Enter or leave the number field to apply an exact edit.

Changes margins around the same sample means, not the true mean or centers. Use arrow keys on the slider. Press Enter or leave the number field to apply an exact edit.

Select one reproducible set of 100 independent simulated sample means. Use arrow keys on the slider. Press Enter or leave the number field to apply an exact edit.

Batch 1 of 20; 100 means, each representing size 25. Known SD 4; selected confidence 95%; fixed true mean 20.

Confidence edits reuse the means. Size or spread edits rescale the same standardized draws for a paired comparison; Next batch uses new draws.

100 intervals, one true mean

✓ Indigo solid interval and dot: captures μ = 20. × Rust dashed interval and cross: misses. The vertical dashed line is the fixed true mean. All intervals in a batch have the same width; sample means move their centers. Scroll for all 100 labeled rows; focus the plot and use PageDown or arrow keys.

1 ✓2 ✓3 ✓4 ✓5 ✓6 ✓7 ✓8 ✓9 ✓10 ✓11 ✓12 ✓13 ✓14 ✓15 ✓16 ✓17 ✓18 ✓19 ✓20 ✓21 ✓22 ✓23 ✓24 ✓25 ✓26 ✓27 ✓28 ✓29 ✓30 ✓31 ✓32 ✓33 ✓34 ✓35 ✓36 ✓37 ✓38 ✓39 ✓40 ×41 ✓42 ✓43 ✓44 ✓45 ✓46 ✓47 ✓48 ✓49 ✓50 ✓51 ✓52 ✓53 ✓54 ✓55 ✓56 ✓57 ✓58 ✓59 ✓60 ✓61 ✓62 ×63 ✓64 ✓65 ✓66 ✓67 ✓68 ✓69 ✓70 ✓71 ✓72 ✓73 ✓74 ✓75 ✓76 ✓77 ✓78 ✓79 ✓80 ✓81 ✓82 ✓83 ✓84 ×85 ✓86 ✓87 ✓88 ✓89 ✓90 ✓91 ×92 ✓93 ✓94 ✓95 ✓96 ✓97 ✓98 ✓99 ✓100 ✓
-40-20020406080Value · one fixed population mean

Batch 1: 96 of 100 intervals include μ = 20; 4 miss. Selected confidence is 95%, rather than a promise of exactly 95 captures.

Observed coverage

Capture fraction of this finite batch.

96.0%

96 / 100 intervals

Selected confidence

Repeated-procedure level under the model.

95%

z* ≈ 1.9600

Interval width

Same full width for all current intervals.

3.1359

2E = 2 × 1.9600 × 4 / √25

Exact interval endpoints
All 100 intervals in Batch 1; inclusive endpoints. Rounded values displayed; full precision decides whether lower ≤ 20 ≤ upper.
IntervalSample meanLowerUpperCaptures μ?
120.614919.047022.1829Yes
220.037918.469921.6059Yes
321.227419.659422.7953Yes
421.186319.618322.7542Yes
519.609118.041121.1771Yes
620.389318.821321.9572Yes
720.632519.064522.2005Yes
819.437217.869221.0051Yes
920.210818.642921.7788Yes
1018.961517.393520.5294Yes
1120.356018.788021.9240Yes
1220.536118.968122.1040Yes
1320.472018.904022.0399Yes
1418.897717.329720.4656Yes
1519.737218.169221.3052Yes
1619.707918.139921.2759Yes
1720.374518.806521.9425Yes
1821.417319.849322.9852Yes
1918.724117.156120.2921Yes
2020.499118.931222.0671Yes
2119.667918.099921.2358Yes
2221.501319.933323.0692Yes
2320.471518.903522.0395Yes
2420.414618.846721.9826Yes
2519.428417.860420.9964Yes
2619.605518.037521.1735Yes
2719.787518.219521.3555Yes
2819.086017.518020.6539Yes
2920.294718.726721.8626Yes
3020.822719.254722.3906Yes
3120.813519.245522.3814Yes
3220.429118.861121.9971Yes
3320.716119.148122.2840Yes
3420.918019.350122.4860Yes
3518.452316.884320.0203Yes
3619.963018.395121.5310Yes
3720.202418.634521.7704Yes
3820.380518.812521.9485Yes
3918.761517.193620.3295Yes
4021.574920.007023.1429No
4118.568117.000120.1360Yes
4218.833217.265220.4011Yes
4318.849917.281920.4178Yes
4421.317819.749822.8858Yes
4520.769919.201922.3379Yes
4619.988918.421021.5569Yes
4719.618718.050721.1866Yes
4819.535817.967821.1038Yes
4921.422619.854622.9905Yes
5020.162018.594021.7299Yes
5119.813718.245821.3817Yes
5219.652318.084321.2202Yes
5319.761218.193221.3292Yes
5419.796318.228321.3643Yes
5520.208118.640121.7761Yes
5619.412917.844920.9808Yes
5719.524317.956321.0923Yes
5820.125118.557221.6931Yes
5920.259818.691821.8278Yes
6019.981018.413121.5490Yes
6120.757319.189322.3253Yes
6221.597020.029023.1650No
6320.246518.678621.8145Yes
6419.194717.626720.7627Yes
6520.990119.422122.5581Yes
6619.472517.904521.0405Yes
6720.896519.328522.4645Yes
6819.916018.348021.4839Yes
6920.158018.590021.7260Yes
7020.649519.081622.2175Yes
7120.127018.559021.6950Yes
7220.094418.526521.6624Yes
7320.232318.664321.8003Yes
7420.879719.311822.4477Yes
7520.814019.246022.3820Yes
7619.605418.037421.1733Yes
7720.018218.450221.5861Yes
7819.758718.190721.3266Yes
7919.992118.424121.5601Yes
8018.718217.150220.2861Yes
8120.836419.268422.4044Yes
8219.420817.852820.9888Yes
8319.760018.192021.3279Yes
8418.290516.722519.8585No
8519.356817.788820.9247Yes
8618.785917.218020.3539Yes
8720.587819.019822.1557Yes
8819.572518.004621.1405Yes
8919.018017.450120.5860Yes
9020.660719.092722.2287Yes
9118.344216.776219.9121No
9219.464017.896121.0320Yes
9321.393619.825622.9616Yes
9418.879417.311520.4474Yes
9521.239119.671222.8071Yes
9619.901318.333321.4692Yes
9721.282219.714222.8501Yes
9820.212018.644021.7799Yes
9921.222419.654522.7904Yes
10019.917318.349321.4852Yes
Sampling model and interpretation

With independent normal observations and known population SD, the sample mean has normal law with center μ and SE σ / √n at every n. The simulator generates sample means directly as 20 + (σ / √n) × Z, rather than generating n individual observations. Each interval uses its own mean ± z* × SE; the estimator’s interval formula does not use the simulator’s true mean to position its bounds.

A seed-1309 32-bit LCG gives open-unit positions to a Box-Muller normal transform, preparing 2000 standardized draws in 20 batches of 100. Selecting size or spread rescales the same draws; confidence changes margins around unchanged centers. Under this common-draw normal comparison, both mean error and margin scale together, so inclusion stays fixed at the same confidence. Next batch uses another set of standardized draws and may change capture counts. Finite pseudorandom examples do not prove independence or exact coverage.

Confidence 95% describes coverage of this procedure across repeated independent samples under its assumptions, up to numerical normal-critical approximation. Each computed interval either contains the fixed mean or misses it. This is not a posterior probability for that particular interval or a percentage of individual observations within it. Finite batches need not equal confidence exactly, and an all-capture batch does not establish guaranteed coverage. The true mean never moves; sample means move.

All shown intervals and their center markers fit the fixed −40 to 80 window for the prepared batches and allowed parameters; the simulation does not clamp endpoints. Unknown-SD t intervals, non-normal approximations, dependence, biased samples, testing and power are outside scope. Source spread and size affect width, while selected confidence is a separate control. Numeric critical distances invert the Abramowitz–Stegun 26.2.17 normal-tail approximation.

NIST · Confidence intervals, fixed parameters and repeated coverage