8. Testing for Differences in Means and Proportions: Independent Samples t-test
Independent Samples t-test: Test Statistic and p-value
Independent Samples t-test: Test Statistic
The test statistic of an independent samples -test is denoted and is computed with the following formula:
where is the estimated standard error of the mean difference.
Under the null hypothesis of an independent samples -test, the -statistic follows the -distribution, but the exact degrees of freedom involves a complicated formula.
We will use a simpler, more conservative value: is the smaller of and .
Calculating the p-value of an Independent Samples t-test with Statistical Software
The calculation of the -value of an independent samples -test is dependent on the direction of the test and can be performed using either Excel or R.
To calculate the -value of an independent samples -test for in Excel, make use of one of the following commands:
Where .
To calculate the -value of an independent samples -test for in R, make use of one of the following commands:
Where .
If , reject and conclude . Otherwise, do not reject .
A total of subjects are recruited. Approximately half of the subjects are given the easy-to-read text and the other half are given the hard-to-read text . Both groups are given minutes to study the text, after which they are tested on how well they remember what they have read.
The psychologist plans on using an independent samples -test to determine whether there is a significant difference in the memory performance between the two groups, at the level of significance.
The psychologist obtains the following results:
Easy-to-read | Hard-to-read |
|
|
Calculate the -value of the test and make a decision regarding . Round your answer to decimal places.
On the basis of this -value, should not be rejected, because .
There are a number of different ways we can calculate the -value of the test. Click on one of the panels to toggle a specific solution.
Compute the estimated standard error of the mean difference:
Compute the -statistic:
Determine the degrees of freedom:
Since both and are considered large (), the Central Limit Theorem applies and we know that the test statistic
approximately has the distribution, under the assumption that is true.
To calculate the -value of a -test, make use of the following Excel function:
T.DIST(x, deg_freedom, cumulative)
- x: The value at which you wish to evaluate the distribution function.
- deg_freedom: An integer indicating the number of degrees of freedom.
- cumulative: A logical value that determines the form of the function.
- TRUE - uses the cumulative distribution function,
- FALSE - uses the probability density function
Since we are dealing with a two-tailed -test, run the following command to calculate the -value:
This gives:
Since , should not be rejected.
Compute the estimated standard error of the mean difference:
Compute the -statistic:
Determine the degrees of freedom:
Since both and are considered large (), the Central Limit Theorem applies and we know that the test statistic
approximately has the distribution, under the assumption that is true.
To calculate the -value of a -test, make use of the following R function:
pt(q, df, lower.tail)
- q: The value at which you wish to evaluate the distribution function.
- df: An integer indicating the number of degrees of freedom.
- lower.tail: If TRUE (default), probabilities are , otherwise, .
Since we are dealing with a two-tailed -test, run the following command to calculate the -value:
This gives:
Since , should not be rejected.