Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Lesson 1: Comparison of Population Means Part b: Matched Pairs Procedures Welcome to lesson 1b. This second lesson of lesson 1 will discuss hypothesis testing for a matched pairs design. This lesson is fairly short in length. 1 Matched Pairs t Procedures Data: Longitudinal Study for Matched Pairs: One example of matched pairs is before-and-after observations on the same subjects. Another example, is by matching two samples on matching criteria such as age and sex. Outcome: For both settings the variable that we are measuring on the subjects is a continuous measure. Assumptions: Assume normality of underlying distribution or have a large sample so the Central Limit Theorem Applies. 2 Matched pairs studies involve matching each data point for the first sample with a second unique data point. There are a few ways this is done. One way is to have two sets of measures on one sample. This uses a longitudinal design – that is, a follow-up study where patients are followed over time. A before or baseline measure is then compared with an after measure. Each patient has two measures (or more) on the outcome in question. Another way to have a matched pair design is to have measurements on two different subjects who are chosen on an individual basis using matching criteria such as age and sex. In both cases, when using a match pairs t- procedure the outcome in question needs to be a continuous measure. Also, we assume the underlying distribution is normal or that the sample is large enough that the Central Limit Theorem applies. 2 Matched Pairs tprocedure With large sample size and assuming that the null hypothesis of no difference is true the mean of these differences is distributed as normal with mean and variance given by: μd = 0 sd = sd n 3 If the sample is large enough, or the underlying distribution is normal we can look at the differences of the before-after measures as if it is a single mean sample. Under this condition the null hypothesis of no difference in before and after measure is assumed to be zero. The average difference d bar is compared to this distribution. The standard error of the average difference is the standard deviation of the difference measures divided by the square root of n. If the sample is large enough, or the underlying distribution is normal we can look at the differences of the before-after measures as if it is a single mean sample. Under this condition the null hypothesis of no difference in before and after measure is assumed to be zero. The average difference d bar is compared to this distribution. The standard error of the average difference is the standard deviation of the difference measures divided by the square root of n. 3 Matched Pairs Test Statistic Under the null our test statistic becomes: t= d −0 ~ t (n − 1) sd n 4 Under the null hypothesis of no difference our test statistic is a student’s t. We take the average difference d bar minus zero divided by the standard error of d bar. This distribution has n-1 degrees of freedom. Where n is the sample size. 4 Example- Matched Pairs 8 randomly selected athletes are given a strength test before and after a vitamin supplemented diet is given. Test the effectiveness of the vitamin regimen for changing strength. We are told the following: The average difference in strength score is –2.375 The sample standard deviation of the differences in the scores is 4.84. 5 Let’s take a look at an example. In this example we have 8 randomly selected athletes. These athletes were given a strength test before and after a vitamin supplements diet. We are curious to see of the vitamin regimen changed the strength measure. We will need to assume the underlying distribution of the difference in strength is normal. Each of the eight athletes has a before and after measure. The difference of the before minus after measure is calculated for each athlete. The average of these differences is negative 2.375. This indicates that there may be an increase in strength. However, as with all sampling this difference in strength may be due to chance variation. To test this we will need the standard deviation of the difference. This value is 4.84. 5 Answer for Matched-Pairs Example 1. 2. H0: μd=0 Ha: μd Not Equal 0 Calculate the test statistic: t= d − 0 − 2.375 − 0 = = −1.388 sd 4.84 8 n 6 To do the matched pairs hypothesis test, we set our null hypothesis at the status quo. That is that the vitamin supplement did nothing to change strength. The alternative hypothesis is that there is a change in strength. That is, that mu of the difference is not equal to zero. We are choosing to do a two sided test, because the vitamins may increase or decrease strength. We do not know. The test statistic is a t statistic. We take the average difference, d bar, subtract off the hypothesized difference under the null, zero. We then divide by the standard error of the difference. This yields a value of negative 1.388. To see if this value is significant we need to calculate the p-value. 6 Answer for Matched-Pairs Example This test statistics has the t(7) distribution. Need to calculate the p-value: 2*P(T≥1.388) > 0.05 Therefore we do not reject the null hypothesis based on an α-level of 0.05 and conclude that there is not evidence that the vitamin regimen change strength. WARNINGS: Small sample size – Low Power Confounding 7 Our t distribution has n-1 or 7 degrees of freedom. Using our table in the book we find that two times the probability that a t is greater than or equal to 1.388 for 7 degrees of freedom is greater than 0.05. We multiplied by two because the alternative is two sided. Based on this finding at the alpha 0.05 level we would not reject the null hypothesis. That is our data does not provide sufficient evidence that the vitamin regimen changed strength. One thing to note with this problem is our small sample size. Recall: power is related to sample size. We may not have had enough power in this problem to detect a difference. In addition to that there are potential confounding factors. Including that a before and after measure of strength is confounded with the athletes current training schedule. 7 To practice the concepts in this lesson please go to Self Assessment Quiz 1 b. 8 This is the end of lesson 1b. Please go to the Self Assessment Quiz 1b under lesson 1. 8