Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
92 views25 pages

T-Test For Independent Samples

The document provides information about performing an independent samples t-test. It discusses: 1) An independent samples t-test compares the means of two independent groups to determine if there is a statistically significant difference between the means. 2) It has assumptions of independence of observations, normality of the dependent variable, and equal variances between the groups. 3) Examples are provided of when to use an independent samples t-test versus a paired samples t-test or one sample t-test.

Uploaded by

Blanche Margate
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
92 views25 pages

T-Test For Independent Samples

The document provides information about performing an independent samples t-test. It discusses: 1) An independent samples t-test compares the means of two independent groups to determine if there is a statistically significant difference between the means. 2) It has assumptions of independence of observations, normality of the dependent variable, and equal variances between the groups. 3) Examples are provided of when to use an independent samples t-test versus a paired samples t-test or one sample t-test.

Uploaded by

Blanche Margate
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

T-test for Independent

Samples
What is t-test for Independent Samples?
The independent samples t test (also called the unpaired samples t test) is the most
common form of the t-test.
It helps you to compare the means of two sets of data.
Example: You could run a t test to see if the averaged test scores of males and
females are different; the test answers the question, “Could these differences have
occurred by random chance?” The two other types of t test are:
✓One sample t-test: used to compare a result to an expected value.
Example: Do males score higher than the average of 70 on a test if their exam time is
switched to 8 a.m.?
✓Paired t-test(dependent samples): used to compare related observations.
Example: Do test scores differ significantly if the test is taken at 8 a.m. or noon?
Assumptions for the Independent Samples t Test
▪ Assumption of Independence: you need two independent, categorical groups
that represent your independent variable.
Example: The test scores of “males” or “females” would be the independent
variable.
▪ Assumption of normality: the dependent variable should be approximately
normally distributed. The dependent variable should be measured on a
continuous scale.
Example: On the average test score, the “test score” would be the dependent
variable.
▪ Assumption of Homogeneity of Variance: the variances of the dependent
variable should be equal.
Use of the independent sample t-test

Use an independent samples t test when you want to compare the


means of precisely two groups—no more and no less!
Typically, you perform this test to determine whether two
population means are different.
Difference between t-Test & Independent
Sample t-Test

Paired-samples t tests compare scores on two different


variables but for the same group of cases;
Independent-samples t tests compare scores on the same
variable but for two different groups of cases.
Tutorials

How to do a Two Sample t-test Paired


Two Sample for Means in EXCEL
Two sample t test for means in Excel: Steps
Step 1: Type your data into Excel. As the two sample Step 6: Click the “Variable 2 Range” box and then select your
t test paired two sample for means is usually used for second variable list (usually the After list).
“before” and “after” data, you’ll probably have three
Step 7: Type a number into the hypothesized mean
columns: the first column for the subject identifier
difference box.
(i.e. a name or a number), the second column for the
Before results and the third column for the After For example, if your null hypothesis is stated that there was
Results. no difference between the means, enter “0.” Otherwise, if you
are hypothesizing there is a difference, type that difference
Step 2: State your null hypothesis. For example, your
into the box.
null hypothesis might be that the means are the
same. Step 8: Check the “Labels” box if you have included labels.
Step 3: Click the “Data” tab and then click “Data Step 9: Type an alpha level into the alpha level box. An alpha
analysis.” If you don’t see the Data Analysis option, level of 0.05, or 5%, is standard in hypothesis testing so if
load the Data Analysis Tool Pak. you aren’t sure what alpha level you need, leave this at 0.05.
Step 4: Click “t test paired two sample for means” Step 10: Click the Output Range box and select an area to
from the options window then click “OK.” the right of your data.
Step 5: Click the “Variable 1 Range” box and then Step 11: Click “OK.”
select your first variable list (usually the Before list)
Reading The Results from the two sample t Test for
means in Excel

Your results will include a lot of data, some that’s obvious (like the number of
data items). But when you run a t-test you’re really only looking for two
things: t-scores and alpha levels.
Step 1: Compare the alpha level you chose (i.e. 0.05) to the p-value in the
output. If the p-value in the output is smaller than the alpha level you
chose, reject the null hypothesis.
Step 2: Compare the t-critical value in the output with the t-value. If the t-value
is larger than the t-critical value, reject the null hypothesis. There are two t-
critical values, one-tail and two-tail. If you aren’t sure if you have a one-tailed
test or two-tailed test, always compare the t-value to the two-tail t critical
value.
In order to fully reject the null hypothesis, use both values (p and t) in
combination. In other words, if you think you might reject the null based on the
t-value, but your p-value is large, then don’t reject the null.
Tutorials

