Action Research T-tests INFO 515 Glenn Booker INFO 515 Lecture #5 Statistical Significance A little review before we discuss T tests  The Alternative, or Research, Hypothesis states.

Download Report

Transcript Action Research T-tests INFO 515 Glenn Booker INFO 515 Lecture #5 Statistical Significance A little review before we discuss T tests  The Alternative, or Research, Hypothesis states.

Action Research
T-tests
INFO 515
Glenn Booker
INFO 515
Lecture #5
1
Statistical Significance
A little review before we discuss T tests
 The Alternative, or Research, Hypothesis
states the researcher’s belief that some
difference or effect exists
 The Null Hypothesis states that no effect
or no difference exists in the data

INFO 515
Lecture #5
2
Significance versus importance

Keep in mind that the results of a test
may be statistically significant, but that
doesn’t mean the results are important


INFO 515
Just because most serial killers ate cereal as a
child doesn’t mean eating cereal makes one a
serial killer (just a cereal killer)
“Correlation doesn’t imply causation” is a
similar saying
Lecture #5
3
Confidence Intervals

For a large population, N, the
confidence interval for the mean is
given by the mean +/- the critical z
score (zc, e.g. 1.96 for 95% confidence
level) times the standard error
CI = X ± zc(SEx)
where SEx = s/ (n)
INFO 515
Lecture #5
4
Confidence Intervals – Small N

Correct for a small population Np by using
CI = X ± {zc(SEx)* [ (Np-n)/(Np-1) ] }
where ‘n’ is the sample size

This is an alternative to using the
critical t value
Schaum has a summary of zc for various
confidence levels from 50% to 99.73%
on page 203, Table 9-1 (3rd Ed.)
 zc depends only on confidence level, not N

INFO 515
Lecture #5
5
Probable Error

The probable error of some parameter S
is the same as the 50% confidence
interval
CI = X ± 0.6745(SEx)
where the variables are the mean and
standard error terms
INFO 515
Lecture #5
6
Compare Means Using T Tests

There are three major types of T tests; all
are used to compare means of one data
set to a fixed value, or to another data set

“One-sample T Test” (SPSS phrasing)





By hand, we used the Student T test from
last week for small sample sizes (n<30)
Uses z scores for large sample sizes
“Independent-samples T Test”
Dependent- or “Paired-samples T Test”
In SPSS, see Analyze / Compare Means
INFO 515
Lecture #5
7
Check Data First
Before using any T test, it is helpful to
generate a boxplot of the data set
 Since we’re looking at means, look for
extreme values or outliers which may
distort the mean
 May want to hide extreme values


INFO 515
In SPSS, use Data > Select Cases…
Lecture #5
8
Example T Test Null Hypotheses

One-sample



Compare one sample’s mean to a normal,
typical, or population value
Does Sample average = the normal value?
Independent


INFO 515
Compare means of two samples which don’t
directly influence each other (samples are two
different groups of people or things)
Does average income for Midwesterners =
average income for Southerners?
Lecture #5
9
Example T Test Null Hypotheses

Dependent (or Paired)


INFO 515
Compare means of two samples which you
expect to be connected (often, data is from the
same sample at two different times)
Does Average productivity before training =
average productivity after?
Lecture #5
10
One-Sample T-Test

This variation compares one sample mean
against a mean derived from an
independent source, for example a
published source



Are this class’ average IQ scores substantially
different from the average of 100?
Does the average income in my development
differ from the average for my city?
The “mean derived from an independent
source” is called the Test Value in SPSS
INFO 515
Lecture #5
11
One-Sample T Test
The One Sample T Test compares a mean
to a fixed value (which is often
representative of the population, or an
ideal value)
 For this example, use the data file,
world95.sav

INFO 515
Lecture #5
12
One-Sample T Test
Given that the birth to death rate (b_to_d)
should be under 1.25 for a country’s
population to remain stable
 Identify whether countries with different
predominant religions have average birth
to death rates different from this value


But “religion” is a string variable with many
specific values - how handle this?

INFO 515
Could Select Cases for each religion separately, but
that’s tedious!
Lecture #5
13
One-Sample T Test

Instead, isolate three religions using Data
/ Select Cases


Reset the values
Choose If with the condition


Note that “|” means “or” (an artifact from
some programming languages), and double
quotes are used in the expression, not single

INFO 515
religion = “Protstnt” | religion = “Catholic” | religion
= “Muslim”
Earlier versions of SPSS used single quotes!
Lecture #5
14
One-Sample T Test
Use Data / Split File...
 Choose to “Compare Groups”
 Select “Predominant religion” as the
“Groups Based on:” criterion
 In the Data View, note that the “Filter On”
and “Split File On” messages are displayed
in the lower right status bar
 Now generate the actual analysis...

