Sunteți pe pagina 1din 11

# INDEPENDENT T TEST

Search

Statistics How To
Statistics for the rest of us!

 HOME
 TABLES
 PROBABILITY AND STATISTICS
 CALCULATORS
 STATISTICS BLOG
 MATRICES
 EXPERIMENTAL DESIGN
 PRACTICALLY CHEATING STATISTICS HANDBOOK

## Independent Samples T Test (Unpaired Samples):

Definition, Running
T-Distribution > Independent Samples T Test

## The rejection regions in a two-tailed t-distribution. Image: ETSU.edu

Contents:
 What is an Independent Samples T Test?
 Assumptions for the Independent Samples T Test
 How to Run an Independent Samples T Test (Excel/SPSS)
 How to Calculate an Independent Samples T Test by Hand

## What is an Independent Samples T Test?

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. For
example, you could run a t test to see if the average 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. For 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. For
example, do test scores differ significantly if the test is taken at 8 a.m. or noon?
This test is extremely useful because for the z test you need to know facts about the
population, like the population standard deviation. With the independent samples t test,
you don’t need to know this information. You should use this test when:
 You do not know the population mean or standard deviation.
 You have two independent, separate samples.

## Assumptions for the Independent Samples T

Test
 Assumption of Independence: you need two independent, categorical groups
that represent your independent variable. In the above example of test scores
“males” or “females” would be your independent variable.
 Assumption of normality: the dependent variable should be approximately
normally distributed. The dependent variable should also be measured on a
continuous scale. In the above example on average test scores, the “test score”
would be the dependent variable.
 Assumption of Homogeneity of Variance: The variances of the dependent
variable should be equal.

## How to Run an Independent Samples T Test

Technology is usually used to run this test. For Excel instructions, see: How to run a T Test
in Excel. For instructions by hand, scroll down.

## 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.
Watch the video or read the steps below:

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). If you aren’t sure
how to define variables in SPSS, click here to find out how.
Step 3: Click “Analyze,” then click “Compare Means,” then click “Independent
Sample T Test.”

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.”
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

 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.
Tip: Click “Options” on the t-test window to change the confidence interval.
Check out out YouTube Channel for more SPSS videos!

## Calculating an Independent Samples T Test By

hand
Sample question: Calculate an independent samples t test for the following data sets:
Data set A: 1,2,2,3,3,4,4,5,5,6
Data set B: 1,2,4,5,5,5,6,6,7,9
Step 1: Sum the two groups:
A: 1 + 2 + 2 + 3 + 3 + 4 + 4 + 5 + 5 + 6 = 35
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.
Step 3: Calculate the means for the two groups:
A: (1 + 2 + 2 + 3 + 3 + 4 + 4 + 5 + 5 + 6)/10 = 35/10 = 3.5
B: (1 + 2 + 4 + 5 + 5 + 5 + 6 + 6 + 7 + 9) = 50/10 = 5
Set these numbers aside for a moment.
Step 4: Square the individual scores and then add them up:
A: 11 + 22 + 22 + 33 + 33 + 44 + 44 + 55 + 55 + 66 = 145
B: 12 + 22 + 44 + 55 + 55 + 55 + 66 + 66 + 77 + 99 = 298
Set these numbers aside for a moment.
Step 5: Insert your numbers into the following formula and solve:

## (ΣA)2: Sum of data set A, squared (Step 2).

(ΣB)2: Sum of data set B, squared (Step 2).
μA: Mean of data set A (Step 3)
μB: Mean of data set B (Step 3)
ΣA2: Sum of the squares of data set A (Step 4)
Σ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
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.
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.
------------------------------------------------------------------------------
Need help with a homework or test question? With Chegg Study, you can get step-
by-step solutions to your questions from an expert in the field. Your first 30 minutes with
a Chegg tutor is free!
Statistical concepts explained visually - Includes many concepts such as sample size,
hypothesis tests, or logistic regression, explained by Stephanie Glen, founder of
StatisticsHowTo.
page.
By Stephanie | July 11, 2015 | Statistics How To |
 ← Parsimonious Model: Definition, Ways to Compare Models
 Assignment Bias: Definition, Avoidance →