Two Sample t test Assuming Equal Variances.


How to do a Two sample t test in Excel
Assuming Equal variances: Steps
Step 1: Type your data into a worksheet. Step 6: Click the “Variable 2 Range” box and then
Generally, you’ll have a list in one column and select your second data list.
another list in a second column. The t-test will
allow you to compare the means from these two Step 7: Type a number into the Hypothesized Mean
columns. Difference box. For example, if your null hypothesis
Step 2: Write the null hypothesis. For example, stated that there was no difference between the
your null hypothesis might be that the means are means, type “0.”
different by a certain amount. Step 8: Check the “Labels” box (you’ll usually want to
Step 3: Click the “Data” tab and then click “Data include labels so you can easily compare the two sets
analysis.” If you don’t see the Data Analysis button of data).
on the toolbar (to the far right of the Data tab),
load the Data Analysis Toolpak Step 9: Type an alpha level into the alpha level box. If
you don’t know what alpha level you should be using,
Step 4: Click “t test two sample Assuming Equal leave it at 0.05.
variances ” from the options window then click
“OK.” Step 10: Click the Output Range box and select an
Step 5: Click the “Variable 1 Range” box and then area for your output.
select your first data list. Step 11: Click the “OK” button.
Reading The Results from two sample t test
Assuming Equal Variances in Excel

Step 1: Compare the alpha level you types into the two sample t test
Assuming Equal variances window (i.e. 0.05) to the alpha level listed
in the output on the worksheet. If the alpha level in the output is larger
than the alpha level you chose, you will be unable to reject the null
hypothesis.
Step 2: Compare the t-critical value in the output on the worksheet
with the t-value listed. If the t-value is larger than the t-critical value,
you can reject the null hypothesis. There are two t-critical values,
one-tail and two-tail. If you aren’t sure if you have a one-tailed or two
tailed test, always compare the t-value to the two-tail t critical value.
t test Two Sample Assuming Unequal Variances in
Excel
Two sample t test for Unequal Variance: Steps
Step 6: Type the location for your first set of data into
Step 1: Type your data into a worksheet in two the “Variable 2” box.
columns. Step 7: Type a number into the Hypothesized Mean
Step 2: State your null hypothesis (i.e. the Difference box. The hypothesized mean difference
means for both sets of data are the same). should have been stated when you wrote your null
hypothesis. For example, if you think the means are
Step 3: Click “Data” and then click “Data the same then the hypothesized mean difference is 0.
analysis.” If you don’t see Data Analysis, load
the Data Analysis Toolpak Step 8: Check the “Labels” box (assuming you
included labels for your data, which is always a good
Step 4: Click “t test two sample Assuming idea).
unequal variances ” and then click the “OK”
Step 9: Click the “Alpha level” box and then type
button. This will open the t test two sample an alpha level. the default is 0.05, which is a standard
Assuming unequal variances dialog box. alpha level for these tests.
Step 5: Type the location for your first set of Step 10: Click the “Output Range” box and select an
data into the “Variable 1” box. area for your output.
Step 11: Click the “OK” button.
Reading The Results from Two Sample t test
Unequal Variance Excel

1. Reject the null hypothesis if the alpha level in the output is


smaller than your stated alpha level. For example, if the alpha
level in the output is 0.03 and your alpha level from Step 9 was
0.05, you can reject the null hypothesis.
2. Compare the t-value with the t-critical value. If the t-value is
larger than the t-critical value, reject the null hypothesis. There
are two t-critical values—one for a one-tailed test and one for a
two-tailed test. If you don’t know if you have a one or two tailed
test, use the two tailed test figure.
How to Run an Independent Samples T Test in
SPSS

Before you perform a t test in SPSS for independent samples, you


should:
1. Write a hypothesis statement. For the above research question,
the null hypothesis, would be that there is no significant difference.
2. Determine if your test is one-tailed or two-tailed.
3. Specify an alpha level.
Independent Samples t-test in SPSS: Steps

Step 1: Open the worksheet with the data you want to perform the t test in SPSS.
Step 2: Define the SPSS variables you want to perform a t-test on. For example, you might
want to compare GPAs between male and female high school students. Therefore, you’ll
want to define the variables “sex” (i.e. other male or female).
Step 3: Click “Analyze,” then click “Compare Means,” then click “Independent Sample T
Test.”
Independent Samples t-test in SPSS: Steps

