Welcome to a lesson on hypothesis testing
for matched or paired samples.
In a hypothesis test for matched or paired samples,
subjects are matched in pairs
and differences are calculated.
The differences are the data.
The population mean for the differences, mu sub d,
is then tested using a Student's t-test
for a single population mean
with n minus 1 degrees of freedom,
where n is the number of differences.
So the test statistic is a t-score given by the formula
shown here below.
Let's take a look at an example.
A study was conducted to investigate the effectiveness
of hypnotism in reducing pain.
Results for randomly selected subjects are shown
in Table 10.11. below.
A lower score indicates less pain.
The "before" value is matched to an "after" value
and the differences are calculated.
The differences have a normal distribution.
Are the sensory measurements,
on average, lower after hypnotism?
Test at a 5% significance level.
So the first step is to find the differences,
which is the after amount minus the before amount.
So I've already set this up on the next slide.
Again, the first column shows the after data,
the second column shows the before data,
the third column shows the differences.
So the third column is the data we use
to perform a single-sample hypothesis test.
So the data is listed here below.
Notice how to find the t-score by hand,
we do need to find the sample mean
and sample standard deviation.
Let's go ahead and find that now
before we set up the null and alternative hypotheses.
And let's find these using the TI-84.
To save time I've already entered the data
into the calculator.
Remember, the data are the differences.
So going into the calculator to enter data,
press STAT, ENTER.
Again, I already have the differences here in L1.
Next, we press STAT,
right arrow once to calculate,
and then option 1 for 1-Var Stats
and therefore we press ENTER.
The data is in L1 which is correct.
If this was not L1, we would press 2ND, number 1, for L1.
Go down to Calculate, press ENTER.
Notice the sample mean is -3.125.
The sample standard deviation is approximately 2.911.
Let's go ahead and record this information.
Remember the question is:
Are the sensory measurements,
on average, lower after hypnotism?
Test at a 5% level of significance.
So if the measurements are lower,
then mu sub d is less than zero,
which is the alternative hypothesis.
And if mu sub d is not less than zero,
mu sub d is greater than or equal to zero,
which is the null hypothesis.
And we know alpha is equal to 0.5
which is 5% as a decimal.
So again, the null hypothesis is zero or positive,
meaning that there is the same or more pain after hypnotism.
And the alternative hypothesis is negative.
Meaning there is less pain after hypnotism.
And again, the distribution is a Student's t-distribution
with n minus 1, in this case, 7 degrees of freedom.
Before we determine the t-score and p-value on a TI-84,
and then verify the t-score by hand,
let's take a look at the distribution shown below.
If the hypnotism has no effect,
then mu sub d is zero,
which is at the center of the distribution here.
And then because the sample mean is -3.13, or approximately,
you notice how that's labeled on the left,
along the horizontal axis.
So the p-value is equal to the area shaded under the curve
to the left of -3.13
which means the p-value is also equal to the probability
the sample mean of the differences
is less than or equal to -3.13.
And now let's go to the TI-84
and perform a one-sample t-test.
To do this, press STAT,
right arrow twice to Test.
Select option 2 for T-Test.
We'll be using the data in L1,
so we select DATA.
Down, mu sub zero is zero.
Down. The list is L1, which is correct, down.
We are not using a frequency table
and, therefore, we enter a 1 for frequency, down.
We're testing to see whether mu sub d is less than zero,
which means we select a less than an equality symbol,
which is here in the middle.
ENTER, down to calculate, and press ENTER.
The t-score is approximately -3.0359
and the p-value is approximately 0.0095.
Let's go ahead and record these.
Before we compare the p-value to alpha
and draw a conclusion,
let's take a closer look at this t-score.
If we were doing this by hand,
we would take alpha equals 0.05,
recognize that we have a left-tailed test
and determine the corresponding t-score
shown here as -1.895.
Then we would calculate the t-score by hand,
which is shown below,
which gives us a t-score of -3.0374.
This is a little bit different than the value
from the TI-84 because we are using a rounded value here
for the sample standard deviation.
Either way, notice how the Z-score of -3.0374
is in the rejection region somewhere way over here.
And, therefore, we are going to reject the null hypothesis.
But let's also draw the same conclusion
comparing alpha and the p-value.
So comparing alpha and the p-value,
notice how the p-value is low compared to alpha.
And when the p-value is low, the null must go.
Or more formerly,
because the p-value is less than or equal to alpha,
or because alpha is greater than or equal to the p-value,
we reject the null hypothesis.
And, therefore, the conclusion is,
at a 5% level of significance from the sample data,
there is sufficient evidence to conclude
that the sensory measurements, on average,
are lower after hypnotism.
Hypnotism appears to be effective in reducing pain.
I hope you found this helpful.