Find an article
Search
Feel like "cheating" at Statistics? Check out the grade-increasing book that's

We encourage you to view our updated policy on cookies and affiliates. Find out
more.Okay, thanks
ONE SAMPLE F TEST
Search

Statistics How To
Statistics for the rest of us!

 HOME
 TABLES
 PROBABILITY AND STATISTICS
 CALCULATORS
 STATISTICS BLOG
 MATRICES
 EXPERIMENTAL DESIGN
 PRACTICALLY CHEATING STATISTICS HANDBOOK

F-Test
Hypothesis Testing > F-Test

Contents:
1. What is an F Test?
2. General Steps for an F Test
3. F Test to Compare Two Variances
 By hand
 Two-tailed F test
 Excel instructions

What is an F Test?
An “F Test” is a catch-all term for any test that uses the F-distribution. In most cases,
when people talk about the F-Test, what they are actually talking about is The F-Test to
Compare Two Variances. However, the f-statistic is used in a variety of tests
including regression analysis, the Chow test and the Scheffe Test (a post-
hoc ANOVA test).

## General Steps for an F Test

If you’re running an F Test, you should use Excel, SPSS, Minitab or some other kind of
technology to run the test. Why? Calculating the F test by hand, including variances, is
tedious and time-consuming. Therefore you’ll probably make some errors along the way.
If you’re running an F Test using technology (for example, an F Test two sample for
variances in Excel), the only steps you really need to do are Step 1 and 4 (dealing with
the null hypothesis). Technology will calculate Steps 2 and 3 for you.
1. State the null hypothesis and the alternate hypothesis.
2. Calculate the F value. The F Value is calculated using the formula F = (SSE1 –
SSE2 / m) / SSE2 / n-k, where SSE = residual sum of squares, m = number of
restrictions and k = number of independent variables.
3. Find the F Statistic (the critical value for this test). The F statistic formula is:
F Statistic = variance of the group means / mean of the within group
variances.
You can find the F Statistic in the F-Table.
4. Support or Reject the Null Hypothesis.

## F Test to Compare Two Variances

A Statistical F Test uses an F Statistic to compare two variances, s1 and s2, by dividing
them. The result is always a positive number (because variances are always positive).
The equation for comparing two variances with the f-test is:
F = s 21 / s22
If the variances are equal, the ratio of the variances will equal 1. For example, if you had
two data sets with a sample 1 (variance of 10) and a sample 2 (variance of 10), the ratio
would be 10/10 = 1.
You always test that the population variances are equal when running an F Test. In other
words, you always assume that the variances are equal to 1. Therefore, your null
hypothesis will always be that the variances are equal.

Assumptions
approximately normally distributed (i.e. fit the shape of a bell curve) in order to use
the test. Plus, the samples must be independent events. In addition, you’ll want to bear
in mind a few important points:
 The larger variance should always go in the numerator (the top number) to force
the test into a right-tailed test. Right-tailed tests are easier to calculate.
 For two-tailed tests, divide alpha by 2 before finding the right critical value.
 If you are given standard deviations, they must be squared to get the variances.
 If your degrees of freedom aren’t listed in the F Table, use the larger critical value.
This helps to avoid the possibility of Type I errors.

## F Test to compare two variances by hand: Steps

Warning: F tests can get really tedious to calculate by hand, especially if you have to
calculate the variances. You’re much better off using technology (like Excel — see below).
These are the general steps to follow. Scroll down for a specific example
(watch the video underneath the steps).
Step 1: If you are given standard deviations, go to Step 2. If you are given variances to
compare, go to Step 3.
Step 2: Square both standard deviations to get the variances. For example, if σ1 = 9.6
and σ2 = 10.9, then the variances (s1 and s2) would be 9.62 = 92.16 and 10.92 = 118.81.
Step 3: Take the largest variance, and divide it by the smallest variance to get the f-
value. For example, if your two variances were s1 = 2.5 and s2 = 9.4, divide 9.4 / 2.5
= 3.76.
Why? Placing the largest variance on top will force the F-test into a right tailed test,
which is much easier to calculate than a left-tailed test.
Step 4: Find your degrees of freedom. Degrees of freedom is your sample size minus 1.
As you have two samples (variance 1 and variance 2), you’ll have two degrees of
freedom: one for the numerator and one for the denominator.
Step 5: Look at the f-value you calculated in Step 3 in the f-table. Note that there are
several tables, so you’ll need to locate the right table for your alpha level. Unsure how to
Step 6: Compare your calculated value (Step 3) with the table f-value in Step 5. If the f-
table value is smaller than the calculated value, you can reject the null hypothesis.
That’s it!

