0% found this document useful (0 votes)
85 views18 pages

Compare Means: 1-One Sample T Test

The document compares three statistical tests for comparing means: the one sample t-test, paired samples t-test, and independent samples t-test. The one sample t-test compares a single sample mean to a constant, while the paired samples t-test compares two means that are related or matched. The independent samples t-test compares the means of two independent groups to determine if their population means are significantly different. Each test has specific hypotheses, test statistics, and assumptions regarding variances that determine how to interpret their results.

Uploaded by

bzhar osman
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)
85 views18 pages

Compare Means: 1-One Sample T Test

The document compares three statistical tests for comparing means: the one sample t-test, paired samples t-test, and independent samples t-test. The one sample t-test compares a single sample mean to a constant, while the paired samples t-test compares two means that are related or matched. The independent samples t-test compares the means of two independent groups to determine if their population means are significantly different. Each test has specific hypotheses, test statistics, and assumptions regarding variances that determine how to interpret their results.

Uploaded by

bzhar osman
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/ 18

Compare Means

1- One Sample t Test

The One Sample t Test can only compare a single sample mean to a specified constant. It can
not compare sample means between two or more groups.

Hypotheses

The null hypothesis (H0) and (two-tailed) alternative hypothesis (H1) of the one sample T test
can be expressed as:

H0: µ = ̅ ("the sample mean is equal to the [proposed] population mean")


H1: µ ≠ ̅ ("the sample mean is not equal to the [proposed] population mean")

where µ is a constant proposed for the population mean and x is the sample mean.

The test statistic for a One Sample t Test is denoted t, which is calculated using the following
formula:
To run a One Sample t Test click Analyze > Compare Means > One-Sample T Test.

B Test Value: The hypothesized population mean against which your test variable(s) will

be compared.

Example

In the Test Value field, enter 66.5, which is the CDC's estimation of the average height of
adults over 20.
A Test Value: The number we entered as the test value in the One-Sample T Test window.

B t Statistic: In this example, t = 5.810. Note that t is calculated by dividing the mean

difference (E) by the standard error mean (from the One-Sample Statistics box).

C df: The degrees of freedom one-sample t test, df = n - 1; so here, df = 408 - 1 = 407.

D Sig. (2-tailed): The two-tailed p-value corresponding to the test statistic.

E Mean Difference: The difference between the "observed" sample mean (from the One

Sample Statistics box) and the "expected" mean (the specified test value (A)). The sign of the
mean difference corresponds to the sign of the t value (B). The positive t value in this example
indicates that the mean height of the sample is greater than the hypothesized value (66.5).

F Confidence Interval for the Difference: The confidence interval for the difference

between the specified test value and the sample mean.


DECISION AND CONCLUSIONS

Since p < 0.001, we reject the null hypothesis that the sample mean is equal to the
hypothesized population mean and conclude that the mean height of the sample is
significantly different than the average height of the overall adult population.

2- Paired Samples t Test


The Paired Samples t Test compares two means that are from the same individual,
object, or related units. The two means typically represent two different times (e.g.,
pre-test and post-test with an intervention between the two time points) or two
different but related conditions or units (e.g., left and right ears, twins). The purpose of
the test is to determine whether there is statistical evidence that the mean difference
between paired observations on a particular outcome is significantly different from
zero. The Paired Samples t Test is a parametric test.

This test is also known as:


 Dependent t Test
 Paired t Test
 Repeated Measures t Test
Common Uses

The Paired Samples t Test is commonly used to test the following:


 Statistical difference between two time points
 Statistical difference between two conditions
 Statistical difference between two measurements
 Statistical difference between a matched pair

Note: The Paired Samples t Test can only compare the means for two (and only
two) related (paired) units on a continuous outcome that is normally distributed.

Hypotheses

H0: µ1 = µ2 ("the paired population means are equal")


H1: µ1 ≠ µ2 ("the paired population means are not equal")

OR
H0: µ1 - µ2 = 0 ("the difference between the paired population means is equal to 0")
H1: µ1 - µ2 ≠ 0 ("the difference between the paired population means is not 0")

Test Statistic

The test statistic for the Paired Samples t Test, denoted t, follows the same formula as the one

A Pair: The “Pair” column represents the number of Paired Samples t Tests to run. You may

choose to run multiple Paired Samples t Tests simultaneously by selecting multiple sets of
matched variables. Each new pair will appear on a new line.

B Variable1: The first variable, C Variable2: The second variable,


D Options: where you can specify the Confidence Interval

Example

The sample dataset has placement test scores (out of 100 points) for four subject areas:
English, Reading, Math, and Writing. Suppose we are particularly interested in the
English and Math sections, and want to determine whether English or Math had
higher test scores on average. We could use a paired t test to test if there was a
significant difference in the average of the two tests.

