Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology...
-
Upload
hunter-watley -
Category
Documents
-
view
215 -
download
1
Transcript of Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology...
Using t-tests Basic introduction and 1-sample t-tests
Statistics for the Social SciencesPsychology 340
Spring 2010
PSY 340Statistics for the
Social SciencesOutline (for content up to Exam 2)
• Review t-tests (note: next exam is March 4, right before spring break)
– One sample, related samples, independent samples
– Effect sizes with t-tests
– Confidence intervals in t-test type designs
PSY 340Statistics for the
Social Sciences
Statistical analysis follows design
• The one-sample z-test can be used when:– 1 sample
€
zX
=X − μ
X
σX
– One score per subject
– Population mean (μ) and standard deviation (σ)are known
PSY 340Statistics for the
Social Sciences
Statistical analysis follows design
• The one-sample t-test can be used when:– 1 sample
– One score per subject
– Population mean (μ) is known
– but Population standard deviation (σ) is NOT known
€
t =X − μ
X
sX
PSY 340Statistics for the
Social Sciences Testing Hypotheses
– Step 1: State your hypotheses
– Step 2: Set your decision criteria
– Step 3: Collect your data
– Step 4: Compute your test statistics • Compute your estimated standard error
• Compute your t-statistic
• Compute your degrees of freedom
– Step 5: Make a decision about your null hypothesis
• Hypothesis testing: a five step program
PSY 340Statistics for the
Social Sciences Performing your statistical test
• What are we doing when we test the hypotheses?– Consider a variation of our memory experiment example
Population of memory patients
MemoryTestμ is known
Memory treatment
Memory patients
MemoryTest
X
Compare these two meansConclusions:
• the memory treatment sample are the same as those in the population of memory patients.• they aren’t the same as those in the population of memory patients
H0:
HA:
PSY 340Statistics for the
Social Sciences Performing your statistical test
• What are we doing when we test the hypotheses?
Real world (‘truth’)
H0: is false (is a treatment effect)
Two populations
XA
they aren’t the same as those in the population of memory patients
H0: is true (no treatment effect)
One population
XA
the memory treatment sample are the same as those in the population of memory patients.
PSY 340Statistics for the
Social Sciences Performing your statistical test
• What are we doing when we test the hypotheses?– Computing a test statistic: Generic test
€
test statistic =observed difference
difference expected by chance
Could be difference between a sample and a population, or between different samples
Based on standard error or an estimate of the standard error
PSY 340Statistics for the
Social Sciences Performing your statistical test
€
test statistic =observed difference
difference expected by chance
€
t =X − μ
X
sX
€
zX
=X − μ
X
σX
Test statistic
One sample z One sample tidentical
PSY 340Statistics for the
Social Sciences Performing your statistical test
€
test statistic =observed difference
difference expected by chance
€
t =X − μ
X
sX
€
zX
=X − μ
X
σX
Test statistic
Diff. Expected by chance
€
σX
=σ
nStandard error
One sample z One sample t
different
don’t know this,so need to estimate it
PSY 340Statistics for the
Social Sciences Performing your statistical test
€
test statistic =observed difference
difference expected by chance
€
t =X − μ
X
sX
€
zX
=X − μ
X
σX
€
sX
=s
n
Test statistic
Diff. Expected by chance
€
σX
=σ
nStandard error
Estimated standard error
One sample z One sample t
different
“Unbiased estimate of the population standard
deviation”This is the same as the
“sample standard deviation”
PSY 340Statistics for the
Social Sciences Performing your statistical test
€
test statistic =observed difference
difference expected by chance
€
t =X − μ
X
sX
€
zX
=X − μ
X
σX
€
sX
=s
n
Test statistic
Diff. Expected by chance
€
σX
=σ
nStandard error
Estimated standard error
One sample z One sample t
different
don’t know this,so need to estimate it
€
df = n −1Degrees of freedom
PSY 340Statistics for the
Social Sciences
Proportion in one tail0.10 0.05 0.025 0.01 0.005
Proportion in two tailsdf 0.20 0.10 0.05 0.02 0.011 3.078 6.314 12.706 31.821 63.6572 1.886 2.920 4.303 6.965 9.9253 1.638 2.353 3.182 4.541 5.8414 1.533 2.132 2.776 3.747 4.6045 1,476 2.015 2.571 3.365 4.0326 1.440 1.943 2.447 3.143 3.707:
15:
:1.341
:
:1.753
:
:2.131
:
:2.602
:
:2.947
:
One sample t-test
• The t-statistic distribution (a transformation of the distribution of sample means transformed)– Varies in shape according to the degrees of freedom
• New table: the t-table
PSY 340Statistics for the
Social Sciences
Proportion in one tail0.10 0.05 0.025 0.01 0.005
Proportion in two tailsdf 0.20 0.10 0.05 0.02 0.011 3.078 6.314 12.706 31.821 63.6572 1.886 2.920 4.303 6.965 9.9253 1.638 2.353 3.182 4.541 5.8414 1.533 2.132 2.776 3.747 4.6045 1,476 2.015 2.571 3.365 4.0326 1.440 1.943 2.447 3.143 3.707:
15:
:1.341
:
:1.753
:
:2.131
:
:2.602
:
:2.947
:
One sample t-test
If test statistic is here Fail to reject H0
Distribution of the t-statistic
If test statistic is here Reject H0
– To reject the H0, you want a computed test statistics that is large
• The alpha level gives us the decision criterion
• New table: the t-table
• The t-statistic distribution (a transformation of the distribution of sample means transformed)
PSY 340Statistics for the
Social Sciences
Proportion in one tail0.10 0.05 0.025 0.01 0.005
Proportion in two tailsdf 0.20 0.10 0.05 0.02 0.011 3.078 6.314 12.706 31.821 63.6572 1.886 2.920 4.303 6.965 9.9253 1.638 2.353 3.182 4.541 5.8414 1.533 2.132 2.776 3.747 4.6045 1,476 2.015 2.571 3.365 4.0326 1.440 1.943 2.447 3.143 3.707:
15:
:1.341
:
:1.753
:
:2.131
:
:2.602
:
:2.947
:
One sample t-test
• New table: the t-tableOne tailed
- or - Two-tailed
Critical values of ttcrit
Degrees of freedomdf
α - level
PSY 340Statistics for the
Social Sciences
Proportion in one tail0.10 0.05 0.025 0.01 0.005
Proportion in two tailsdf 0.20 0.10 0.05 0.02 0.011 3.078 6.314 12.706 31.821 63.6572 1.886 2.920 4.303 6.965 9.9253 1.638 2.353 3.182 4.541 5.8414 1.533 2.132 2.776 3.747 4.6045 1,476 2.015 2.571 3.365 4.0326 1.440 1.943 2.447 3.143 3.707:
15:
:1.341
:
:1.753
:
:2.131
:
:2.602
:
:2.947
:
One sample t-test
• What is the tcrit for a two-tailed hypothesis test with a sample size of n = 6 and an α-level of 0.05?
Distribution of the t-statisticα = 0.05Two-tailed
n = 6
df = n - 1 = 5
tcrit = +2.571
PSY 340Statistics for the
Social Sciences
Proportion in one tail0.10 0.05 0.025 0.01 0.005
Proportion in two tailsdf 0.20 0.10 0.05 0.02 0.011 3.078 6.314 12.706 31.821 63.6572 1.886 2.920 4.303 6.965 9.9253 1.638 2.353 3.182 4.541 5.8414 1.533 2.132 2.776 3.747 4.6045 1,476 2.015 2.571 3.365 4.0326 1.440 1.943 2.447 3.143 3.707:
15:
:1.341
:
:1.753
:
:2.131
:
:2.602
:
:2.947
:
One sample t-test
Distribution of the t-statisticα = 0.05One-tailed
n = 6
df = n - 1 = 5
tcrit = +2.015
• What is the tcrit for a one-tailed hypothesis test with a sample size of n = 6 and an α-level of 0.05?
PSY 340Statistics for the
Social Sciences One sample t-test
An example: One sample t-test
Memory experiment example:• We give a n = 16 memory patients a memory improvement treatment.
• How do they compare to the general population of memory patients who have a distribution of memory errors that is Normal, μ = 60?
• After the treatment they have an average score of = 55, s = 8 memory errors.
€
X
Don’t know σ
Do know s
PSY 340Statistics for the
Social Sciences One sample t-test
An example: One sample t-test
Memory experiment example:• We give a n = 16 memory patients a memory improvement treatment.
• How do they compare to the general population of memory patients who have a distribution of memory errors that is Normal, μ = 60?
• After the treatment they have an average score of = 55, s = 8 memory errors.
€
X
• Step 1: State your hypotheses
H0: the memory treatment sample are the same (or worse) as those in the population of memory patients.
HA: they perform better than those in the population of memory patients
μTreatment > μpop = 60
μTreatment < μpop = 60
PSY 340Statistics for the
Social Sciences One sample t-test
Memory experiment example:• We give a n = 16 memory patients a memory improvement treatment. • Step 2: Set your decision
criteria
H0: μTreatment > μpop = 60 HA: μTreatment < μpop = 60
α = 0.05One -tailed
• How do they compare to the general population of memory patients who have a distribution of memory errors that is Normal, μ = 60?
• After the treatment they have an average score of = 55, s = 8 memory errors.
€
X
An example: One sample t-test
PSY 340Statistics for the
Social Sciences One sample t-test
An example: One sample t-test
Memory experiment example:• We give a n = 16 memory patients a memory improvement treatment. • Step 2: Set your decision
criteriaα = 0.05One -tailed
• How do they compare to the general population of memory patients who have a distribution of memory errors that is Normal, μ = 60?
• After the treatment they have an average score of = 55, s = 8 memory errors.
€
X
H0: μTreatment > μpop = 60 HA: μTreatment < μpop = 60
PSY 340Statistics for the
Social Sciences One sample t-test
An example: One sample t-test
Memory experiment example:• We give a n = 16 memory patients a memory improvement treatment.
α = 0.05One -tailed
• Step 3: Collect your data
• How do they compare to the general population of memory patients who have a distribution of memory errors that is Normal, μ = 60?
• After the treatment they have an average score of = 55, s = 8 memory errors.
€
X
H0: μTreatment > μpop = 60 HA: μTreatment < μpop = 60
PSY 340Statistics for the
Social Sciences One sample t-test
An example: One sample t-test
Memory experiment example:• We give a n = 16 memory patients a memory improvement treatment.
α = 0.05One -tailed
• Step 4: Compute your test statistics
€
t =X − μ
X
sX
€
=55 − 60
816
⎛ ⎝ ⎜
⎞ ⎠ ⎟
= -2.5
• How do they compare to the general population of memory patients who have a distribution of memory errors that is Normal, μ = 60?
• After the treatment they have an average score of = 55, s = 8 memory errors.
€
X
H0: μTreatment > μpop = 60 HA: μTreatment < μpop = 60
sX =sn=
816
PSY 340Statistics for the
Social Sciences One sample t-test
An example: One sample t-test
Memory experiment example:• We give a n = 16 memory patients a memory improvement treatment.
α = 0.05One -tailed
• Step 4: Compute your test statistics
€
df = n −1
t = -2.5
• How do they compare to the general population of memory patients who have a distribution of memory errors that is Normal, μ = 60?
• After the treatment they have an average score of = 55, s = 8 memory errors.
€
X
€
=16 −1=15
H0: μTreatment > μpop = 60 HA: μTreatment < μpop = 60
PSY 340Statistics for the
Social Sciences One sample t-test
An example: One sample t-test
Memory experiment example:• We give a n = 16 memory patients a memory improvement treatment.
α = 0.05One -tailed
€
t(15) = −2.5
• Step 5: Make a decision about your null hypothesis
• How do they compare to the general population of memory patients who have a distribution of memory errors that is Normal, μ = 60?
• After the treatment they have an average score of = 55, s = 8 memory errors.
€
X
€
df =15
Proportion in one tail0.10 0.05 0.025 0.01 0.005
Proportion in two tailsdf 0.20 0.10 0.05 0.02 0.01:
15:
:1.341
:
:1.753
:
:2.131
:
:2.602
:
:2.947
:
tcrit = -1.753
H0: μTreatment > μpop = 60 HA: μTreatment < μpop = 60
PSY 340Statistics for the
Social Sciences One sample t-test
An example: One sample t-test
Memory experiment example:• We give a n = 16 memory patients a memory improvement treatment.
α = 0.05One -tailed
€
t(15) = −2.5
• Step 5: Make a decision about your null hypothesis
• How do they compare to the general population of memory patients who have a distribution of memory errors that is Normal, μ = 60?
• After the treatment they have an average score of = 55, s = 8 memory errors.
€
X
€
df =15
-1.753 = tcrit
tobs=-2.5
- Reject H0
H0: μTreatment > μpop = 60 HA: μTreatment < μpop = 60
PSY 340Statistics for the
Social Sciences Assumptions of t-statistics
• Values in the sample must be independent observations – Each observation is independent of all of the other
observations (see pg 253 of your textbook for examples of non-independence)
• The population that is sampled must be normally distributed– It turns out that t-tests are pretty robust against
violations of this assumption, especially with large samples
PSY 340Statistics for the
Social SciencesEffect Sizes & Power for 1-sample t Test
d =μ1 −μ2
σ
Recall for the 1-sample z-test:
Remember we don’t know these with the t-test design
estimated d =X−μ2
s
So for the 1-sample t-test we estimate the Cohen’s d:
sample mean Pop mean from null hypothesis
sample standard deviation
PSY 340Statistics for the
Social Sciences Using SPSS: 1 sample t
• Entering the data– Observations go into one column
e.g., 2, 6, 5, 9
• Performing the analysis– Analyze -> Compare means -> one sample t-test
– Identify which column to do your test on
– Enter the ‘Test value’ – this is the population mean in the H0
– Be careful, the default is 0, this may not be what you want
• Reading the output– Mean of the sample, the computed-t, degrees of freedom,
p-value (Sig.) (also reminds you of your test value)
PSY 340Statistics for the
Social Sciences Next time
• Related samples t-tests
• Independent samples t-tests