This applet generates random normal data from a
N(μ, σ2). It then computes and displays both the
normal (σ known) and t-confidence (σ unknown).
Controls
μ-slider: Sets the value of the mean μ.
σ-slider: Sets the value of the mean σ.
n-slider: Sets the number of random data points to generate.
c-slider: Sets the confidence level.
Run N trials button: A single trial consists of generating n
random values from a N(μ, σ2) distribution.
This runs N trials, updates the percentage correct and displays
the confidence intervals for the last trial.
N-slider: Sets the number of trials to run for each click of the
'Run N trials' button.
Graph
Shows the plot of the normal density for the sample mean x̄
~ N(μ, σ2/n).
The yellow diamond marks μ, the mean of the normal
distribution.
The blue diamond marks x̄, the sample mean.
The orange-ish bar (above the light-orange/pinkish bar) is the
normal confidence interval.
The light-orange/pinkish bar (below the orange-ish bar) is the
t-confidence interval.
Readouts
x̄: the sample mean
s: the sample standard deviation
z: the right critical point for the standard normal, e.g.
z.025 is the .975 quantile for the
standard normal.
t: the right critical point for the student-t distribution, e.g.
t.025 is the .975 quantile for the
t(n-1).
Z-trials run: the total number of Z-trials run at the current
settings.
Z correct: the percentage of Z trials in which μ was truly in
the confidence interval.
t-trials run: the total number of t-trials run at the current
settings. This will be different from Z-trials if n = 1.
t correct: the percentage of t-trials in which μ was truly in
the confidence interval.
Warning
You can change the underlying parameters without generating new
data.
In this case the confidence intervals will change, but they
will be based on data that was generated from other parameters.
This is left in so it is easy to see how the parameters affect
the confidence intervals. For instance, you can see clearly that
increasing n leads to smaller confidence intervals. When this
happens a red warning will appear on the screen.