Date post: | 01-Jan-2016 |
Category: |
Documents |
Upload: | baldwin-wheeler |
View: | 216 times |
Download: | 0 times |
1
Psych 5500/6500
t Test for Two Independent Means
Fall, 2008
2
Cause and Effect Relationships
Does Variable X (cause/influence/affect) Variable Y?
Variable X would be the independent variable (the cause).
Variable Y would be the dependent variable (the effect).
3
t Test for 2 Independent Means
Used to compare two independent samples, specifically we are comparing the means of the samples to see whether or not we can infer that the means of the two populations they represent are different.
Usually we are testing a theory which proposes that an independent variable has made the population means different.
4
Example 1
Question: Does gender influence respiration rate?
Design: randomly sample 20 males and 20 females from some population and measure their respiration rate while at rest.
5
Example 1
I.V.=
D.V.=
H0: μfemale= μmale (or) μfemale-μmale =0
HA: μfemale μmale (or) μfemale-μmale 0
6
HypothesesNote that the hypotheses are always about
populations.
H0: μfemale= μmale HA: μfemale μmale
NOT about samples:
We want to be able to generalize the results to the populations from which we sampled, not just to the specific participants who are in our sample.
malesfemalesAmalesfemales0 Y Y :H Y Y :H
7
Example 2Question: Is maze running ability affected by
the presence or absence of some specific drug?
Design: Select 11 rats and randomly divide them into two groups. The rats in Group 1 are given the drug, the rats in Group 2 are not. The number of wrong turns each rat makes before reaching the end of the maze is recorded.
8
Example 2
I.V.=
D.V.=
H0: μdrug= μno_drug (or) μdrug-μno_drug = 0
HA: μdrug μno_drug (or) μdrug-μno_drug 0
9
Statistic
The statistic upon which we will base our decision about H0 is:
Challenge: if H0 is true then the two population means are equal, and we expect the two sample means to be similar, but even if H0 is true the two sample means will not exactly equal each other due to chance (i.e. the samples have random bias). So if the two sample means differ is that due to differences in the population means or due to chance?
21 YY
10
The Solution
Set up the ‘Sampling Distribution of
assuming H0 is true’ and label it
as such. Then:
• The mean of that sampling distribution is based upon H0.
• The standard deviation of that sampling distribution is estimated from the data from the two samples
21 YY
11
Sampling Distribution of the statistic if H0 is true
12
Sampling Distribution (cont.)
021 YY
2121
21YY N
1
N
1
2NN
SSSSσ est.
21
2NN1N1Nd.f. 2121
(based upon H0 being true)
Computational formula for the standard error of the difference:
13
Standard Error of the Difference
21
2YY N
1
N
1est.σσ est.
21
Let’s take a conceptual look at the standard deviation of the teststatistic This t test assumes that both populations have the samevariance, and uses this to ‘pool’ the two estimates of this populationvariance into one good estimate using the following formula, whichweights the estimate based upon the size of each sample was.:
)Y-Y( 21
2NN
1)est.σ(N1)est.σ(Nσ est.
21
222
2112
Conceptual formula for the standard error of the difference:
14
Drug Example Data
Group 1 (Drug) Group 2 (No Drug)
7 4
8 6
6 5
10 3
6 2
5
15
Group Statistics
166
42310SS
76
42Y
310Y
42Y
6N
2
1
1
2
1
1
1
105
0209SS
45
20Y
09Y
02Y
5N
2
2
2
2
2
2
2
16
t Computations
03.107.137.89.22.17.9
26
5
1
6
1
256
0161
N
1
N
1
2NNσ est.
2121
21YY 21
SSSS
17
18
Setting up the Rejection Regions
2.262t
92562NNd.f.
c
21
19
20
tobt
21
21
YY
YY21
obt est.σ
μYYt
91.2
03.1
047tobt
21
22
Decision
We ‘reject H0’. We can conclude that the two samples represent populations that have different means.
We would like to then go on and state that the independent variable (drug vs. no drug) must have made the two population means different from each other, but at this point we can’t, first we have to show that there is no other reason for why the two populations might have different means. This takes us to the topic of ‘confounding variables’, which we will cover in the next lecture.
23
Confidence Intervals
Confidence interval for the true difference between μ1 and μ2 :
21 YYtail-df,2,:c21 est.σtYY
5.33 0.67,2.3331.032.26247
95% confidence interval: 0.67 (μ1 - μ2) 5.33
If a hypothesis states a value for μ1 - μ2 that is outside of thatconfidence interval (e.g. H0: μ1 - μ2 = 0) then you can reject it
24
Reporting ResultsA standard way of reporting the results of t tests is to
use the following format:
t(df)=tobt, p=?
From last example:t(9)=2.91, p=...
We can use the ‘t distribution tool’ in ‘Oakley Stat Tools’ to get the exact value of p, or we can use SPSS to do the t test for us. t(9) = 2.91, p=.017
25
One-Tailed TestsSo far the examples have involved non-directional
theories (which predict the two population means will be different but don’t predict one which will be greater than the other). This is done with a 2-tail test.
It is also possible to test theories which are directional (predict specifically which population mean should be greater). This is done with a 1-tail test, which will influence how we write our hypotheses, and will lead to just one rejection region in our sampling distribution.
26
One-tailed Tests
Again, express the prediction made by the theory when you write HA, H0 is then everything else. For testing a theory which predicts that the mean of population one (drugged rats) should be greater than the mean of population two (undrugged rats):
H0: μ1 μ2 (or equivalently) μ1-μ2 0
HA: μ1 > μ2 (or equivalently) μ1-μ2 > 0
27
Rejection Region
28
one-tailed tests
For testing a theory which predicts that the mean of population one (drugged rats) should be less than the mean of population two (undrugged rats):
H0: μ1 μ2 (or equivalently) μ1-μ2 0
HA: μ1 < μ2 (or equivalently) μ1-μ2 < 0
29
Rejection Region
30
Null Hypothesis
I have given two ways of expressing H0.
H0: μdrug= μno_drug (or) μdrug - μno_drug = 0
The first way is somewhat conceptually easier, but the second has an advantage as well. I have mentioned before that the null hypothesis is usually, but not always, the hypothesis of ‘no difference’. Let me now give an example where that wouldn’t be true…
31
Let us say that the difference in population means between rats on the drug and those not on the drug has been previously established as equaling 1.5. In this experiment, however, we will have the rats swim through the maze and we are testing a theory which predicts that the difference between the two groups should be influenced by swimming (i.e. it will no longer equal 1.5) The null hypothesis is that performance won’t be influenced by swimming. Now our hypotheses would look like this:
H0: μdrug-μno_drug = 1.5
HA: μdrug-μno_drug 1.5
Note that conceptually H0 can still be thought of as ‘no difference’, in this case we are saying that the difference between the drug and no drug groups will not be different when the rats are swimming.
32
Sampling Distribution if H0 is true
33
tobtained
The tobtained score is still simply a standard score on the curve: i.e. the test statistic minus the mean of the curve divided by the standard deviation (standard error) of the curve.
5.1μ case in thisbut
est.
μ)YY(t
)YY(
)YY(
)YY(21
obtained
21
21
21
34
Assumptions underlying this t test
1. Independence of scores (within and between groups)
2. Both populations normally distributed3. The two populations have identical
variances
We will examine the assumption of identical variances in a latter lecture.
35
Effect Size
Again the measures of effect size include:
1. Simply reporting the ‘raw’ effect size.
2. Reporting a standardized effect size.
3. Reporting the strength of association (which we will cover next semester).
36
‘Raw’ Effect Size
This would be simply reporting the mean of the two groups and the difference between those means. In our experiment the mean number of wrong turns made by the ‘drug’ group was 7, the mean number for the ‘no drug’ group was 4, which is a difference of 3 between the two means.
37
Standardized Effect Size
We will take a look at three standardized measures of effect size:
1. Cohen’s d
2. Hedges’s g
3. Glass’s Δ
38
Cohen’s dFor the effect size in the population (exact, not estimated):
Y
21
σ
μμδ
Remember that an assumption underlying this t test is that bothpopulations have the same variance (σY).
39
Cohen’s dFor the effect size in the sample:
If you examine the formula for Spooled you can see that it is simply the standard deviation of all the scores lumped into one group.
NN
SSSS
NN
SNSNS where
S
YYd
21
21
21
222
211
pooled
pooled
21
40
Hedges’s gHedges’s g gives us an estimate of the effect size in the populationform which we sampled.
est. σpooled is a ‘pooled’ estimate of the standard deviation of Y, the formula combines the estimates of σY from the two groups, weighting each estimate based upon how many scores were in the group.
2NN
1)est.σ-(N1)est.σ-(Nest.σ where
est.σ
YYg
21
222
211
pooled
pooled
21
41
Glass’s ΔGlass’s delta is similar to Hedges’s g, but instead of using thescores from both groups to estimate the standard deviation of Y, delta just uses the data from the control group to estimate it.
est.σest.σ where
est.σ
YYΔ
2ControlControl
Control
21
42
Glass’s ΔIn an experiment designed to test the effect of some
treatment it is common to include a group that is handled exactly like the group that gets the treatment except without the treatment, this is called the ‘Control Group’ and the group that gets the treatment is called the ‘Treatment Group’. The reason the control group is named as it is will be covered in the lecture on confounding variables. In our example the rats given the drug constitute the ‘treatment group’ and those not given the drug are the ‘control group’.
43
Glass’s ΔGlass’s delta is used when there is reason to
believe that the treatment applied to the treatment group might have affected not only the mean of the group but the variance of that group as well. If this is the case then the assumption of equal variances is not met (we will see how to analyze the data anyway later) and it makes no sense to use the variance of both groups to estimate the variance of Y, as they would actually be measuring two different variances, not one.
44
Using these Formulas
3.205
16
1N
SSest.σ
67.26
16
N
SS S
166
42310SS
76
42Y
6N
1
121
1
121
2
1
1
1
50.24
10
1N
SSest.σ
00.25
10
N
SS S
105
0209SS
45
20Y
5N
2
222
2
222
2
2
2
2
45
Using these Formulas
1.95 1.54
47d
54.111
0161
NN
SSSS
NN
SNSNS where
S
YYd
21
21
21
222
211
pooled
pooled
21
46
Using these Formulas
76.1 1.7
47g
70.1256
(4)(2.50)(5)(3.2)
2NN
1)est.σ-(N1)est.σ-(Nest.σ where
est.σ
YYg
21
222
211
pooled
pooled
21
47
Using these Formulas
90.11.58
47Δ
58.12.50 est.σest.σ where
est.σ
YYΔ
2ControlControl
Control
21
48
Useful Conversions
2NN
NNgd
21
21
2 groupin prop. p 1, groupin scores of prop.p where
2)N(Npp
td
21
2121
obt
‘prop’ means ‘proportion’, so if 14 of the 20 scores were in group 1, then p1 wouldbe 14/20 while p2 would be 6/20.
49
Useful Conversions
21
21
NN
2NNdg
2 groupin prop. p 1, groupin scores of prop.p where
)N(Npp
tg
21
2121
obt
50
Useful Conversions
2 groupin prop. p 1, groupin scores of prop.p where
2)N(Nppdt
21
2121obt
2 groupin prop. p 1, groupin scores of prop.p where
)N(Nppgt
21
2121obt