# One-tailed vs Two-tailed Test for P value

R day 3

In clinical trial studies, P-value is critical for measuring drug efficacy. Typically, the statistical analysis Plan will describe statistical significance as: P-value <0.05 for two-tailed Log Rank Test.

Recently, I came across a study with the statistical significance as P-value <0.025 for one-tailed Log Rank test in the analysis plan.

#### Question:

Does two-tailed P-value= 0.05 means the same as One-tailed P-value =0.025 ?

If they are not the same? what are the differences?

let’s trying to figure out these questions by the following procedures.

1. What does P-value mean

2. What does two-tailed P-value mean

3. What does one-tailed P-value mean

Without loss of generality, P-value is the probability of the test results observed assuming the null hypothesis is correct.

Null hypothesis: the mean value is the same for Group A and Group B

H0:  mean(Group A) = Mean(Group B)

```m<- 100
s<- 30
x<- seq(from=m-5*s, to=m+5*s, by=1)
y<- dnorm(x,mean=m,sd=s)
plot(x,y,type="l", col="darkgreen", lwd=2,las=1, main="Two-Tailed")
abline(v=m+2*s, col="orange",lwd=3)
abline(v=m-2*s, col="orange",lwd=3)
polygon(c(x[x>=160],160),c(y[x>=160],y[x==0]),col="lightblue")
polygon(c(x[x<=40],40),c(y[x<=40],y[x==0]),col="lightblue")```

Two-tailed P-value Test:

P-value (<0.05) reject or accept (p> 0.05) the Null hypothesis.

P-value >0.05, accept Null hypothesis, which means mean value is the same for Group A and Group B.

P-value <0.05, Reject the Null hypothesis, mean value of Group A is different from the mean value in Group B.

• Key interpretation: this part only stated the mean value for two Groups are not the same, but we can not take for grant that mean(group A) > mean(group B) or mean(group B) > mean(group A)

One-tailed P-value Test

P-value (<0.025) reject or accept (p> 0.025) the Null hypothesis

P-value <0.025, accept Null hypothesis, the mean value for Group A strictly greater the mean value for Group B.

```m<- 100
s<- 30
x<- seq(from=m-5*s, to=m+5*s, by=1)
y<- dnorm(x,mean=m,sd=s)
plot(x,y,type="l", col="darkgreen", lwd=2,las=1, main="One-Tailed")
abline(v=m+2*s,col="purple",lwd=3)
polygon(c(x[x>=160],160),c(y[x>=160],y[x==0]),col="lightblue")```

#### Summary:

In most cases, if the variable is continuous, a One-tailed p-value is the same as Two-tailed p-value/2. But for non-inferiority studies, we prefer to use One-tailed p-value.

Thanks Jun and Renee 5 for the p-value knowledge with me .

Happy Studying!