# Why the t.test returns a smallest p-value of 2.2e ŌĆō 16 in R?

 0

## Example2

Live Demo

> x2<-sample(1:10,50,replace=TRUE)
> y2<-sample(500:510,replace=TRUE)
> t.test(x2,y2,var.equal=FALSE)

## Output

   Welch Two Sample t-test
data: x2 and y2
t = -427.61, df = 12.789, p-value < 2.2e-16
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-500.4179 -495.3785
sample estimates:
mean of x mean of y
5.9200 503.8182
> t.test(x2,y2,var.equal=FALSE)$p.value  5.881324e-28 ## Example3 Live Demo > x3<-sample(101:110,50,replace=TRUE) > y3<-sample(1001:1010,50,replace=TRUE) > t.test(x3,y3,var.equal=FALSE) ## Output  Welch Two Sample t-test data: x3 and y3 t = -1730.7, df = 97.907, p-value < 2.2e-16 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: -901.4725 -899.4075 sample estimates: mean of x mean of y 105.38 1005.82 > t.test(x3,y3,var.equal=FALSE)$p.value
 2.07048e-221

## Example4

Live Demo

> x4<-sample(1001:1010,50,replace=TRUE)
> y4<-sample(100001:1000010,50)
> t.test(x4,y4,var.equal=FALSE)

## Output

   Welch Two Sample t-test
data: x4 and y4
t = -14.798, df = 49, p-value < 2.2e-16
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-620129.5 -471835.6
sample estimates:
mean of x mean of y
1005.6 546988.1
> t.test(x4,y4,var.equal=FALSE)\$p.value
 1.043251e-19

Updated on: 04-Sep-2020

2K+ Views 