Title: Hypothesis Testing Applied to Means
1Chapter 7
- Hypothesis Testing Applied to Means
2Typical Questions
- 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.
3Typical Questions
- 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. . . .
4The Central Limit Theorem
Returning to our previous online demo
Sampling Distribution demonstration
5Testing Hypotheses about Single Means when
Population Variance 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. -
6Testing Hypotheses about Single Means when
Population Variance is Known
7Testing Hypotheses about Single Means when
Population Variance is Known
- With this formula, we can answer questions like
the following
8Testing Hypotheses about Single Means when
Population Variance 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 positive skewed.
9Testing Hypotheses about Single Means when
Population Variance is Unknown
- Sample Variance (s2).
- 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.
10Testing Hypotheses about Single Means when
Population Variance 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
11Testing Hypotheses about Single Means when
Population Variance is Unknown
- When a t-value is calculated in this manner, it
is evaluated using the t-table (p. 648 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. . . .
12Testing Hypotheses about Single Means when
Population Variance is Unknown
- Example
- Lets say that the average human who
- has reached maturity is 68 tall. Im
- 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?
-
13Testing Hypotheses about Single Means when
Population Variance 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 gt tcrit, we reject H0.
-
14Typical Questions
- Q2 Is the mean of one group significantly
different from the mean of some other group? - Example recall the paper airplane memory
experiment where I asked people within three
groups to estimate the speed of a car involved
in an accident and, across groups, I varied the
adjective used to described the collision
(smashed vs. ran into vs. contacted). Did my
manipulation affect speed estimates? That is,
are the mean speed estimates of the various
groups different? - Note these tests are used in conjunction with
continuous (i.e., measurement) data, not
categorical data.
15Testing Hypotheses Concerning Pairs of Means
Matched Samples
- In many studies, we test the same subject on
multiple sessions or in different test
conditions. - sexist profs example
- 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.
16Testing Hypotheses Concerning 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.
17Difference Scores
- 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.
18Difference Scores
- Question becomes, is the average difference score
significantly different from 0? - So, when we do the math
19Difference Scores
- The critical t with alpha equal .05 (two-tailed)
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.
20Testing Hypotheses Concerning 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.
21Testing Hypotheses Concerning 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 study to examine external biases of
memory (i.e., when I threw all the paper
airplanes around).
22Data from our Memory Bias Experiment
- Given Steves accident story, about how fast (in
km/h) do you think the gray car was going when it
________ the side of the red car?
23Data from our Memory Bias Experiment
- There are, in fact, three different t-tests we
can perform in this situation, comparing groups 1
2, 13, or 23. - For demonstration purposes, lets only worry
about groups 1 2 for now. - So, we could ask, do subjects in Group 1 give
different estimates of the gray cars speed than
subjects in Group 2?
24The 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.
25The 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.
26The Variance Sum Law
- Now recall that when we performed a t-test in the
situation where the population standard deviation
was unknown, we used the formula - 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.
27The Variance Sum Law
- 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
28The Variance Sum Law
- And, because the standard error associated with
the difference between two means is the sum of
each means standard error (by the variance sum
law), the denominator of the formula changes to
29The Variance Sum Law
- Thus, the basic formula for calculating a t-test
for independent samples is
30Pooling 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.
31Pooling 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
32Pooling Variances Unequal Ns
- Given this, the new formula for calculating an
independent groups t-test is
33Coupla Notes
- Note 1 Using the pooled variances version of
the t formula for independent samples is no
difference from using the separate variances
version when sample sizes are equal. It can have
a big effect, however, when sample sizes are
unequal. - Note 2 As mentioned previously, the degrees of
freedom associated with an independent samples t
test is N1 N2 - 2.
34Heterogeneity of Variance
- The text book has a large section on
heterogeneity of variance (pp 185-193) 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.
35Heterogeneity 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 dont have to worry about it too
much. - Sometimes, heterogeneity is interesting.
36Hypothesis Testing with Means The Cookbook
- One Mean vs. One Population Mean
- Population variance known
37Hypothesis Testing with Means The Cookbook
- One Mean vs. One Population Mean
- Population variance unknown
38Hypothesis Testing with Means The Cookbook
- Two Means
- Matched samples
- first create a difference score, then. . . .
39Hypothesis Testing with Means The Cookbook
- Two Means
-
- Independent samples
40Hypothesis Testing with Means The Cookbook
- Two Means
- Independent samples. . .continued
- where
-
- Easy as baking a cake, right? Now for some
examples of using these recipes to cook up some
tasty conclusions. . . .
41Examples
- 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 - perform the appropriate statistical test and
state your conclusions.
42Examples
- 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)
43Examples
44Examples
- 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