Topic 16 Example 2 Pencast
Return to Topics page
We want to test the null hypothesis H0: μ=175
against the alternative hypothesis
H1: μ≠175 and to do so at the
0.01 level of significance, that is, α=0.01. We are doing this in the case where we do not know
the population standard deviation.
Note that this is a two-tailed test. Evidence that would cause
us to reject H0 would be a sample mean that is too low or too high.
We decide that we will take a sample of size 29. Thus, n=29.
Critical value approach
We need both low and high critical values. We know that the total
rejection area is 0.01 so our critical low value needs 0.005 to its left and our critical high value
needs 0.005 to its right. In the standard Student's-t distribution, with 28 degrees of
freedom, we use qt(0.005,28) to find the low t-value. That turns out to be -2.7195.
Naturally, by symmetry, we know that the high t-value will be 2.7195,
but we could verify that by using qt(0.005,28,lower.tail=FALSE).
However, we do not have a standard Student's-t distribution. If H0 is true
then, when we look at the distribution of sample means it will have a mean of 175.
Furthermore, the distribution of the sample means will have
a standard deviation equal to the sample standard deviation divided by
the square root of the sample size. Thus, the critical low value is given by
CLV = 175 +t0.005,df(sx/sqrt(n))
and
the critical high value is given by
CHV = 175 +t0.995,df(sx/sqrt(n))
.
We take our sample of size 29 and we find that the sample
mean is 182.1 and the sample standard deviation is 14.7.
So now our Critical Low Value is
175 - 2.7195* 14.7/sqrt(29) = 167.5765 and
our Critical High Value is
175 + 2.7195* 14.7/sqrt(29) = 182.4235.
Because our sample mean of 182.1 is not lower than our critical low nor is
it higher than our critical high we say that we do not have sufficinet evidence to reject
H0. That is, we do not reject H0.
Attained or Achieved Level of Significance Approach
If H0 is true then how strange is it to get
a sample mean "as far from or further away from 175" as is 182.1?
Noting that 182.1 is larger than 175 we can find the probability of
getting 182.1 or higher, if H0 is true,
by the command
pt( (182.1 - 175)/(14.7/sqrt(29) ),28, lower.tail=FALSE )
and that gives us 0.00734.
That would appear to be less than our specified 0.01 level of significance so we
might be tempted to reject H0. However, we asked
how strange is it to get
a sample mean "as far from or further away from 175" as is 182.1?.
Therefore the 0.00734 represents only half the answer.
182.1-175=7.1, so the 0.00734 is the probability of being 7.1 or more above the 175 but we still need to find
the probability of being 7.1 or more below 175. Because we know that the normal curve is symmetric we know that
this area will also be 0.00734. Therefore the attained significance is just twice 0.00734 or 0.01438, and that attained significance
is not less than or given 0.01 so, again,
we say that we do not have sufficinet evidence to reject
H0. That is, we do not reject H0.
Or we could just use the hypoth_test_unknown() function via
source("../hypo_unknown.R")
hypoth_test_unknown( 175, 0, 0.01, 29, 182.1, 14.7)
where
- 175 is the null hypothesis value of the mean
- 0 is our indicator that the alternative is a "not equal"
- 0.01 is our stated level of significance
- 29 is the sample size
- 182.1 is the sample mean, and
- 14.7 is the sample standard deviation.
which gives us all of the values and the decision.
Return to Topics page
©Roger M. Palay
Saline, MI 48176 March, 2020