DECISION AND CONCLUSIONS


From the results, we can say that:
 There was a significant average difference between English and Math scores
(t397 = 36.313, p < 0.001)
 On average, English scores were 17 points higher than Math scores (95% CI
[16.36, 18.23])

3- Independent Samples t Test

The Independent Samples t Test compares the means of two independent groups in order to
determine whether there is statistical evidence that the associated population means are
significantly different. The Independent Samples t Test is a parametric test.
This test is also known as:

 Independent t Test
 Independent Measures t Test
 Independent Two-sample t Test
 Student t Test
 Two-Sample t Test
 Uncorrelated Scores t Test
 Unpaired t Test
 Unrelated t Test

Note: When one or more of the assumptions for the Independent Samples t Test are
not met, you may want to run the nonparametric Mann-Whitney U Test instead.

Hypotheses

The null hypothesis (H0) and alternative hypothesis (H1) of the independent samples T
test can be expressed in two different but equivalent ways:

H0: µ1 = µ2 ("the two population means are equal")


H1: µ1 ≠ µ2 ("the two population means are not equal")

OR

H0: µ1 - µ2 = 0 ("the difference between the two population means is equal to 0")
H1: µ1 - µ2 ≠ 0 ("the difference between the two population means is not 0")

Levene’s Test for Equality of Variances

Recall that the independent samples T test requires the assumption of homogeneity of
variance -- i.e., both groups have the same variance. SPSS conveniently includes a
test for the homogeneity of variance, called Levene's Test, whenever you run
an independent samples T test.

The hypotheses for Levene’s test are:

H0: σ12 - σ22 = 0 ("the population variances of group 1 and 2 are equal")
H1: σ12 - σ22 ≠ 0 ("the population variances of group 1 and 2 are not equal")
Test Statistic

The test statistic for an Independent Samples t Test is denoted t. There are actually two forms
of the test statistic for this test, depending on whether or not equal variances are assumed.
SPSS produces both forms of the test, so both forms of the test are described here. Note that
the null and alternative hypotheses are identical for both forms of the test
statistic.

A- EQUAL VARIANCES ASSUMED

When the two independent samples are assumed to be drawn from populations with identical
population variances (i.e., σ12 = σ22) , the test statistic t is computed as:

sp = Pooled standard deviation

degrees of freedom df = n1 + n2 - 2.

B- EQUAL VARIANCES NOT ASSUMED

When the two independent samples are assumed to be drawn from populations with unequal
variances (i.e., σ12 ≠ σ22), the test statistic t is computed as:
The calculated degrees of freedom

Run an Independent Samples t Test

A Test Variable(s): This is the continuous variable whose means will be compared

between the two groups.

B Grouping Variable: The independent variable. The categories (or groups) of the

independent variable will define which samples will be compared in the t test.

C Define Groups: Click Define Groups to define the category indicators (groups) to use

in the t test.
Clicking the Define Groups button (C) opens the Define Groups window:

2 Cut point: If your grouping variable is numeric and continuous, you can designate a cut

point for dichotomizing the variable. This will separate the cases into two categories based on
the cut point. Specifically, for a given cut point x, the new categories will be:

 Group 1: All cases where grouping variable > x


 Group 2: All cases where grouping variable < x
Example: Independent samples T test when variances are not equal

PROBLEM STATEMENT
In our sample dataset, students reported their typical time to run a mile. Suppose we want to
know if the average time to run a mile is different for athletes versus non-athletes.

H0: µnon-athlete - µathlete = 0 ("the difference of the means is equal to zero")


H1: µnon-athlete - µathlete ≠ 0 ("the difference of the means is not equal to zero")
The second section, Independent Samples Test, displays the results most relevant to the
Independent Samples t Test. There are two parts that provide different pieces of information:
(A) Levene’s Test for Equality of Variances and (B) t-test for Equality of Means.

A Levene's Test for Equality of of Variances: This section has the test results for

Levene's Test. From left to right:

 F is the test statistic of Levene's test


 Sig. is the p-value corresponding to this test statistic.

The p-value of Levene's test is printed as ".000" (but should be read as p < 0.001 --
i.e., p very small), so we we reject the null of Levene's test and conclude that the
variance in mile time of athletes is significantly different than that of non-athletes.