INFO 515
Lecture #5
15
One-Sample T Test
Use Analyze / Compare Means / OneSample T Test… /
 Select Birth to Death Ratio as the Test
Variable(s)
 Set the Test Value to 1.25
 Use the Options button to set the
Confidence Interval to 99% instead
of the default 95%

INFO 515
Lecture #5
16
One-Sample T Test
l
e
E
e
e
e
N
P
C
B
1
5
9
6
M
B
7
2
9
5
P
B
6
6
8
7
m
u
o
n
a
l
e
r
e
e
o
2
p
d
P
t
r
w
p
f
e
C
B
4
0
0
5
6
5
M
B
0
6
0
2
0
5
P
B
3
5
1
6
3
4
INFO 515
Lecture #5
17
One-Sample T Test
Interpretation of the output is exactly
the same for all T Tests
 Reject the null hypothesis (here, b_to_d
distribution includes the value 1.25) if




INFO 515
The magnitude of ‘t’ is greater than the critical
two-tailed t value (which you’d look up)
The significance (Sig.) is under 0.010 (for 99%
confidence)
The confidence interval does not include zero
Lecture #5
18
One-Sample T Test
Note that all three cases would have birth
to death ratios different from 1.25 at the
95% level of confidence (reject the null
hypothesis for all three religions)
 But at a 99% confidence level, the
Protestant countries accept the null
hypothesis




INFO 515
Significance is over 0.010
Confidence interval includes zero
‘t’ value is under 2.947 (which is tc for two-tail
at 99% confidence (Sig = .01))
Lecture #5
19
Independent Sample T-Test
This variety of t-test compares two
independent means
 Two groups are measured using the same
instrument (device, technique), for
example:



INFO 515
Two groups of people who were asked the
same survey
Two samples of parts which were measured
with the same tool
Lecture #5
20
Independent Sample T-Test

Other examples


INFO 515
Compare means of two groups of people
(average income for Democrats vs
Republicans)
Compare means for different types of patrons
(average library usage for graduate students
vs undergrad)
Lecture #5
21
Independent Samples T Test
With SPSS, use Analyze / Compare Means
/ Independent-Samples T Test… /
 Select the Test Variable(s), which are
the variables whose means you want
to examine (test score, income, etc.)
 The Grouping Variable is the distinguishing
characteristic you want (gender, political
party, climate,…)

INFO 515
Lecture #5
22
Independent Samples T Test

Key limitation for the Independent
Samples T Test

INFO 515
You have to specify exactly two values for the
Grouping Variable, if more than two are
possible (otherwise this is the ANOVA lecture –
analysis of variance)
Lecture #5
23
Independent Samples T Test
Suppose we want to know if the average
daily calorie intake is different for people
who live in tropical climates, than those
in temperate climates (hypothesis)
 For the “world95.sav” data set,




