using t-tests basic introduction and 1-sample t-tests statistics for the social sciences psychology...
TRANSCRIPT
![Page 1: Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology 340 Spring 2010](https://reader036.vdocuments.net/reader036/viewer/2022062621/551be2bb550346b9588b5ec2/html5/thumbnails/1.jpg)
Using t-tests Basic introduction and 1-sample t-tests
Statistics for the Social SciencesPsychology 340
Spring 2010
![Page 2: Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology 340 Spring 2010](https://reader036.vdocuments.net/reader036/viewer/2022062621/551be2bb550346b9588b5ec2/html5/thumbnails/2.jpg)
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
![Page 3: Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology 340 Spring 2010](https://reader036.vdocuments.net/reader036/viewer/2022062621/551be2bb550346b9588b5ec2/html5/thumbnails/3.jpg)
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
![Page 4: Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology 340 Spring 2010](https://reader036.vdocuments.net/reader036/viewer/2022062621/551be2bb550346b9588b5ec2/html5/thumbnails/4.jpg)
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
![Page 5: Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology 340 Spring 2010](https://reader036.vdocuments.net/reader036/viewer/2022062621/551be2bb550346b9588b5ec2/html5/thumbnails/5.jpg)
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
![Page 6: Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology 340 Spring 2010](https://reader036.vdocuments.net/reader036/viewer/2022062621/551be2bb550346b9588b5ec2/html5/thumbnails/6.jpg)
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:
![Page 7: Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology 340 Spring 2010](https://reader036.vdocuments.net/reader036/viewer/2022062621/551be2bb550346b9588b5ec2/html5/thumbnails/7.jpg)
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.
![Page 8: Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology 340 Spring 2010](https://reader036.vdocuments.net/reader036/viewer/2022062621/551be2bb550346b9588b5ec2/html5/thumbnails/8.jpg)
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
![Page 9: Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology 340 Spring 2010](https://reader036.vdocuments.net/reader036/viewer/2022062621/551be2bb550346b9588b5ec2/html5/thumbnails/9.jpg)
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
![Page 10: Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology 340 Spring 2010](https://reader036.vdocuments.net/reader036/viewer/2022062621/551be2bb550346b9588b5ec2/html5/thumbnails/10.jpg)
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
![Page 11: Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology 340 Spring 2010](https://reader036.vdocuments.net/reader036/viewer/2022062621/551be2bb550346b9588b5ec2/html5/thumbnails/11.jpg)
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”
![Page 12: Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology 340 Spring 2010](https://reader036.vdocuments.net/reader036/viewer/2022062621/551be2bb550346b9588b5ec2/html5/thumbnails/12.jpg)
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
![Page 13: Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology 340 Spring 2010](https://reader036.vdocuments.net/reader036/viewer/2022062621/551be2bb550346b9588b5ec2/html5/thumbnails/13.jpg)
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
![Page 14: Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology 340 Spring 2010](https://reader036.vdocuments.net/reader036/viewer/2022062621/551be2bb550346b9588b5ec2/html5/thumbnails/14.jpg)
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)
![Page 15: Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology 340 Spring 2010](https://reader036.vdocuments.net/reader036/viewer/2022062621/551be2bb550346b9588b5ec2/html5/thumbnails/15.jpg)
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
![Page 16: Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology 340 Spring 2010](https://reader036.vdocuments.net/reader036/viewer/2022062621/551be2bb550346b9588b5ec2/html5/thumbnails/16.jpg)
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
![Page 17: Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology 340 Spring 2010](https://reader036.vdocuments.net/reader036/viewer/2022062621/551be2bb550346b9588b5ec2/html5/thumbnails/17.jpg)
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?
![Page 18: Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology 340 Spring 2010](https://reader036.vdocuments.net/reader036/viewer/2022062621/551be2bb550346b9588b5ec2/html5/thumbnails/18.jpg)
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
![Page 19: Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology 340 Spring 2010](https://reader036.vdocuments.net/reader036/viewer/2022062621/551be2bb550346b9588b5ec2/html5/thumbnails/19.jpg)
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
![Page 20: Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology 340 Spring 2010](https://reader036.vdocuments.net/reader036/viewer/2022062621/551be2bb550346b9588b5ec2/html5/thumbnails/20.jpg)
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
![Page 21: Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology 340 Spring 2010](https://reader036.vdocuments.net/reader036/viewer/2022062621/551be2bb550346b9588b5ec2/html5/thumbnails/21.jpg)
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
![Page 22: Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology 340 Spring 2010](https://reader036.vdocuments.net/reader036/viewer/2022062621/551be2bb550346b9588b5ec2/html5/thumbnails/22.jpg)
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
![Page 23: Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology 340 Spring 2010](https://reader036.vdocuments.net/reader036/viewer/2022062621/551be2bb550346b9588b5ec2/html5/thumbnails/23.jpg)
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
![Page 24: Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology 340 Spring 2010](https://reader036.vdocuments.net/reader036/viewer/2022062621/551be2bb550346b9588b5ec2/html5/thumbnails/24.jpg)
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
![Page 25: Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology 340 Spring 2010](https://reader036.vdocuments.net/reader036/viewer/2022062621/551be2bb550346b9588b5ec2/html5/thumbnails/25.jpg)
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
![Page 26: Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology 340 Spring 2010](https://reader036.vdocuments.net/reader036/viewer/2022062621/551be2bb550346b9588b5ec2/html5/thumbnails/26.jpg)
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
![Page 27: Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology 340 Spring 2010](https://reader036.vdocuments.net/reader036/viewer/2022062621/551be2bb550346b9588b5ec2/html5/thumbnails/27.jpg)
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
![Page 28: Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology 340 Spring 2010](https://reader036.vdocuments.net/reader036/viewer/2022062621/551be2bb550346b9588b5ec2/html5/thumbnails/28.jpg)
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
![Page 29: Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology 340 Spring 2010](https://reader036.vdocuments.net/reader036/viewer/2022062621/551be2bb550346b9588b5ec2/html5/thumbnails/29.jpg)
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)
![Page 30: Using t-tests Basic introduction and 1-sample t-tests Statistics for the Social Sciences Psychology 340 Spring 2010](https://reader036.vdocuments.net/reader036/viewer/2022062621/551be2bb550346b9588b5ec2/html5/thumbnails/30.jpg)
PSY 340Statistics for the
Social Sciences Next time
• Related samples t-tests
• Independent samples t-tests