This tells us that we should look at the "Equal variances not assumed" row for
the t-test (and corresponding confidence interval) results. (If this test result had not
been significant -- that is, if we had observed p > α -- then we would have used the "Equal
variances assumed" output.)

B t-test for Equality of Means provides the results for the actual Independent

Samples t Test. From left to right:


 t is the computed test statistic
 df is the degrees of freedom
 Sig (2-tailed) is the p-value corresponding to the given test statistic and degrees of freedom
 Mean Difference is the difference between the sample means; it also corresponds to the
numerator of the test statistic
 Std. Error Difference is the standard error; it also corresponds to the denominator of the test
statistic

DECISION AND CONCLUSIONS

Since p < .0001 is less than our chosen significance level α = 0.05, we can reject the null
hypothesis, and conclude that the that the mean mile time for athletes and non-
athletes is significantly different.

4- One-Way ANOVA

The One-Way ANOVA ("analysis of variance") compares the means of two or more
independent groups in order to determine whether there is statistical evidence that the
associated population means are significantly different. One-Way ANOVA is a parametric test.

This test is also known as:

 One-Factor ANOVA
 One-Way Analysis of Variance
 Between Subjects ANOVA
Hypotheses

The null and alternative hypotheses of one-way ANOVA can be expressed as:

H0: µ1 = µ2 = µ3 = ... = µk ("all k population population means are equal")


H1: At least one µi different ("at least one of the k population means is not equal to the
others")
A Dependent List: The dependent variable(s). This is the variable whose means will be

compared between the samples (groups). You may run multiple means
comparisons simultaneously by selecting more than one dependent variable.

B Factor: The independent variable. The categories (or groups) of the independent variable

will define which samples will be compared. The independent variable must have at least two
categories (groups), but usually has three or more groups when used in a One-Way ANOVA.

C Contrasts: (Optional) Specify contrasts, or planned comparisons, to be conducted after

the overall ANOVA test.


When the initial F test indicates that significant differences exist between group means,
contrasts are useful for determining which specific means are significantly different when you
have specific hypotheses that you wish to test. Contrasts are decided before analyzing the
data (i.e., a priori). Contrasts break down the variance into component parts. They may
involve using weights, non-orthogonal comparisons, standard contrasts, and polynomial
contrasts (trend analysis).

Many online and print resources detail the distinctions among these options and will help
users select appropriate contrasts. Please see the IBM SPSS guide for detailed information on
Contrasts by clicking the ? button at the bottom of the dialog box.

D Post Hoc: (Optional) Request post hoc (also known as multiple comparisons) tests.

Specific post hoc tests can be selected by checking the associated boxes.
1 Equal Variances Assumed: Multiple comparisons options that assume homogeneity of

variance (each group has equal variance). For detailed information about the specific
comparison methods, click the Help button in this window.

2 Test: By default, a 2-sided hypothesis test is selected. Alternatively, a directional, one-

sided hypothesis test can be specified if you choose to use a Dunnett post hoc test. Click the
box next to Dunnett and then specify whether the Control Category is the Last or First
group, numerically, of your grouping variable. In the Test area, click either < Control or >
Control. The one-tailed options require that you specify whether you predict that the mean
for the specified control group will be less than (> Control) or greater than (< Control)
another group.

3 Equal Variances Not Assumed: Multiple comparisons options that do not assume

equal variances. For detailed information about the specific comparison methods, click
the Help button in this window.

4 Significance level: The desired cutoff for statistical significance. By default, significance

is set to 0.05.
When the initial F test indicates that significant differences exist between group means, post
hoc tests are useful for determining which specific means are significantly different when you
do not have specific hypotheses that you wish to test. Post hoc tests compare each pair of
means (like t-tests), but unlike t-tests, they correct the significance estimate to account for the
multiple comparisons.

E Options: Clicking Options will produce a window where you can specify

which Statistics to include in the output (Descriptive, Fixed and random effects,
Homogeneity of variance test, Brown-Forsythe, Welch), whether to include a Means plot,
and how the analysis will address Missing Values (i.e., Exclude cases analysis by
analysis or Exclude cases listwise). Click Continue when you are finished making
specifications.

Example

N Mean Std. Deviation

Nonsmoker 261 6.411 1.252

Past smoker 33 6.835 1.024


N Mean Std. Deviation

Current smoker 59 7.121 1.084

Total 353 6.569 1.234

OUTPUT
The output displays a table entitled ANOVA.

Sum of Squares df Mean Square F Sig.

Between Groups 26.788 2 13.394 9.209 .000

Within Groups 509.082 350 1.455

Total 535.870 352

After any table output, the Means plot is displayed.

DISCUSSION AND CONCLUSIONS


We conclude that the mean sprint time is significantly different for at least one of the smoking
groups (F2, 350= 9.209, p < 0.001). Note that the ANOVA alone does not tell us specifically
which means were different from one another. To determine that, we would need to follow up
with multiple comparisons (or post-hoc) tests.

You might also like