00:01
For this exercise, we are given 25 data from a sample of body temperatures for female subjects.
00:11
And for part a, we are asked to test the hypotheses, no hypothesis, that the mean body temperature is 98 .6, and the alternative that it is not 98 .6.
00:23
We're asked to test this at the significance level of 0 .05, and to do so by finding the p value.
00:34
The sample that we are given is of size 25.
00:39
Now, since we don't know the population standard deviation, we are relying on the t test statistic, which is the sample average minus the no hypothesized mean over the sample standard deviation divided by the square root of the sample size.
01:06
Now, the first step is to find the sample average, and we also need the sample standard deviation.
01:16
I have done this in r, although you could use other software, so i'll show you how i've done this in r.
01:21
The first step was to enter the sample data from the question into an object.
01:27
So i've called it object temperature.
01:31
And then to find the sample average, simply type mean and use temp as the argument.
01:37
And you get 98 .264.
01:50
And then for the sample standard deviation, we use the function sd, and we get 0 .482.
02:07
Therefore, our test statistic can be calculated with these numbers.
02:30
We get approximately negative 3 .48 as our test statistic.
02:36
Now since this is a two -sided test, the p -valley is the probability of getting a test statistic at least as extreme as 3 .48.
02:46
So that's the probability of getting the test statistic below minus 3 .48 plus the probability of getting a test statistic above 3 .48.
03:01
Another way to say that is two times the probability getting a test statistic above 3 .48.
03:14
And using software or using the p distribution table at the back of the textbook, comes out to approximately .002.
03:26
Now we have 0 .002, which is the p value, is less than alpha, which is 0 .05.
03:38
Therefore we would reject the no hypothesis.
03:51
So that's part a, and then for part b, we are asked to check the assumption that body temperature is normally to so this is again something that i've done in r, and i constructed a normal probability plot to do so.
04:10
In r if you have your sample data in an object, which i do, called temperature or called temp.
04:15
Then the normal probability plot is straightforward to construct.
04:18
You use the function qq norm and enter your object as the argument.
04:25
And here's the probability plot.
04:28
And as you can see, it makes a very linear pattern.
04:32
So this upholds the assumption that the population is at least approximately normally distributed.
05:04
And then for part c, we are asked to compute the power of the test.
05:07
If the true mean body temperature is as low as 98, we're saying the mean is actually 98.
05:24
So to find the power of the test, we first calculate the abscissa scale factor d, which is equal to the magnitude of the true mean minus the n.
05:38
No hypothesized mean over the population standard deviation.
05:44
Now we don't have the population standard deviation, so we estimate it with the sample standard deviation.
06:09
This comes out to about 1 .24...