Upload
phungminh
View
219
Download
6
Embed Size (px)
Citation preview
T-TEST: ONE SAMPLE T-TEST AND CONFIDENCE INTERVAL
Statistics for Language Research Lecture 9 Fall 2015
11/15/2015
1
Fang Chen 华
东师大英语系
陈芳
REVIEW: ALPHA DECIDES THE TYPE I ERROR YOU ARE WILLING TO ACCEPT 11/15/2015
2
When H0 is true
When H1 is true
Reject H0 Type I error
α
Power = 1 - β
Fail to reject H0
1 - α
Type II error β
Fang Chen 华
东师大英语系
陈芳
REVIEW: USE TWO-TAILED TESTS RATHER THAN ONE-TAILED TO ACCOMMODATE UNEXPECTED DISCOVERIES 11/15/2015
3
Directional test Nondirectional test
Fang Chen 华
东师大英语系
陈芳
Z-TEST We use z-test when population variance is known
Case I: Testing one individual against the population
Case II: Testing one sample against the population (here
central limit theorem 中心极限理论 helps us)
11/15/2015
4
2X
X X Xz
nn
µ µ µσσ σ
− − −= = =
σµ−
=Xz
Fang Chen 华
东师大英语系
陈芳
T-TEST: WHY THIS NEW THING? When the population variance is unknown, z-test
is not appropriate.
Why?
We only have s2 from our sample yet s2 tend to underestimate the population variance σ2.
When we replace the population variance σ2
with sample variance s2 in this formula, we are now talking about a different test: t-test.
11/15/2015
5
2X
X X Xz
nn
µ µ µσσ σ
− − −= = =
Fang Chen 华
东师大英语系
陈芳
OVERVIEW Sampling distribution of s2
The t statistic Degrees of freedom Factors that affect the size of t Confidence Intervals for the mean Using SPSS to conduct the t-test
11/15/2015
6
Fang Chen 华
东师大英语系
陈芳
SAMPLING DISTRIBUTIONS OF S2 11/15/2015
7
Population Behavior Problem Scores
µ=50, SD=10 15 68 48 58 50 53 42 50 56 47 57 57 43 60 50 36 48 45 41 66 43 53 39 33 49 41 56 57 47 45 47 55 49 47 40 54 40 41 48 45 68 47 53 34 56 44 67 43 31 58 50 66 46 55 55 47 56 56 39 64 57 62 43 47 31 33 48 39 63 40 68 56 56 41 44 54 51 45 65 69 48 44 54 51 40 42 75 33 55 52 47
47 64 55 44 60 49 56 45 66
µ=50, σ2=100
Sampling distribution of the variance: {129, 113, 37, 41, 53}
1006.745
5341371131292__
<=++++
=s
Sample 1
63 53 57 53 31 69 68 48 45 55
12921 =s
Sample 2
47 36 39 33 60 48 54 54 66 54
11322 =s
Sample 3
47 56 41 50 57 56 55 58 44 47
3723 =s Sample 4
44 36 57 56 48 45 50 45 42 48
4124 =s
Sample 5
49 33 49 45 51 39 40 36 43 56
5325 =s
Fang Chen 华
东师大英语系
陈芳
SAMPLING DISTRIBUTIONS OF S2
3 out of the 5 samples’ variance are smaller than 100 already …
Sample variance s2 tends to underestimate population variance σ2. (s2 tends to be smaller than population variance σ2. )
s2 is still an unbiased estimate of σ2 . But the distribution is skewed.
Seeing the statistics: http://www.socr.ucla.edu/Applets.dir/SamplingDistrib
utionApplet.html
11/15/2015
8
Fang Chen 华
东师大英语系
陈芳
11/15/2015 Fang C
hen 华东师大英语系
陈芳
9
11/15/2015 Fang C
hen 华东师大英语系
陈芳
10
T-STATISTICS Because s2 tends to underestimate σ2, t statistics
tend to produce bigger values. If we still use the z table, we tend to find more “significant” results.
Gossett showed that using s2 in place of σ2 lead to a particular sampling distribution, known as “Student’s t distribution”.
11/15/2015
11
Ns
X
Ns
Xs
XtX
µµµ −=
−=
−=
2
Fang Chen 华
东师大英语系
陈芳
T-STATISTICS “Student’s t distribution” is a function of the
degrees of freedom (df), which we can define here as the sample size-1, or df=N-1.
“Student’s t distribution” approximates the normal distribution as sample size increases, (correspondingly when degrees of freedom increases.)
Seeing statistics: http://www.socr.ucla.edu/Applets.dir/SamplingDistrib
utionApplet.html
11/15/2015
12
Fang Chen 华
东师大英语系
陈芳
11/15/2015
13
Fang Chen 华
东师大英语系
陈芳
DEGREES OF FREEDOM As the degrees of freedom increase to about 30, t-
distribution is close to normal distribution. Using the right table is especially important for smaller samples.
Compare: P596 t-table vs. P604 z-table, Using α=.05, one-tailed test, N=5, df=? If the value we obtained from our sample is 1.7. What
is your decision to reject the null hypothesis or not if you use the z-table versus the t-table?
11/15/2015
14
Fang Chen 华
东师大英语系
陈芳
11/15/2015 Fang C
hen 华东师大英语系
陈芳
15
A QUICK EXAMPLE Lie Scale population mean is 3.87. We have a
group of 36 children from families in which one parent had recently been diagnosed with cancer. We hypothesize that these children will have different Lie Scale score than normal children.
We know:
Are the scores significantly different (do these children have different lying tendency)?
11/15/2015
16
61.239.487.3 === sXµ
20.1
3661.2
87.339.4=
−=
−=
−=
Ns
Xs
XtX
µµ
Fang Chen 华
东师大英语系
陈芳
No
FACTORS Factors that affect the magnitude of the t statistics
1. The actual obtained difference 2. The magnitude of the sample variance (s2) 3. The sample size (N)
(Additional )Factors that affect the likelihood of
rejecting H0 4. The significance level (α) 5. Whether the test is a one-tailed or two-tailed
test
11/15/2015
17
Ns
Xs
XtX
2
µµ −=
−=
( )µ−X
Fang Chen 华
东师大英语系
陈芳
EXAMPLE 2: THE MOON ILLUSION Researchers examined the illusion that the moon
appears to be larger at the horizon than at its zenith. Subjects were asked to participate in a simulation that resulted in calculating the ratio of horizon size to zenith size.
Step 1: Set up null hypothesis that no matter where the moon is,
there is no illusion of the size of the moon. The ratio of the two moon size is 1.
H0: μ = 1.00 Step 2:
Set up alternative hypothesis that yes, there is illusion. The moon appears to be in different size depending on its position. Ratio of the two moon size is not 1.
H1: μ ≠ 1.00
11/15/2015
18
Fang Chen 华
东师大英语系
陈芳
STEPS CONTINUED Step3:
Locate all the necessary statistics: n = 10 df = 10-1 = 9 s = 0.341
Step4:
Calculate t statistics and find the probability. Critical t9,0.5/2=+2.262
11/15/2015
19
29.4
10341.0
1463.1=
−=
−=
−=
Ns
Xs
XtX
µµ
1.463X = 1=µ
Fang Chen 华
东师大英语系
陈芳
STEPS CONTINUED Step5:
Decide on your criterion. Here we use p=0.05 and two-tailed test.
Make the decision to reject or fail to reject H0. 4.29>2.262, reject the null hypothesis. Conclude the ratio of the two moons is different from
1. Step6:
Interpret the results: On average, depending on where the moon is, the moon size seems to be different. More specifically, the moon seems to be bigger at the horizon than at the zenith.
11/15/2015
20
Fang Chen 华
东师大英语系
陈芳
CONFIDENCE INTERVAL Point estimate is just one value as an estimate of
a parameter. Interval estimates is the range that is believed to
include the true parameter by some probability criterion.
I use the terms confidence limits or confidence intervals interchangeably.
11/15/2015
21
Fang Chen 华
东师大英语系
陈芳
CONFIDENCE INTERVAL: A CONCEPT WE ALREADY KNOW We have a population with mean=50 and SD=10,
if I randomly select one person from this population, where does the score fall 95% of the time? Using a two-tailed test and a critical p value of 0.5,
the critical z score is + 1.96. Working backward using z transformation formula
X=30.4 and 69.6 CI=(30.4, 69.6) Interpretation: If I randomly select one person from
this population, 95% of the time, the score will lie between 30.4 and 69.6.
11/15/2015
22
10*96.150*96.1
96.1±=±=
±=−
=σµ
σµ XXz
Fang Chen 华
东师大英语系
陈芳
CONFIDENCE INTERVAL FOR THE POPULATION MEAN—USING CENTRAL LIMIT THEOREM
11/15/2015
23
Population Behavior Problem Scores
µ=50, SD=10 15 68 48 58 50 53 42 50 56 47 57 57 43 60 50 36 48 45 41 66 43 53 39 33 49 41 56 57 47 45 47 55 49 47 40 54 40 41 48 45 68 47 53 34 56 44 67 43 31 58 50 66 46 55 55 47 56 56 39 64 57 62 43 47 31 33 48 39 63 40 68 56 56 41 44 54 51 45 65 69 48 44 54 51 40 42 75 33 55 52 47
47 64 55 44 60 49 56 45 66
µ=50, σ=10
Based on the central limit theorem: 95%CI=(43.80, 56.20) (original data has more decimal places) If we randomly select a sample from this population, 95% of the time, the sample mean will fall within this range.
Sample 1
63 53 57 53 31 69 68 48 45 55
34.11,54 11 == sX
Sample 2
47 36 39 33 60 48 54 54 66 54
61.10,49 22 == sX
Sample 3
47 56 41 50 57 56 55 58 44 47
07.6,51 33 == sX Sample 4
44 36 57 56 48 45 50 45 42 48
40.6,47 44 == sX
Sample 5
49 33 49 45 51 39 40 36 43 56
27.7,44 55 == sX
Fang Chen 华
东师大英语系
陈芳
CONFIDENCE INTERVAL FOR THE POPULATION MEAN---ANOTHER PERSPECTIVE
11/15/2015
24
Population Behavior Problem Scores
µ=50, SD=10 15 68 48 58 50 53 42 50 56 47 57 57 43 60 50 36 48 45 41 66 43 53 39 33 49 41 56 57 47 45 47 55 49 47 40 54 40 41 48 45 68 47 53 34 56 44 67 43 31 58 50 66 46 55 55 47 56 56 39 64 57 62 43 47 31 33 48 39 63 40 68 56 56 41 44 54 51 45 65 69 48 44 54 51 40 42 75 33 55 52 47
47 64 55 44 60 49 56 45 66
µ=50, σ=10
CI1(46.12, 62.35) CI2(41.68, 56.86) CI3(46.98, 55.66) CI4(42.59, 51.71) CI5(38.93, 49.33) 95% of these confidence intervals will include the population mean.
Sample 1
63 53 57 53 31 69 68 48 45 55
34.11,54 11 == sX
Sample 2
47 36 39 33 60 48 54 54 66 54
61.10,49 22 == sX
Sample 3
47 56 41 50 57 56 55 58 44 47
07.6,51 33 == sX Sample 4
44 36 57 56 48 45 50 45 42 48
40.6,47 44 == sX
Sample 5
49 33 49 45 51 39 40 36 43 56
27.7,44 55 == sX
Fang Chen 华
东师大英语系
陈芳
NOTE Slide 21 is based on the population variance and CLT.
We calculate our CI of the population mean based on the sampling distribution of the means by finding the corresponding z scores that encloses the middle 95% of the sampling distribution.
Slide 22 is based on the samples (using a sample mean, sample variance as an approximation of population variance and critical t scores that encloses the middle 95% of the values in a sample; repeat this for all the samples), 95% of the CIs will enclose the real population mean of 50. This is similar to that a CI based on one sample has 95% probability of enclosing the population mean.
11/15/2015
25
Fang Chen 华
东师大英语系
陈芳
CONFIDENCE INTERVALS: INTERPRETATION IN T-TEST Because t statistics follow the Students’ t
distribution, calculation of CI is case-dependent. The degree of freedom has to be taken into consideration.
Also, now that we don’t have the population SD, meaning we don’t know the population distribution, we don’t say how likely our sample mean is, instead we try to see how well our sample mean tells us about population mean.
11/15/2015
26
Fang Chen 华
东师大英语系
陈芳
CONFIDENCE INTERVAL FOR THE POPULATION MEAN---THE MOON ILLUSION EXAMPLE Using the t formula, we work reversely to find a
range for population mean, that range is called the confidence interval of the population mean.
Since N=10, df=9, using two-tailed test with alpha=0.5, the critical t value is t9,0.5/2=+2.262.
Interpretation: The probability is .95 that CI(1.701, 1,219) includes the true mean ratio (population mean ratio) for the moon illusion.
11/15/2015
27
NstX
Ns
Xs
XtX
*−=−
=−
= µµµ
219.1,701.1=µ
Fang Chen 华
东师大英语系
陈芳
USING SPSS: ONE SAMPLE T-TEST Katz SAT data.dat
A good guess is better than leaving it blank
Demo
Write up the results. p327 7th ed.
11/15/2015
28
Fang Chen 华
东师大英语系
陈芳
READ SPSS OUTPUT WRITE UP ON P.327
11/15/2015
29
s Null hypothesis mean
Real p corresponding to t=20.613, if smaller than .05, reject the null. The smaller the value here, the better.
272.128729.6
===NssX
(46.21-20)+2.052*1.272 =23.60, 28.82 CI does not include 0. Reject null.
Critical t is not here. Look up in the t table: 2.052 20.613>2.052, reject the null. The bigger the value here, the better.
Fang Chen 华
东师大英语系
陈芳