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

The answer by @Dave2e is fine (+1), but I wanted to give an Answer based mainly on a specific example and showing computations of P-values.

The answer by @Dave2e is fine (+1), but I wanted to give an Answer based mainly on a specific example.

The answer by @Dave2e is fine (+1), but I wanted to give an Answer based mainly on a specific example and showing computations of P-values.

added 397 characters in body
Source Link
BruceET
  • 57.6k
  • 2
  • 36
  • 94
set.seed(2022)
x1 = rnorm(30, 350, 50)
x2 = rnorm(30, 300, 70) 

summary(x1);  length(x1);  sd(x1)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  205.0   309.6   346.7   344.2   379.2   410.6 
[1] 30         # sample size
[1] 46.29298   # sample SD

summary(x2);  length(x2);  sd(x2)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  190.9   281.3   310.5   307.6   353.5   418.5 
[1] 30
[1] 58.53848

Now, do a two sample Welch t test of $H_0: \mu_1=\mu_2$ against $H_a: \mu_1 > \mu_2,$ using t.test in R:

set.seed(2022)
x1 = rnorm(30, 350, 50)
x2 = rnorm(30, 300, 70)

Now do a two sample Welch t test of $H_0: \mu_1=\mu_2$ against $H_a: \mu_1 > \mu_2,$ using t.test in R:

set.seed(2022)
x1 = rnorm(30, 350, 50)
x2 = rnorm(30, 300, 70) 

summary(x1);  length(x1);  sd(x1)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  205.0   309.6   346.7   344.2   379.2   410.6 
[1] 30         # sample size
[1] 46.29298   # sample SD

summary(x2);  length(x2);  sd(x2)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  190.9   281.3   310.5   307.6   353.5   418.5 
[1] 30
[1] 58.53848

Now, do a two sample Welch t test of $H_0: \mu_1=\mu_2$ against $H_a: \mu_1 > \mu_2,$ using t.test in R:

added 575 characters in body
Source Link
BruceET
  • 57.6k
  • 2
  • 36
  • 94

Now do a two sample Welch t test of $H_0: \mu_1=\mu_2$ against $H_a: \mu_1 > \mu_2,$H_a: \mu_1 > \mu_2,$ using t.test in R:

If you do a 2-sided t test, then the P-value is calculated by looking both in the lower tail below $-2.6864$ and in the upper tail above $2.6864.$ [By using $-notation, we show only the P-value.]

ComputedThis P-value for a 2-sided test is computed as follows:

Alternatively, byusing the symmetry of the t distribution:

Note: Quantities in the output toof the test are rounded slightly to save space, so there is a tiny discrepancy with the P-values shown just above.

Now do a two sample Welch t test of $H_0: \mu_1=\mu_2$ against $H_a: \mu_1 > \mu_2, using t.test in R:

If you do a 2-sided t test, then the P-value is calculated by looking both in the lower tail below $-2.6864$ and in the upper tail above $2.6864.$ [By using $-notation we show only the P-value.]

Computed as follows:

Alternatively, by the symmetry of the t distribution

Note: Quantities in the output to the test are rounded slightly to save space, so there is a tiny discrepancy with the P-values shown just above.

Now do a two sample Welch t test of $H_0: \mu_1=\mu_2$ against $H_a: \mu_1 > \mu_2,$ using t.test in R:

If you do a 2-sided t test, then the P-value is calculated by looking both in the lower tail below $-2.6864$ and in the upper tail above $2.6864.$ [By using $-notation, we show only the P-value.]

This P-value for a 2-sided test is computed as follows:

Alternatively, using the symmetry of the t distribution:

Note: Quantities in the output of the test are rounded slightly to save space, so there is a tiny discrepancy with the P-values shown just above.

added 575 characters in body
Source Link
BruceET
  • 57.6k
  • 2
  • 36
  • 94
Loading
Source Link
BruceET
  • 57.6k
  • 2
  • 36
  • 94
Loading