Skip to main content
added 43 characters in body
Source Link
BruceET
  • 57.6k
  • 2
  • 36
  • 94

Comment continued: In case you want to check your answer against computer printout for a Welch t test in R, here are fictitious data and relevant computer printout.

set.seed(2021)
x1 = rnorm(30, 50, 7)
summary(x1);  length(x1);  sd(x1)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  36.54   47.66   51.10   51.06   57.38   62.11 
[1] 30
[1] 7.651895

x2 = rnorm(4030, 3040, 5)
summary(x2);  length(x2);  sd(x2)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  1828.72   2433.9906   2838.9122   2838.6425   3141.6632   4050.60 
[1] 4030
[1] 5.174328506919

t.test(x1, x2)

        Welch Two Sample t-test

data:  x1 and x2
t = 137.8494401, df = 4852.096686, p-value <= 29.2e136e-1610
alternative hypothesis: 
 true difference in means is not equal to 0
95 percent confidence interval:                ## <----
 19 9.16585353202 2516.67582258810
sample estimates:
mean of x mean of y 
 51.05916  2838.6383325315 

Comment continued: In case you want to check your answer against computer printout for a Welch t test in R, here are fictitious data and relevant computer printout.

set.seed(2021)
x1 = rnorm(30, 50, 7)
summary(x1);  length(x1);  sd(x1)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  36.54   47.66   51.10   51.06   57.38   62.11 
[1] 30
[1] 7.651895

x2 = rnorm(40, 30, 5)
  Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  18.72   24.99   28.91   28.64   31.66   40.60 
[1] 40
[1] 5.174328

t.test(x1, x2)

        Welch Two Sample t-test

data:  x1 and x2
t = 13.849, df = 48.096, p-value < 2.2e-16
alternative hypothesis: 
 true difference in means is not equal to 0
95 percent confidence interval:
 19.16585 25.67582
sample estimates:
mean of x mean of y 
 51.05916  28.63833 

Comment continued: In case you want to check your answer against computer printout for a Welch t test in R, here are fictitious data and relevant computer printout.

set.seed(2021)
x1 = rnorm(30, 50, 7)
summary(x1);  length(x1);  sd(x1)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  36.54   47.66   51.10   51.06   57.38   62.11 
[1] 30
[1] 7.651895

x2 = rnorm(30, 40, 5)
summary(x2);  length(x2);  sd(x2)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  28.72   33.06   38.22   38.25   41.32   50.60 
[1] 30
[1] 5.506919

t.test(x1, x2)

        Welch Two Sample t-test

data:  x1 and x2
t = 7.4401, df = 52.686, p-value = 9.136e-10
alternative hypothesis: 
 true difference in means is not equal to 0
95 percent confidence interval:                ## <----
  9.353202 16.258810
sample estimates:
mean of x mean of y 
 51.05916  38.25315 
Source Link
BruceET
  • 57.6k
  • 2
  • 36
  • 94

Comment continued: In case you want to check your answer against computer printout for a Welch t test in R, here are fictitious data and relevant computer printout.

set.seed(2021)
x1 = rnorm(30, 50, 7)
summary(x1);  length(x1);  sd(x1)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  36.54   47.66   51.10   51.06   57.38   62.11 
[1] 30
[1] 7.651895

x2 = rnorm(40, 30, 5)
  Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  18.72   24.99   28.91   28.64   31.66   40.60 
[1] 40
[1] 5.174328

t.test(x1, x2)

        Welch Two Sample t-test

data:  x1 and x2
t = 13.849, df = 48.096, p-value < 2.2e-16
alternative hypothesis: 
 true difference in means is not equal to 0
95 percent confidence interval:
 19.16585 25.67582
sample estimates:
mean of x mean of y 
 51.05916  28.63833