INFO 515
use Analyze / Compare Means / IndependentSamples T Test… /
Use ‘Daily calorie intake’ as Test Variable
Grouping Variable ‘predominant climate’ =
tropical and temperate (#5 and 8), we get:
Lecture #5
24
Indep. Samples T Test Inputs
INFO 515
Lecture #5
25
Independent Samples T Test
Group Statistics
Daily calorie intake
Predominant climate
tropical
temperate
N
28
23
Mean
2374.93
3216.65
Std. Deviation
308.809
529.417
Std. Error
Mean
58.359
110.391
S
s
u
f a
V
o
n
a
l
e
r
.
e
E
a
e
e
o
2
p
F
d
i
t
r
r
w
g
p
f
e
e
D
E
0
7
2
9
0
2
6
8
7
a
E
1
1
0
2
7
2
2
n
INFO 515
Lecture #5
26
Independent Samples T Test

The Group Statistics section gives general
descriptive statistics for the data


Note that the sample size, mean, standard
deviation, and standard error are all given
The Independent Samples Test section
is where this specific test’s results are
presented

INFO 515
What’s this stuff about “Equal variances”?
Lecture #5
27
Levene’s Test

Levene’s Test tells whether to use “Equal
variances assumed” or not



The null hypothesis for Levene’s Test is that
“the variances for the two groups of data
are equal”
Like most of this statistical universe:
if the Sig. of the test is below the critical
value (0.050), reject the null hypothesis
Notice that ‘df’ changes, depending on
the outcome of Levene’s Test
INFO 515
Lecture #5
28
Levene’s Test

So to interpret Levene’s Test:



If its Significance level is below 0.050, use the
“Equal variances not assumed” row of output;
assume separate variances, which reduces df
If the Significance level is >= 0.050 use
“Equal variances assumed” which is also called
“pooled variances”
Often the results are the same either way
INFO 515
Lecture #5
29
Independent Samples T Test

So what’s the answer to this problem?

You could look at the ‘t’ value, and compare it
to the critical t score for your desired level of
confidence (here tc = 2.034)


INFO 515
|t| > tc means reject the null hypothesis
Or, if the T-Test’s significance level
(Sig. (2-tailed)) is below your desired value
(e.g. 0.050), then reject the null hypothesis
(i.e. there is a significant difference)
Lecture #5
30
Independent Samples T Test


Could also use the confidence interval for the
difference in the means - if it includes zero,
then accept the null hypothesis
For this example, all three ways to
evaluate the results agree

INFO 515
We conclude that people in temperate climates
do not consume the same amount as those in
tropical climates
Lecture #5
31
Dependent Sample T-Tests

Related sample, paired sample, correlated
sample--these are all names for
dependent means T-Tests (SPSS calls
them Paired-Samples)

INFO 515
Each subject in one sample has a
corresponding subject in the second sample…
often the same person, or organization, or
whatever thing the subject is
Lecture #5
32
Dependent Sample T-Tests

Examples



INFO 515
Mean test scores for one group of students,
before and after receiving training
Mean pulse, blood pressure, or some other
body characteristic before and after receiving
some medication
Mean IQ scores for the same group of people,
for two consecutive years
Lecture #5
33
Dependent Sample T-Tests
This compares the averages of two
columns of data, which generally relate
to before and after some treatment
 Can also be used to compare two
related variables



INFO 515
Here, use “world95.sav” to compare the life
expectancy for males and females in OECD
countries (the USA and Western Europe)
Male vs. female sounds like a weak example,
but wait a few slides and we’ll show it isn’t
Lecture #5
34
Dependent Sample T-Tests
Use Data / Select Cases to isolate If
region=1
 In SPSS, use Analyze / Compare Means /
Paired-Samples T Test… /



INFO 515
Click on “lifeexpf” and “lifeexpm”, then move
them both to the Paired Variables section at
once (you have to select two variables)
The Options button allows you to change the
default 95% confidence level (but don’t)
Lecture #5
35
Dependent Sample T-Tests
l
E
e
e
N
e
a
P
A
0
1
8
6
1
l
i
A
1
1
5
5
l
i
e
N
i
P
A
1
e
m
INFO 515
Lecture #5
36
Dependent Sample T-Tests
The Paired Samples Statistics shows the
general descriptive statistics for the data
 The Paired Samples Correlations section
indicates whether there is a strong
relationship between the data


A small significance (<0.050) indicates that
there is a correlation, and hence a paired test
is better than a test for independent variables

INFO 515
This justifies using the male/female example as
dependent samples!
Lecture #5
37
Dependent Sample T-Tests
Paired Samples Test
Paired Differences
Mean
Pair
1
Average female life
expectancy - Average
male life expectancy
INFO 515
6.381
Std. Deviation
Std. Error
Mean
.865
.189
95% Confidence
Interval of the
Difference
Lower
Upper
Lecture #5
5.987
6.775
t
33.819
df
Sig . (2-tailed)
20
.000
38
Dependent Sample T-Tests

The Paired Samples Test section gives the actual
test results


The Paired Differences describes the distribution of the
differences between pairs of data
We have three ways to determine the outcome;
reject the null hypothesis if:



t > critical t score for two-tailed test (here tc=2.086)
Sig. (2-tailed) < 0.050 (desired significance level)
Confidence interval for the difference does not
include zero
 Psst!
INFO 515
Is this pattern looking familiar yet?
Lecture #5
39
One-tailed and two-tailed tests

Choosing an appropriate test - one-tailed
or two-tailed - will depend on the research
hypothesis


A “Difference” in the hypothesis implies no
specific direction: use two-tailed test
Only “Greater than” hypotheses or “less than”
hypotheses imply a one-tailed test

INFO 515
This is a weaker assumption, and results in a
smaller, one-directional, critical t value
Lecture #5
40
One or Two Tails?
We have used two tail tests so far, to see
if the likely range of some parameter (e.g.
mean), is different from another (could be
either larger or smaller)
 A one tailed test is used to check if
something is larger than another OR
something is less than another (pick just
one of those options)

INFO 515
Lecture #5
41
One or Two Tails?

The effect of using the one tail test is that
we want the entire left or right side of the
distribution to contain all of the
uncertainty


INFO 515
One-tail lowers zc because the test only checks
one side of the distribution, hence all of the
uncertainty is on that side of the distribution
For example, zc for one-tailed confidence of
95% is the same as zc for two-tailed at 90%
Lecture #5
42
One or Two Tails?
Confidence level
95%
99%
One tailed zc
-1.645 or +1.645 -2.33 or +2.33
Two tailed zc
-1.96 and +1.96 -2.57 and +2.57
(Schaum p. 218)
INFO 515
Lecture #5
43
One or Two Tails?
The bottom line?
 As a rule of thumb, use two-tailed tests
unless the circumstances being measured
make it physically impossible for a twotailed outcome to occur

INFO 515
Lecture #5
44