Transcript Document

Psy B07
HYPOTHESIS TESTING
APPLIED TO MEANS
Chapter 7
Slide 1
Psy B07
Outline









Central Limit Theorem
Single Means – σ is known
Single Means – σ is unknown
Pairs of Means – Matched Samples
Pairs of Means – Independent Samples
Variance Sum Law
Pooling Variances & Unequal Ns
Heterogeneity of Variance
The Cookbook
Chapter 7
Slide 2
Psy B07
Typical Question
Q1: Is some sample mean different from what
would be expected given some population
distribution?
 On the face of it, this question should remind
you of your previous fun with z-scores.
 In the case of z-scores, we asked whether
some observation was significantly different
from some sample mean.
 In the case of this question, we are asking
whether some sample mean is significantly
different from some population mean
Chapter 7
Slide 3
Psy B07
Typical Question
 Despite this apparent similarity, the questions
are different because the sampling distribution
of the mean (the t distribution) is different
from the sampling distribution of observations
the z distribution).
 In order to understand the distinction between
the z and t-tests, we need to understand the
Central Limit Theorem. . .
Chapter 7
Slide 4
Psy B07
Central Limit Theorem
 CLT: Given a population with mean μ and
variance σ, the sampling distribution of the
mean (the distribution of sample means) will
have a mean equal to μ (i.e., x   ), a variance
2
2

( x ) equal to n , and a standard deviation
( ) equal to 
. The distribution will
x
n
approach the normal distribution as N, the
sample size, increases.
Chapter 7
Slide 5
Psy B07
Central Limit Theorem
1. Population of Scores
1, 2, 4, 5, 8
N=5
μx = 4.00
σX = 2.45
Chapter 7
Slide 6
Psy B07
Central Limit Theorem
2. All possible samples of size 2 (n=2)
1,1
1,2
1,4
1,5
1,8
Chapter 7
2,1
2,2
2,4
2,5
2,8
4,1
4,2
4,4
4,5
4,8
5,1
5,2
5,4
5,5
5,8
8,1
8,2
8,4
8,5
8,8
Slide 7
Psy B07
Central Limit Theorem
3. Sampling distribution of sample means
1.0
1.5
2.5
3.0
4.5
Chapter 7
1.5
2.0
3.0
3.5
5.0
2.5
3.0
4.0
4.5
6.0
3.0
3.5
4.5
5.0
6.5
4.5
5.0
6.0
6.5
8.0
Slide 8
Psy B07
Central Limit Theorem
4.
x
x 
 4.00
Nx
( x )
Chapter 7
Slide 9
Psy B07
Central Limit Theorem
5.
( x   x )
x 
 1.73
Nx
2
 x 2.45
x 

 1.73
n
2
Chapter 7
Slide 10
Psy B07
Single Means – σ is known
 Although it is seldom the case,
sometimes we know the variance (as
well as the mean) of the population
distribution of interest.
 In such cases, we can do a revised
version of the z-test that takes into
account the central limit theorem
Chapter 7
Slide 11
Psy B07
Single Means – σ is known
 Specifically...
x 
z
 ...becomes...
Chapter 7
x  x 
z


x
n
Slide 12
Psy B07
Single Means – σ is known
 With this formula, we can answer questions like the
following: Say I sampled 25 students at UofT and
measured their IQ, finding a mean of 110. Is this mean
significantly different from the population which has a
mean IQ of 100 and a standard deviation of 15?
x   110  100
z

 3.33

15
n
25
Chapter 7
Slide 13
Psy B07
Single Means – σ is unknown
 Unfortunately, it is very rare that we know the
population standard deviation.
 Instead we must use the sample standard
deviation, s, to estimate .
 However, there is a hitch to this. While s2 is an
unbiased estimator of 2 (i.e., the mean of the
sampling distribution of s2 equals 2), the
sampling distribution of s2 is positively skewed
Chapter 7
Slide 14
Psy B07
Single Means – σ is unknown
 This means that any individual s2