## Two Tailed F-Test

The difference between running a one or two tailed F test is that the alpha level needs to
be halved for two tailed F tests. For example, instead of working at α = 0.05, you use α =
0.025; Instead of working at α = 0.01, you use α = 0.005.
With a two tailed F test, you just want to know if the variances are not equal to each
other. In notation:
Ha = σ21 ≠ σ2 2
Sample problem: Conduct a two tailed F Test on the following samples:
Sample 1: Variance = 109.63, sample size = 41.
Sample 2: Variance = 65.99, sample size = 21.
Step 1: Write your hypothesis statements:
Ho: No difference in variances.
Ha: Difference in variances.
Step 2: Calculate your F critical value. Put the highest variance as the numerator and the
lowest variance as the denominator:
F Statistic = variance 1/ variance 2 = 109.63 / 65.99 = 1.66
Step 3: Calculate the degrees of freedom:
The degrees of freedom in the table will be the sample size -1, so:
Sample 1 has 40 df (the numerator).
Sample 2 has 20 df (the denominator).
Step 4: Choose an alpha level. No alpha was stated in the question, so use 0.05 (the
standard “go to” in statistics). This needs to be halved for the two-tailed test, so use
0.025.
Step 5: Find the critical F Value using the F Table. There are several tables, so make sure
you look in the alpha = .025 table. Critical F (40,20) at alpha (0.025) = 2.287.

Step 6: Compare your calculated value (Step 2) to your table value (Step 5). If your
calculated value is higher than the table value, you can reject the null hypothesis:
F calculated value: 1.66
F value from table: 2.287.
1.66 < 2 .287.
So we cannot reject the null hypothesis.

## F-Test to Compare Two Variances in Excel

Watch the video or read the steps below:
F-test two sample for variances Excel 2013: Steps
Step 1: Click the “Data” tab and then click “Data Analysis.”
Step 2: Click “F test two sample for variances” and then click “OK.”
Step 3: Click the Variable 1 Range box and then type the location for your first set of
data. For example, if you typed your data into cells A1 to A10, type “A1:A10” into that
box.
Step 4: Click the Variable 2 box and then type the location for your second set of data.
For example, if you typed your data into cells B1 to B10, type “B1:B10” into that box.
Step 5: Click the “Labels” box if your data has column headers.
Step 6: Choose an alpha level. In most cases, an alpha level of 0.05 is usually fine.
Step 7: Select a location for your output. For example, click the “New Worksheet” radio
button.
Step 8: Click “OK.”
Step 9: Read the results. If your f-value is higher than your F critical value, reject the null
hypothesis as your two populations have unequal variances.
Warning: Excel has a small “quirk.” Make sure that variance 1 is higher than variance 2.
If it isn’t switch your input data around (i.e. make input 1 “B” and input 2 “A”). Otherwise,
Excel will calculate an incorrect f-value. This is because the variance is a ratio of variance
1/variance 2, and Excel can’t work out which set of data is set 1 and set 2 without you
explicitly telling it.

Subscribe to our Youtube channel for more stats videos.
------------------------------------------------------------------------------
Need help with a homework or test question? With Chegg Study, you can get step-
by-step solutions to your questions from an expert in the field. Your first 30 minutes with
a Chegg tutor is free!
Statistical concepts explained visually - Includes many concepts such as sample size,
hypothesis tests, or logistic regression, explained by Stephanie Glen, founder of
StatisticsHowTo.
page.