Basic statistics -11. The paired t-test | explained with a sample example

The paired t-test | explained with a sample example

Basic Definition

Example 1

Let's say that we have collected eight individuals and would like to test new drug which is supposed to reduce the systolic blood pressure to test if the drug has an effect.

One could randomly assign the individuals into a treatment group and a control group due to chance person number 1 3 7 and eight were placed in the drug treatment group whereas person number 2, 4, 5 and six were placed in the control group. The individuals in the control group will not receive the drug instead these individuals might receive a place treatment.

After some some time we measure the blood pressure of the individuals and compare the mean historic blood pressure between the two groups . Since the individuals in the two groups are independent an unpaired teat test would be appropriate which could be used to test if there is a difference in the mean total blood pressure between the two groups.

Another strategy could be to pair the individuals based on the current historic blood pressure and gender. These number represents systolic blood pressures for the eight individuals before the treatment.

We have four men and four women for example we could pair person number one and eight who have a similar blood pressure and they both men .

We could then randomly assign which person in the pairs who should get the drug treatment.

After some times, we check the difference in systolic blood pressure between the pairs , the advantage of this study design is that we will reduce the variability between people since we look at the differ difference between similar individuals.

For this type of study design a pair t-test would be appropriate because we have observations based on paired individuals .

Example 2:

Another common type of paired study design is the so-called before and after studies .

For example I could measure the historic blood pressure of all 8 individuals before taking the drug , and then measure the systolic blood pressure on the same individuals after a certain time since the start of the drug treatment.

We would then calculate the deference in the systolic blood pressure before and after. The data from such before and after design would be appropriate for a paired t-test since the data comes from paired measurements on the same individuals .

Example 3:

We'll hear use some example data on weights in kilos before and after five individuals have tried a new diet for 3 weeks the differences in weight before and after are shown in last column.

We then calculate the mean of these differences we see that on average the five individuals have lost 2.2 kilos of their diet let's also calculate the standard deviation of the differences which in this case results in a value 1.92.

We'll now use the pair t-test to determine if you should reject the null hypothesis or not, the null hypothesis States the population mean difference between the paired values is equal to zero whereas the alternative hypothesis for a two-sided test states that the population mean difference between the paired values is not equal to zero . In other words the null hypothesis States the diet will not change the weight whereas the alternative hypothesis states that the diet will change the weight the mean of the differences.

In our sample indicates that the diet might result in weight loss, however we'll now use a par T test to see if this observed difference is enough to reject an null hypothesis, in other words we'll use a pair t-test to determine if we have enough evidence to say that the observed weight loss is not just due to chance .

We use alpha=0.05 in this case.

We use freedom degree=5-1=4. we get the area on t-distribution of df=4, and the p-value = area = 0.063. Because 0.063>0.05, so we do not reject the null hypothesis, we conclude that the diet has no significant effect on the body weight.

Although the mean weight loss is 2.2 kilos could be due to that the sample size is too small . If you had observed the same average weight loss with the largest sample size the standard error would have been reduced and the T statistic would have been bigger this would lead to a smaller P value that would allow us to reject a null hypothesis.

The difference between a paired and one-sample t-test

Unpaired T Test is simply just a one sample test which is based on the differences between the pairs.

Whereas the one sample T Test may also involve the mean of any continuous variable, therefore the one sample T test is not restricted to only differences between Pairs.

By using a one sample T Test based on the differences would have got the same results.

相关推荐
爱听歌的周童鞋16 天前
Steve Brunton | Probability Bootcamp | 笔记 | 第四部分:高级统计 | Lecture 40 | 矩母函数的可加性质
statistics·steve brunton·probability·mgf·additivity
爱听歌的周童鞋17 天前
Steve Brunton | Probability Bootcamp | 笔记 | 第三部分:高级概率 | Lecture 43 | 概率中的尾和公式
statistics·steve brunton·probability·tail sum·ccdf
爱听歌的周童鞋17 天前
Steve Brunton | Probability Bootcamp | 笔记 | 第四部分:高级统计 | Lecture 41 | 协方差与相关性
statistics·steve brunton·probability·covariance·correlation
爱听歌的周童鞋17 天前
Steve Brunton | Probability Bootcamp | 笔记 | 第四部分:高级统计 | Lecture 37 | 矩母函数
moments·statistics·steve brunton·probability·mgf
爱听歌的周童鞋17 天前
Steve Brunton | Probability Bootcamp | 笔记 | 第四部分:高级统计 | Lecture 35 | 大数定律
statistics·steve brunton·probability·lln·sample mean
青春不败 177-3266-052019 天前
基于R、Python的Copula变量相关性分析及AI大模型应用
人工智能·python·r语言·贝叶斯·统计学·copula
青春不败 177-3266-05201 个月前
R语言数据统计分析与ggplot2高级绘图
r语言·生态学·科研绘图·统计学·ggplot2·环境科学
爱听歌的周童鞋1 个月前
Steve Brunton | Probability Bootcamp | 笔记 | 第一部分:概率导论 | Lecture 8 | 条件概率
statistics·steve brunton·probability·conditionalprob
爱听歌的周童鞋1 个月前
Steve Brunton | Probability Bootcamp | 笔记 | 第一部分:概率导论 | Lecture 7 | 二项分布与多项分布
statistics·multinomial·steve brunton·probability·binomial
统计学小王子1 个月前
关于离散变量和连续变量的联合分布的一些讨论
统计学