chosen from the sampling distribution
of s2 will tend to underestimate 2.
 Thus, if we used the formula that we
used when  was known, we would tend
to get z values that were larger than
they should be, leading to too many
significant results
Chapter 7
Slide 15
Psy B07
Single Means – σ is unknown
 The solution? Use the same formula (modified
to use s instead of ), find its distribution under
H0, then use that distribution for doing
hypothesis testing.
The result:
Chapter 7
x 
t
s
n
Slide 16
Psy B07
Single Means – σ is unknown
 When a t-value is calculated in this
manner, it is evaluated using the t-table
(p. 747 of the text) and the row for n-1
degrees of freedom.
 So, with all this in hand, we can now
answer questions of the following
type...
Chapter 7
Slide 17
Psy B07
Single Means – σ is unknown
Example:
Let’s say that the average human who has reached
maturity is 68” tall. I’m curious whether the average
height of our class differs from this population mean.
So, I measure the height of the 100 people who come to
class one day, and get a mean 70” and a standard
deviation of 5”. What can I conclude?
x   70  68 2
t


4
s
5
0.5
n
100
Chapter 7
Slide 18
Psy B07
Single Means – σ is unknown
 If we look at the t-table, we find the
critical t-value for alpha=.05 and 99
(n-1) degrees of freedom is 1.984.
 Since the tobt > tcrit, we reject H0
Chapter 7
Slide 19
Psy B07
Typical Questions
 Quite often, instead of comparing a
single score or a single mean to a
population, we want to compare two
means against one another
 In other words – is the mean of one
group significantly different from
another?
 Matched Sample
 Independent Sample
Chapter 7
Slide 20
Psy B07
Pairs of Means –
Matched Samples
 In many studies, we test the same subject on
multiple sessions or in different test
conditions.
 We then wish to compare the means across
these sessions or test conditions.
 This type of situation is referred to as a pair
wise or matched samples (or within subjects)
design, and it must be used anytime different
data points cannot be assumed to be
independent
 sexist profs example
Chapter 7
Slide 21
Psy B07
Pairs of Means –
Matched Samples
 As you are about to see, the t-test used
in this situation is basically identical to
the t-test discussed in the previous
section, once the data has been
transformed to provide difference
scores
Chapter 7
Slide 22
Psy B07
Pairs of Means –
Matched Samples
 Assume we have
some measure of
rudeness and we
then measure 10
profs rudeness
index; once when
the offending TA
is male, and once
when they are
female.
Chapter 7
Prof 1
Prof 2
Prof 3
Prof 4
Prof 5
Prof 6
Prof 7
Prof 8
Prof 9
Prof 10
Mean
SD
Female TA
Male TA
Difference
15
22
18
5
40
20
14
10
22
18
10
20
19
4
33
20
16
14
10
13
5
2
-1
1
7
0
-2
-4
12
5
18.4
9.29
15.9
7.88
2.5
4.79
Slide 23
Psy B07
Pairs of Means –
Matched Samples
 Question becomes, is the average difference
score significantly different from 0?
 So, when we do the math:
D  0 2.5  0
t

 1.65
sD
4.79
n
10
Chapter 7
Slide 24
Psy B07
Pairs of Means –
Matched Samples
 The critical t with alpha equal .05 (twotailed) and 9 (n-1) degrees of freedom
is 2.262.
 Since tobt is not greater than tcrit, we can
not reject H0.
 Thus, we have no evidence that the
profs rudeness is difference across TAs
of different genders
Chapter 7
Slide 25
Psy B07
Pairs of Means –
Independent Samples
 Another common situation is one where we
have two of more groups composed of
independent observations.
 That is, each subject is in only one group and
there is no reason to believe that knowing
about one subjects performance in one of the
groups would tell you anything about another
subjects performance in one of the other
groups
Chapter 7
Slide 26
Psy B07
Pairs of Means –
Independent Samples
 In this situation we are said to have independent
samples or, as it is sometimes called, a between
subjects design
 Example: Let’s take the famous “Misinformation
