class 14 t tests

Download Report

Transcript class 14 t tests

QUIZ 2 POSTPONED TO NOV. 12
GRAPHICALLY EXPLORING DATA USING
CENTRALITY AND DISPERSION
Why explore data?
1. Get a general sense or feel for your data.
2. Determine if distribution is normal, skewed, kurtotic, or
multi-modal (more on this soon).
3. Identify outliers
4. Identify possible data entry errors
DATA BUGS ARE A HAZZARD:
KNOW WHAT'S IN YOUR DATA!
+
12, 19, 17, 14, + 147
=
=
Normally Distributed Data Set
SPSS output: Note similarity
between mean, median, mode
Skewed Distribution
Positive Skew
Possible
"floor effect"
Negative Skew
Possible
"ceiling effect"
Kurtosis
Neuroticism Measure
Positive kurtosis,
“leptokurotic”
Problems?
"Normativity bias?"
DV doesn't discriminate
IV wasn't impactful
Drinks Per Week
Negative kurtosis,
“platykurotic”
Problems?
Distinctiveness bias?
IV and/or DV too ambiguous
Population too diverse
Bimodality
Note: What clues in “statistics” output that the distribution may be bimodal?
Bimodality suggests 2 (or more) populations
Multimodal: More than two modes.
Outliers
BOX AND WHISKER GRAPH
Top 25%
Upper Quartile
Median (50 %)
Lower Quartile
Bottom 25%
BOX AND WHISKER GRAPH, AND DATA CHECKING
subject number
Detecting
Skew
Detecting
Outliers
DEALING WITH OUTLIERS
1. Check raw data: Entry problem? Coding problem?
2. Remove the outlier:
a. Must be at least 2.5 DV from the mean (some say 3 DV)
b. Must declare deletions in pubs.
c. Try to identify reason for outlier (e.g., other anomalous responses).
3. Transform data: Convert data to a metric that reduces deviation. (More
on this in next slide).
4. Change the score to a more conservative one (Field, 2009):
a. Next highest plus 1
b. 2 SD or 3 SD above (or below) the mean.
c. ISN’T THIS CHEATING? No (says Field) b/c retaining score biases
outcome. Again, report this step in pubs.
5. Run more subjects!
Data Transformations
1. Log Transformation (log(X)): Converting scores into Log X reduces positive
skew, draws in scores on the far right side of distribution.
NOTE: This only works on sets where lowest value is greater than 0. Easy fix:
add a constant to all values.
2. Square Root Transformation (√X): Sq. roots reduce large numbers more
than small ones, so will pull in extreme outliers.
3. Reciprocal Transformation (1/X): Divide 1 by each score reduces large
values. BUT, remember that this effectively reverses valence, so that
scores above the mean flip over to below the mean, and vice versa.
Fix: First, preliminary transform by changing each score to highest
score minus the target score. Do it all at same time by 1/(Xhighest – X).
4. Correcting negative skew: All steps work on neg. skew, but first must
reverse scores. Subtract each score from highest score. Then, re-reverse
back to original scale after transform completed.
Comparing Two Means
Dependent and Independent T-Tests
Class 14
Generating Anxiety—Photos vs. Reality:
Within Subjects and Between Subjects Designs
Problem Statement: Are people as aroused by photos of threatening
things as by the physical presence of threatening things?
Hypothesis: Physical presence will arouse more anxiety than pictures.
Expt’l Hypothesis: Seeing a real tarantula will arouse more anxiety
than will spider photos.
Spider Photos
WUNDT!!!!
WITHIN SUBJECTS DESIGN
1. All subjects see both spider pictures and real tarantula
2. Counter-balanced the order of presentation. Why?
3. DV: Anxiety after picture and after real tarantula
Data (from spiderRM.sav)
Subject
Picture (anx. score)
Real T (anx. score)
1
30
40
2
35
35
3
45
50
---
---
---
12
50
39
Results:
Anxiety Due to Pictures vs. Real Tarantula
60
55
Anxiety
50
45
40
35
30
25
20
Picture
Do the means LOOK different?
Are they SIGNIFICANTLY DIFFERENT?
Real T
Yes
Need t-test
WHY MUST WE LEARN FORMULAS?
Don’t computers make stat formulas unnecessary
1. SPSS conducts most computations, error free
2. In the old days—team of 3-4 work all night
to complete stat that SPSS does in .05 seconds.
Fundamental formulas explain the logic of stats
1. Gives you more conceptual control over your work
2. Gives you more integrity as a researcher
3. Makes you more comfortable in psych forums
BUT KNOWING FORMULA NOT
ENOUGH
TODDLER FORMULA
+
(
X
)
(5)
X
(365 X3y)
=
Point: Knowing the formula without understanding
concepts leads to impoverished understanding.
Logic of Testing Null Hypothesis
Inferential Stats test the null hypothesis ("null hyp.")
This means that test is designed to CONFIRM that the null hyp is true.
In WITHIN GROUPS t-test (AKA "dependent" t-test) null hyp. is that
responses in Cond. A and in Cond. B come from same population of
responses. Null hyp.: Cond A and Cond B DON'T differ.
In BETWEEN GROUPS t-test (AKA "independent" t-test) null hyp. is
that responses from Group A and from Group B DON’T differ.
If tests do not confirm the null hyp, then must accept ALT. HYPE.
Alt. hyp. within-groups:
Alt. hyp. between-groups
Cond A differs from Cond B
Group A differs from Group B
Null Hyp. and Alt. Hyp in
Pictures vs. Reality Study
Within groups design:
Cond. A (all subjs. see photos), then
Cond. B (all subs. see actual tarantula)
Anxiety
ratings
Null hyp?
No differences between seeing photos
(Cond A) and seeing real T (Cond B)
Alt. hyp?
There is a difference between seeing photos
(Cond A) and seeing real T (Cond B)
T-Test as Measure of Difference
Between Two Means
1. Two data samples—do means of each sample differ significantly?
2. Do samples represent same underlying population (null hyp: small diffs) or
two distinct populations (alt. hyp: big diffs)?
3. Compare diff. between sample means to diff. we’d expect if null hyp is true
4. Use Standard Error (SE) to gauge variability btwn means.
a. If SE small & null hyp. true, mean diffs should be smaller
b. If SE big & null hyp. true, mean diffs. should be larger
5. If sample means differ much more than SE, then either:
a. Diff. reflects improbable but true random difference w/n true pop.
b. Diff. indicates that samples reflect two distinct true populations.
6. Larger diffs. Between sample means, relative to SE, support alt. hyp.
7. All these points relate to both Dependent and Independent t-tests
Logic of T-Test
t =
observed difference
between sample means
−
expected difference
between population means
(if null hyp. is true)
SE of difference between sample means
Note: Logic the same for Dependent and Independent t-tests.
However, the specific formulas differ.
Mean Difference Relative to SE (overlap)
Small: Null Hyp. Supported
Mean Difference Relative to SE (overlap)
Large: Alternative Hyp. Supported
SD: The Standard Error of
Differences Between Means
Sampling Distribution: The spread of many sample means around a
true mean.
SE: The average amount that sample means vary around the true
mean. SE = Std. Deviation of sample means.
Formula for SE: SE = s/√n, when n > 30
If sample N > 30 the sampling distribution should be normal.
Mean of sampling distribution = true mean.
SD = Average amount Var. 1 mean differs from Var. 2 mean in Sample
1, then in Sample 2, then in Sample 3, ---- then in Sample N
Note: SD is differently computed in Between-subs. designs.
SD: The Standard Error of
Differences Between Means
TARANTULA
MEAN
Study 1
Study 2
Study 3
Study 4
6
5
4
5
PICTURE
D
MEAN (T mean – P mean)
3
3
2
3
3
2
2
2
Ave. 2.25
.
SD: The Standard Error of Differences Between Means
TARANT.
Sub. 1
Sub. 2
Sub. 3
Sub. 4
6
5
4
5
PICT.
3
3
2
3
X Tarant. = 5.00 X Pic = 2.75
D
D-D
(D-D)2
3
2
2
2
-. 75
.25
.25
.25
.56
.07
.07
.07
D = 2.25
Note: D is the
average diff. btwn
Tarant mean and
Pict. mean.
Σ (D-D)2 = .77
SD2 = Sum (D -D)2 / N - 1; = .77 / 3 = .26 [VARIANCE OF DIFFS]
SD = √SD2 = √.26 = .51
[STD. DEV. OF DIFFS]
SE of D = σD = SD / √N = .51 / √4 = .51 / 2 = .255 [STD. ERROR OF DIFFS]
t = D / SE of D
= 2.25 / .255 = 8.823 = Diffs Between means is
8.23 times greater than error.
Understanding SD and Experiment Power
Power of Experiment: Ability of expt. to detect actual differences.
Small SD indicates that average difference between
pairs of variable means should be large or small, if
null hyp true?
Small SD will therefore increase or decrease our
chance of confirming experimental prediction?
Small
Increase it.
Assumptions of Dependent T-Test
1. Samples are normally distributed
2. Data measured at interval level
(not ordinal or categorical)
Conceptual Formula for Dependent Samples
(Within Subjects) T-Test
t=
D − μD
Experimental Effect
=
sD / √N
Random Variation
D = Average difference between mean Var. 1 – mean Var. 2.
It represents systematic variation, aka experimental effect.
μD = Expected difference in true population = 0
It represents random variation, aka the the null effect.
sD / √N = Standard Error of Mean Differences.
Estimated standard
error of differences between all potential sample means.
It represents the likely random variation between means.
Within-Subjects T Test Tests Difference
between Obtained Difference Between Means
and Null Difference Between Means:
It Tests a Difference between Differences!
Mean, SD of Obtained Diff between Picture vs. Real Tarantula
Mean, SD of Actual Diff of Null Effect
Diff btwn Means (Effect) less than
shared variance (Error)
Diff btwn Means (Effect) more than
shared variance (Error)
Dependent (w/n subs) T-Test SPSS Output
t = expt. effect / error
t = X / SE
t = -7 / 2.83 = -2.473
Note:
Mean = mean diff
pic anx - real anx.
= 40 - 47 = - 7
SE = SD / √n
2.83 = 9.807 / √12
Independent (between-subjects) t-test
1. Subjects see either spider pictures OR real tarantula
2. Counter-balancing less critical (but still important). Why?
3. DV: Anxiety after picture OR after real tarantula
Data (from spiderBG.sav)
Subject
Condition
Anxiety
1
1
30
2
2
35
3
1
45
22
2
50
23
1
60
24
2
39
Assumptions of Independent T-Test
DEPENDENT T-TEST
1. Samples are normally distributed
2. Data measured at least at interval level (not
ordinal or categorical)
INDEPENDENT T-TESTS ALSO ASSUME
3. Homogeneity of variance
4. Scores are independent (b/c come from diff. people).
Logic of Independent Samples T-Test
(Same as Dependent T-Test)
t =
observed difference
between sample means
−
expected difference
between population means
(if null hyp. is true)
SE of difference between sample means
Note: SE of difference of sample means in independent
t test differs from SE in dependent samples t-test
Conceptual Formula for
Independent Samples T-Test
t=
(X1 − X2) − (μ1 − μ2)
Est. of SE
Experimental Effect
=
Random Variation
(X1 − X2) = Diffs. btwn. samples
It represents systematic variation, aka experimental effect.
(μ1 − μ2) = Expected difference in true populations = 0
It represents random variation, aka the the null effect.
Estimated standard error of differences between all potential sample
means.
It represents the likely random variation between means.
Computational Formulas for
Independent Samples T-Tests
t=
√(
X1 − X2
2
s1
N1
2
s2
+
N2
)
√
When N1 = N2
sp2 =
X1 − X2
t=
sp
2
2
sp
n1 + n2
When N1 ≠ N2
(n1 -1)s12 + (n2 -1)s22
n1 + n2 − 2
=
Weighted
average of
each groups SE
Independent (between subjects)
T-Test SPSS Output
t = expt. effect / error
t = (X1 − X2) / SE
t = -7 / 4.16 = - 1.68
Note: CI
crosses “0”
Dependent (within subjects)
T-Test SPSS Output
t = expt. effect / error
t = X / SE
t = -7 / 2.83 = -2.473
Note: SE = SD / √n
2.83 = 9.807 / √12
Mean = mean diff
pic anx - real anx.
= 40 - 47 = - 7
Note: CI
does not
cross “0”
Dependent T-Test is Significant;
Independent T-Test Not Significant.
A Tale of Two Variances
Independent T -Test
60
60
55
55
50
50
45
45
Anxiety
Anxiety
Dependent T-Test
40
35
40
35
30
30
25
25
20
20
Picture
Real T
SE = 2.83
Picture
Real T
SE = 4.16