The p-Value in One-Sample Tests for the Mean
The p-Value in One-Sample Tests for the Mean
In reporting the result of a significance test, showing the observed test statistic and its location in the null distribution along with the tail area is a helpful and frequently used graphic. This Demonstration makes it easy to construct this plot for the one-sample test for the population mean of a normal distribution. The effect of sample size, the assumption that the population variance is known or not, as well the question of using a one-sided or two-sided test may also be explored.
Let be the sample mean of observations in a random sample from a normal population with mean and standard deviation .
x
n
μ
σ
The -value for testing :μ= against one of the alternatives :μ≠, :μ> or :μ< is illustrated using tests based on the test statistic =(-μ) when is assumed known, and =(-μ) when is not known, where =σ, =s and is the sample standard deviation.
p
H
0
μ
0
H
a
μ
0
H
a
μ
0
H
a
μ
0
Z
0
x
σ
x
σ
t
o
x
σ
x
σ
σ
x
n
σ
x
n
s
The -value for the test is shown by the shaded area. When the tail area is smaller than 5%, a red arrow is used to indicate the position of the test statistic.
p
The null distribution for and are respectively the standard Gaussian and Student on degrees of freedom. So when is known, the slider for is disabled.
Z
0
t
0
t
n-1
σ
n