Effect” memory experiment where subjects see a
video of a car accident and are asked to estimate
the speed of the car involved in the accident. The
adjective used to describe the collision (smashed
vs. ran into vs. contacted) is varied across groups
(n=20). Did the manipulation affect speed
estimates? That is, are the mean speed estimates
of the various groups different?
Chapter 7
Slide 27
Psy B07
Pairs of Means –
Independent Samples
 In the accident video, about how fast (in
km/h) do you think the gray car was going
when it ________ the side of the red car?
Chapter 7
Group
Mean
SD
1) smashed into
2) ran into
3) made contact with
74.0
67.2
66.3
9.06
10.55
11.22
Slide 28
Psy B07
Pairs of Means –
Independent Samples
 There are, in fact, three different t-tests
we can perform in this situation,
comparing groups 1 &2, 1&3, or 2&3.
 For demonstration purposes, let’s only
worry about groups 1 & 2 for now.
 So, we could ask, do subjects in Group 1
give different estimates of the gray
car’s speed than subjects in Group 2?
Chapter 7
Slide 29
Psy B07
Variance Sum Law
 When testing a difference between two
independent means, we must once
again think about the sampling
distribution associated with H0.
 If we assume the means come from
separate populations, we could
simultaneously draw samples from each
population and calculate the mean of
each sample
Chapter 7
Slide 30
Psy B07
Variance Sum Law
 If we repeat this process a number of times,
we could generate sampling distributions of
the mean of each population, and a sampling
distribution of the difference of the two
means.
 If we actually did this, we would find that the
sampling distribution of the difference would
have a variance equal to the sum of the two
population variances
Chapter 7
Slide 31
Psy B07
Variance Sum Law
 In fact, the Variance Sum Law states that:
The variance of a sum or difference of two
independent variables is equal to the sum of
their variances

Chapter 7
2
x1  x 2
 1  2
2
2
Slide 32
Psy B07
Pairs of Means –
Independent Samples
 Now recall that when we performed a t-test in
the situation where the population standard
deviation was unknown, we used the formula:
x 
t
s
n
 Given all of the above, we can now alter this
formula in a way that will allow us to use it in
the independent means example
Chapter 7
Slide 33
Psy B07
Pairs of Means –
Independent Samples
 Specifically, instead of comparing a single
sample mean with some mean, we want to see
if the difference between two sample means
equals zero.
 Thus the numerator (top part) will change to:
( x1  x 2 )  0
or simply
( x1  x 2 )
Chapter 7
Slide 34
Psy B07
Pairs of Means –
Independent Samples
 And, because the standard error associated
with the difference between two means is the
sum of each mean’s standard error (by the
variance sum law), the denominator of the
formula changes to
2
2
s1 s 2

n1 n 2
Chapter 7
Slide 35
Psy B07
Pairs of Means –
Independent Samples
 Thus, the basic formula for calculating a t-test
for independent samples is:
t
( x1  x 2 )
2
2
s1 s 2

n1 n 2
Chapter 7
Slide 36
Psy B07
Pairs of Means –
Independent Samples
 Finishing the example:
Comparing groups 1 and 2, we end up with:
( x1  x 2 )
74.0  67.2
6.8
t


 2.19
2
2
82.08 111.30 3.11
s1 s 2


20
20
n1 n 2
 df = (n1+n2-2) = 38, tCRIT = 2.021.
 Since tOBT > tCRIT we reject H0
Chapter 7
Slide 37
Psy B07
Pooling Variances & Unequal Ns
 The previous formula is fine when
sample sizes are equal.
 However, when sample sizes are
unequal, it treats both of the S2 as equal
in terms of their ability to estimate the
population variance
Chapter 7
Slide 38
Psy B07
Pooling Variances & Unequal Ns
 Instead, it would be better to combine the s2
in a way that weighted them according to their
respective sample sizes. This is done using the
following pooled variance estimate:
(n1  1)s  (n 2  1)s
s 
n1  n 2  2
2
p
Chapter 7
2
1
2
2
Slide 39
Psy B07
Pooling Variances & Unequal Ns
 Given this, the new formula for calculating an