Step 4: Select the dependent variable from the left window pane and then click the top
arrow button to move the variables over to the Test Variable(s): window. For this example,
we are comparing GPAs, so the test variable we want to select is GPA.

Step 5: Select the independent variable in the left window and then click the arrow to the
left of the “Grouping Variable” box. The grouping variable is the variable you divided into
groups when you defined variables. For this example, the groups are “male” and “female”
so the grouping variable you want to select is “Sex.”
Independent Samples t-test in SPSS: Steps

Step 6: Click “Define Groups.” For this example, type “1” into the Group 1
box (for female) and then type “2” into the Group 2 box (for male).
Step 7: Click “Continue” and then click “OK.” The test is calculated and
the results will appear in a new window.
t Test in SPSS: Output

Your output will include:


➢The Levine’s test for equal variance (the first section of the
Independent Samples Test box). If the significance level is larger than
.05, you should use the first line in the output table, Equal variances
assumed. If the value is .05 or lower, use the second row of results.
➢Sig (2 Tailed): use the value indicated in Levine’s test. If this p-value
is above .05, then there is not a significant difference in test scores.
Calculating an Independent Samples T Test By
Hand
Sample question: Calculate an independent samples t test
for the following data sets: Step 4: Square the individual scores and then add them up:
A: 11 + 22 + 22 + 33 + 33 + 44 + 44 + 55 + 55 + 66 = 145
Data set A: 1,2,2,3,3,4,4,5,5,6 B: 12 + 22 + 44 + 55 + 55 + 55 + 66 + 66 + 77 + 99 = 298
Data set B: 1,2,4,5,5,5,6,6,7,9 Set these numbers aside for a moment.
Step 1: Sum the two groups: Step 5: Insert your numbers into the following formula and
A: 1 + 2 + 2 + 3 + 3 + 4 + 4 + 5 + 5 + 6 = 35 solve:
𝛍𝐀 − 𝛍 𝐁
B: 1 + 2 + 4 + 5 + 5 + 5 + 6 + 6 + 7 + 9 = 50 𝐭=
𝚺𝐀 𝟐 𝚺𝐁 𝟐
Step 2: Square the sums from Step 1: 𝚺𝐀𝟐 − + (𝚺𝐁𝟐 −
𝐧𝐀 𝐧𝐁 𝟏 𝟏
352 = 1225 +
𝐧𝐀 + 𝐧𝐁 − 𝟐 𝐧𝐀 𝐧𝐁
492 = 2500
Set these numbers aside for a moment.
(ΣA)2: Sum of data set A, squared (Step 2).
Step 3: Calculate the means for the two groups: (ΣB)2: Sum of data set B, squared (Step 2).
A: (1 + 2 + 2 + 3 + 3 + 4 + 4 + 5 + 5 + 6)/10 = 35/10 = 3.5 μA: Mean of data set A (Step 3)
μB: Mean of data set B (Step 3)
B: (1 + 2 + 4 + 5 + 5 + 5 + 6 + 6 + 7 + 9) = 50/10 = 5 ΣA2: Sum of the squares of data set A (Step 4)
Set these numbers aside for a moment. ΣB2: Sum of the squares of data set B (Step 4)
nA: Number of items in data set A
nB: Number of items in data set B
Calculating an Independent Samples T Test By
Hand
𝟑. 𝟓 − 𝟓 Step 8: Compare your calculated value (Step 5)
𝐭=
𝟏𝟐𝟐𝟓 𝟐𝟓𝟎𝟎 to your table value (Step 7). The calculated value
𝟏𝟒𝟓 − 𝟏𝟎 + (𝟐𝟗𝟖 − 𝟏 𝟏 of -1.79 is less than the cutoff of 2.10 from the
𝟏𝟎
+ table. Therefore p > .05. As the p-value is greater
𝟏𝟎 + 𝟏𝟎 − 𝟐 𝟏𝟎 𝟏𝟎
than the alpha level, we cannot conclude that
there is a difference between means.
𝒕 = −𝟏. 𝟔𝟗
Step 6: Find the degrees of freedom
(nA-1 + nB-1) = 18
Step 7: Look up your degrees of freedom (Step 6)
in the t-table. If you don’t know what your alpha
level is, use 5% (0.05). 18 degrees of freedom at
an alpha level of 0.05 = 2.10.

You might also like