Hypothesis testing the difference between means for dependent samples is similar to independent samples. We use critical values and rejection regions, and calculate a
standardized test statistic, and reject or fail to reject a null hypothesis depending on whether that test statistic falls in a rejection region. Two samples are dependent
when each member of one sample is related or corresponds to a member of the other sample. An example of this is the weight of individuals before going on a diet,
and the weight of those same individuals after 10 weeks of dieting. And dependent samples are often referred to as paired samples or matched samples.
In hypothesis testing the difference between means for dependent samples, we are testing for the difference in values of the matched pairs, and we use the symbol mu
sub d, and we assume mew sub d equals zero. The usual pairing of hypotheses are listed here, with equals zero and does not equal zero paired, less than or equal to zero
and greater than zero paired and greater than or equal to zero and less than zero paired together. When testing dependent samples, we use a t-test and there are 3
conditions that must be met, the samples must be random, the samples must be dependent or paired, and the population must be normally distributed or the sample
size must be greater than or equal to 30. The formula for calculating the standardized test statistic is t equals, d bar minus mu sub d, divided by s sub d,
over the square root of n. In this formula, t is the standardized test statistic, d bar is the mean of the differences of the paired data entries in the dependent samples.
The formula for d bar is the sum of d divided by n, where n is the sample size and d is the difference between paired entries. As an example of how to calculate d bar,
let’s say this table shows data for 8 randomly selected people. Column 2 shows each person’s resting heart beat before taking part in a fitness program. Column 3
shows each person’s resting heart beat after taking part in a 4 week fitness program. To calculate the value for the sum of d, we need to sum up the differences between
each of the paired entries. So, we can add a 4th column in and label it as d, or difference. For each person, we will subtract the after value in column 3
from the before value in column 2, which I have done here. If we sum up these values in column 4, we get 18, which is the value for the sum of d. So, the value for d bar,
from this data is 18 divided by 8, which equals 2.25. Now back to our formula. Mu sub d is the hypothesized mean of the differences between the paired entries
in the population, and we assume this to be equal to 0. s sub d is the standard deviation of the differences between the paired entries, which is the formula,
square root of, the sum of d minus d bar squared over n minus 1, and we can use the shortcut formula of square root of, the sum of d squared minus the sum of d quantity
squared, over n, divided by n minus 1. Going back to our example table, we can add in a 5th column, labeled d squared, and square each of the values for d.
We can then sum up this column, which is 166. Plugging into the s sub d formula we get 4.234. And back to our main formula, n is the last variable and it is the sample size,
and the degrees of freedom are equal to n minus 1. So, using the data from our little example table, we can calculate a t, or the standardized test statistic value.
Plugging and calculating we get 1.503. Alright, lets go through a full example step by step. A company claims that they can increase employee productivity by having them
take a special training course. 10 randomly selected employees productivity rates are measured before taking the course and after taking the course.
Those rates are shown in this table. Assume the productivity rates are normally distributed. At a level of significance of alpha equals 0.10, is there enough evidence
to support the company’s claim. Step 1 is to make sure the 3 conditions are met. The samples are random, as that was stated in the information given, the samples are
dependent, as there are matched pairs, before and after training, and the population is normally distributed, as that was also stated in the information given.
Step 2 is to write the claim out and identify the null and alternative hypotheses. The company is claiming that the productivity rates before the training will be less than
productivity rates after training. So, the claim is that mu sub d is less than 0. And we know the alternative hypothesis contains a statement of inequality, so h sub a
is mu sub d is less than zero. The null hypothesis is the complement of the alternative hypothesis and contains a statement of equality, so h sub 0 is mu sub d
is greater than or equal to zero. Step 3 is to identify the level of significance, which was given, alpha equals 0.10. Step 4 is to identify the degrees of freedom,
which is n minus 1, and that results in 9 degrees of freedom. Step 5, is to determine the test to use, left tailed, right tailed or 2 tailed, and because the alternative
hypothesis contains the less than inequality, this will be a left tailed test. Step 6 is to determine the critical value. Graphically this looks like this, with our critical value,
t naught, here and this shaded area in the left tail being the rejection region. Since the level of significance is alpha equals 0.10, and this is a left tailed test,
the rejection region will equal alpha, 0.10. And in the t distribution table the value that corresponds to an area of 0.10 to the left, and 9 degrees of freedom is -1.383,
and that is our critical value. Step 7 is to identify the rejection region, which is any standardized test statistic value that falls in the shaded area, that is any value that
is less than -1.383. Step 8, use the formula and calculate the t value, or the value of the standardized test statistic. To use the formula we need to know 4 variables,
d bar, mu sub d, s sub d and n. We know that mu sub d equals zero, as we assume that. We also know that n is 10, the sample size, so we need to find d bar and s sub d.
To find d bar, we can add a column to the table for d, being the difference for each entry before and after, so before minus after. And here are those values.
The formula for d bar is sum of d divided by n, -21 divided by 10, which equals -2.1, and that is our value for d bar. To find s sub d, we can use the shortcut formula.
In the table we can add a column for d squared, the difference squared, and here are those values, with the summed total at the bottom. Plugging into the s sub d formula
we have square root of 85, minus -21 squared, over 10, divided by 10 minus 1. And that calculates to 2.132, which is the value for s sub d. Now we have all 4 variables
needed to calculate t, or the standardized test statistic. Plugging and calculating we get t equals -3.115. Step 9 is to make a decision to reject or fail to reject the null
hypothesis. On our graph, you can see that the standardized test statistic does fall in the rejection region, as t, the standardized test statistic is less than t naught,
the critical value. So, in this case we would reject the null hypothesis. Step 10 is to interpret the decision. There is enough evidence at the 10% level of significance
to support the company’s claim that they can increase employee productivity by having them take a special training course.
And that be the basics on hypothesis testing between means for dependent samples.
Hopefully this video helped you out, I do have more videos right there for you, till next time, I am outta here.