independent groups t-test is:
( x1  x 2 )
t
1
2 1
sp (  )
n1 n 2
Chapter 7
Slide 40
Psy B07
Pooling Variances & Unequal Ns
 Using the pooled variances version of
the t formula for independent samples
is no different from using the separate
variances version when sample sizes are
equal. It can have a big effect,
however, when sample sizes are
unequal.
Chapter 7
Slide 41
Psy B07
Heterogeneity of Variance
 The text book has a large section on
heterogeneity of variance (pp 213-216)
including lots of nasty looking formulae. All I
want you to know is the following:
 When doing a t-test across two groups, you
are assuming that the variances of the two
groups are approximately equal.
 If the variances look fairly different, there
are tests that can be used to see if the
difference is so great as to be a problem
Chapter 7
Slide 42
Psy B07
Heterogeneity of Variance
 If the variances are different across the
groups, there are ways of correcting the
t-test to take the heterogeneity in
account.
 In fact, t-tests are often quite robust to
this problem, so you don’t have to worry
about it too much.
Chapter 7
Slide 43
Psy B07
The Cookbook
One Observation vs. Population :
x 
z

Chapter 7
Slide 44
Psy B07
The Cookbook
One Mean vs. One Population Mean:
Population variance known:
x 
z

n
Chapter 7
Slide 45
Psy B07
The Cookbook
One Mean vs. One Population Mean:
Population variance unknown:
x 
t
s
n
Chapter 7
df = n-1
Slide 46
Psy B07
The Cookbook
Two Means:
Matched samples:
first create a difference score, then...
D0
t
sD
n
Chapter 7
df = nD-1
Slide 47
Psy B07
The Cookbook
Two Means:
Independent samples:
t
( x1  x 2 )
2
2
s1 s 2

n1 n 2
Chapter 7
df = n1+n2-2
Slide 48
Psy B07
The Cookbook
Two Means:
Independent samples. . .continued:
where:
(n1  1)s  (n 2  1)s
s 
n1  n 2  2
2
p
2
1
2
2
Easy as baking a cake, right? Now for some
examples of using these recipes to cook up
some tasty conclusions. . .
Chapter 7
Slide 49
Psy B07
Examples
1) The population spends an average of 8 hours per day
working, with a standard deviation of 1 hour. A certain
researcher believes that profs work less hours than
average and wants to test whether the average hours
per day that profs work is different from the population.
This researcher samples 10 professors and asks them
how many hours they work per day, leading to the
following data set:
6, 12, 8, 15, 9, 16, 7, 6, 14, 15
 perform the appropriate statistical test and state your
conclusions.
Chapter 7
Slide 50
Psy B07
Examples
2) Now answer the question again except
assume the population variance is unknown.
3) Does the use of examples improve memory for
the concepts being taught? Joe Researcher
tested this possibility by teaching 10 subjects
20 concepts each. For each subject, examples
were provided to help explain 10 of the new
concepts, no examples were provided for the
other 10. Joe then tested his subjects memory
for the concepts and recorded how many
concepts, out of 10, that the subject could
remember. Here is the data (next slide):
Chapter 7
Slide 51
Psy B07
Examples
Subject
1
2
3
4
5
6
7
8
9
10
Chapter 7
No Example Example
6
8
5
4
7
8
2
5
6
8
8
8
6
6
7
7
5
7
7
9
Slide 52
Psy B07
Examples
4) Circadian rhythms suggest that
young adults are at their physical
peek in the early afternoon, and
are at their physical low point in
the early morning. Are cognitive
factors affected by these rhythms?
To test this question I bring
subjects in to run a recognition
memory experiment. Half of the
subjects are run at 8 am, the other
half at 2pm. I then record their
recognition memory accuracy.
Here are the results:
Chapter 7
8 am
.60
.58
.68
.74
.71
.62
2 pm
.78
.85
.81
.82
.76
.73
Slide 53